mirror of
https://github.com/grafana/grafana.git
synced 2025-09-19 18:53:15 +08:00

* Provisioning: Define secrets service * Provisioning: Create and store secrets service * Provisioning: Define safepath * Provisioning: Define the repository * Identity: Support a provisioning service * Provisioning: Define a job queue * Chore: Regen code * Provisioning: Show progress more often Co-Authored-By: Ryan McKinley <ryantxu@gmail.com> * Provisioning: Rename hash field to lastRef Co-Authored-By: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= <roberto.jimenez@grafana.com> * Provisioning: Workflows as write access Co-Authored-By: Ryan McKinley <ryantxu@gmail.com> * Provisioning: Regen OpenAPI snapshot * Provisioning: Update tests to match new fields --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com> Co-authored-by: =?UTF-8?q?Roberto=20Jim=C3=A9nez=20S=C3=A1nchez?= <roberto.jimenez@grafana.com>
86 lines
4.2 KiB
Go
86 lines
4.2 KiB
Go
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
|
|
package v0alpha1
|
|
|
|
import (
|
|
provisioningv0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1"
|
|
)
|
|
|
|
// RepositorySpecApplyConfiguration represents a declarative configuration of the RepositorySpec type for use
|
|
// with apply.
|
|
type RepositorySpecApplyConfiguration struct {
|
|
Title *string `json:"title,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
Workflows []provisioningv0alpha1.Workflow `json:"workflows,omitempty"`
|
|
Sync *SyncOptionsApplyConfiguration `json:"sync,omitempty"`
|
|
Type *provisioningv0alpha1.RepositoryType `json:"type,omitempty"`
|
|
Local *LocalRepositoryConfigApplyConfiguration `json:"local,omitempty"`
|
|
GitHub *GitHubRepositoryConfigApplyConfiguration `json:"github,omitempty"`
|
|
}
|
|
|
|
// RepositorySpecApplyConfiguration constructs a declarative configuration of the RepositorySpec type for use with
|
|
// apply.
|
|
func RepositorySpec() *RepositorySpecApplyConfiguration {
|
|
return &RepositorySpecApplyConfiguration{}
|
|
}
|
|
|
|
// WithTitle sets the Title field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the Title field is set to the value of the last call.
|
|
func (b *RepositorySpecApplyConfiguration) WithTitle(value string) *RepositorySpecApplyConfiguration {
|
|
b.Title = &value
|
|
return b
|
|
}
|
|
|
|
// WithDescription sets the Description field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the Description field is set to the value of the last call.
|
|
func (b *RepositorySpecApplyConfiguration) WithDescription(value string) *RepositorySpecApplyConfiguration {
|
|
b.Description = &value
|
|
return b
|
|
}
|
|
|
|
// WithWorkflows adds the given value to the Workflows field in the declarative configuration
|
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
// If called multiple times, values provided by each call will be appended to the Workflows field.
|
|
func (b *RepositorySpecApplyConfiguration) WithWorkflows(values ...provisioningv0alpha1.Workflow) *RepositorySpecApplyConfiguration {
|
|
for i := range values {
|
|
b.Workflows = append(b.Workflows, values[i])
|
|
}
|
|
return b
|
|
}
|
|
|
|
// WithSync sets the Sync field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the Sync field is set to the value of the last call.
|
|
func (b *RepositorySpecApplyConfiguration) WithSync(value *SyncOptionsApplyConfiguration) *RepositorySpecApplyConfiguration {
|
|
b.Sync = value
|
|
return b
|
|
}
|
|
|
|
// WithType sets the Type field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the Type field is set to the value of the last call.
|
|
func (b *RepositorySpecApplyConfiguration) WithType(value provisioningv0alpha1.RepositoryType) *RepositorySpecApplyConfiguration {
|
|
b.Type = &value
|
|
return b
|
|
}
|
|
|
|
// WithLocal sets the Local field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the Local field is set to the value of the last call.
|
|
func (b *RepositorySpecApplyConfiguration) WithLocal(value *LocalRepositoryConfigApplyConfiguration) *RepositorySpecApplyConfiguration {
|
|
b.Local = value
|
|
return b
|
|
}
|
|
|
|
// WithGitHub sets the GitHub field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the GitHub field is set to the value of the last call.
|
|
func (b *RepositorySpecApplyConfiguration) WithGitHub(value *GitHubRepositoryConfigApplyConfiguration) *RepositorySpecApplyConfiguration {
|
|
b.GitHub = value
|
|
return b
|
|
}
|