Documentation
¶
Index ¶
Constants ¶
View Source
const ( // BaseURLKey is the key used to store the Gitlab server url BaseURLKey = "gitlab_api_url" // TokenKey is the key used to store the token to authenticate TokenKey = "gitlab_token" // WorkingDirKey is the key used to store the working directory WorkingDirKey = "working_dir" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigValidator ¶
type ConfigValidator interface {
Struct(s interface{}) error
}
ConfigValidator interface used to validate configuration
type Configuration ¶
type Configuration struct {
// DEPRECATED_BaseURL
DEPRECATEDBaseURL string `mapstructure:"base_url"`
// Gitlab server url
BaseURL string `mapstructure:"gitlab_api_url" validate:"required,url"`
// Token to authenticate
Token string `mapstructure:"gitlab_token" validate:"required"`
// workingDir
WorkingDir string `mapstructure:"working_dir,omitempty" validate:"required"`
}
Configuration for gitlabcli
func (*Configuration) FixCompatibility ¶ added in v0.3.0
func (c *Configuration) FixCompatibility()
FixCompatibility prepares configuration to valid attributes instead of deprecated ones
func (*Configuration) ToMap ¶
func (c *Configuration) ToMap() map[string]interface{}
ToMap returns a map with configuration
func (*Configuration) Validate ¶
func (c *Configuration) Validate(validator ConfigValidator) error
Validate checks configuration
Click to show internal directories.
Click to hide internal directories.