Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitlabOptions ¶
type GitlabOptions struct { Password string `json:"password" yaml:"Password"` Port string `json:"port" yaml:"Port"` Token string `json:"token" yaml:"Token"` User string `json:"user" yaml:"User"` Version string `json:"version" yaml:"Version"` Host string `json:"host" yaml:"Host"` }
func (*GitlabOptions) Validate ¶
func (g *GitlabOptions) Validate() []error
type HarborOptions ¶
type HarborOptions struct { User string `json:"user" yaml:"User"` Password string `json:"password" yaml:"Password"` Host string `json:"host" yaml:"Host"` }
func (*HarborOptions) Validate ¶
func (h *HarborOptions) Validate() []error
type IntegrateOption ¶
type IntegrateOption struct { CiConfigPath string `json:"ci_config_path" yaml:"CiConfigPath"` Pipeline string `json:"pipeline" yaml:"Pipeline"` Template string `json:"template" yaml:"Template"` }
func (*IntegrateOption) Validate ¶
func (i *IntegrateOption) Validate() []error
type IntegrateOptions ¶
type IntegrateOptions struct {
IntegrateOptions []*IntegrateOption `json:"integrate_option" yaml:"IntegrateOption"`
}
type IntegrationConfig ¶
type IntegrationConfig struct { HarborOptions *HarborOptions `json:"harbor_options" yaml:"HarborOptions"` GitlabOptions *GitlabOptions `json:"gitlab_options" yaml:"GitlabOptions"` IntegrateOptions []*IntegrateOption `json:"integrate_options" yaml:"IntegrateOptions"` }
func TryLoadFromDisk ¶
func TryLoadFromDisk() (*IntegrationConfig, error)
TryLoadFromDisk loads configuration from default location after server startup return nil error if configuration file not exists
type KubernetesOptions ¶
type KubernetesOptions struct { // kubeconfig KubeConfig *rest.Config // kubeconfig path, if not specified, will use // in cluster way to create clientset KubeConfigPath string `json:"kubeconfig" yaml:"kubeconfig"` // kubernetes apiserver public address, used to generate kubeconfig // for downloading, default to host defined in kubeconfig // +optional Master string `json:"master,omitempty" yaml:"master"` // kubernetes clientset qps // +optional QPS float32 `json:"qps,omitempty" yaml:"qps"` // kubernetes clientset burst // +optional Burst int `json:"burst,omitempty" yaml:"burst"` }
func NewKubernetesConfig ¶
func NewKubernetesConfig() (option *KubernetesOptions)
NewKubernetesOptions returns a `zero` instance
func (*KubernetesOptions) AddFlags ¶
func (k *KubernetesOptions) AddFlags(fs *pflag.FlagSet, c *KubernetesOptions)
func (*KubernetesOptions) Validate ¶
func (k *KubernetesOptions) Validate() []error
Click to show internal directories.
Click to hide internal directories.