Documentation ¶
Index ¶
- func DecodeProjectConfiguration(settingsMap map[string]interface{}) error
- func InitializeConfiguration(cfgFile string, overwrite bool)
- func UpdateConfiguration(cfgFile string, configuration Configuration, overwrite bool) error
- func UpdateProject(cfgFile string, project Project) error
- type Configuration
- type Hook
- type Project
- type Serve
- type TokenDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeProjectConfiguration ¶
DecodeProjectConfiguration for decoding the project configuration from viper.AllSettings()
func InitializeConfiguration ¶
InitializeConfiguration for initializing the configuration file.
func UpdateConfiguration ¶
func UpdateConfiguration(cfgFile string, configuration Configuration, overwrite bool) error
UpdateConfiguration For updating the configuration.
func UpdateProject ¶
UpdateProject for adding or modifying the project
Types ¶
type Configuration ¶
type Configuration struct { ServeConfig Serve `yaml:"serve" json:"serve"` ProjectConfigs []Project `yaml:"projects,omitempty" json:"projects,omitempty"` }
Configuration for whole configuration file
type Hook ¶ added in v0.5.0
type Hook struct { FilePath string `yaml:"file_path" json:"file_path"` // path to file to be executed MaxArgs int `yaml:"max_args,omitempty" json:"max_args,omitempty"` // For limiting number of arguments }
Hook is a new struct for replacing PreHook and PostHook
type Project ¶
type Project struct { Name string `yaml:"name" json:"name"` UUID string `yaml:"uuid" json:"uuid"` WorkDir string `yaml:"work_dir" json:"work_dir"` PostHook string `yaml:"post_hook,omitempty" json:"post_hook,omitempty"` PostHookArgs []string `yaml:"post_hook_args,omitempty" json:"post_hook_args,omitempty"` PreHook string `yaml:"pre_hook,omitempty" json:"pre_hook,omitempty"` PreHookArgs []string `yaml:"pre_hook_args,omitempty" json:"pre_hook_args,omitempty"` ErrorHook string `yaml:"error_hook,omitempty" json:"error_hook,omitempty"` ErrorHookArgs []string `yaml:"error_hook_args,omitempty" json:"error_hook_args,omitempty"` Secret string `yaml:"secret" json:"secret"` Tokens []TokenDetail `yaml:"tokens" json:"tokens"` Hooks []Hook `yaml:"hooks,omitempty" json:"hooks,omitempty"` MaxArgs int `yaml:"max_args,omitempty" json:"max_args,omitempty"` }
Project for all projects configurations
func FindProject ¶
FindProject for finding the Project from StoredProjects
func FindProjectWithUUID ¶
FindProjectWithUUID for finding the Project from StoredProjects
func (*Project) ExecuteHooks ¶ added in v0.7.1
ExecuteHooks for executing hooks one after another
func (*Project) ValidateProjectConfiguration ¶
ValidateProjectConfiguration for validating. TODO
type TokenDetail ¶
type TokenDetail struct { Token string `yaml:"token" json:"token"` WhitelistedNetwork string `yaml:"whitelistnet" json:"whitelistnet"` // CIDR notation Name string `yaml:"name" json:"name"` }
TokenDetail is for allowing multiple ips to access same repository with different tokens