Documentation
¶
Index ¶
- type Commit
- type CommitList
- type Config
- func (c *Config) Clone() error
- func (c *Config) LoadCommit(commit string) error
- func (c *Config) Pull() error
- func (c *Config) Read(file string) ([]byte, error)
- func (c *Config) RemoteURL() string
- func (c *Config) Save() error
- func (c *Config) ServicesConfig() (*ServicesConfig, error)
- func (c *Config) StorePath() string
- type Git
- func (g Git) Clone(remote string, local string, branch string) error
- func (g Git) Exists(dir, path, commit string) bool
- func (g Git) ListCommits(dir string, branch string) (CommitList, error)
- func (g Git) Pull(dir string, branch string) ([]byte, error)
- func (g Git) ReadFile(dir string, commit string, file string) ([]byte, error)
- type NetworkConfiguration
- type RegistryMap
- type ServicesConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitList ¶
type CommitList []Commit
func (CommitList) Hashes ¶
func (c CommitList) Hashes() []string
type Config ¶
type Config struct { Provider string `json:"provider"` Repository string `json:"repository"` Branch string `json:"branch"` Commit string `json:"commit"` // StoreDir is the path where services config are stored StoreDir string `json:"-"` // Path is the location of the config file Path string `json:"-"` Logger *log.Logger Git *Git }
Config contains nest's configuration
func NewConfig ¶
NewConfig creates a new config It isn't used while testing, make sure to reflect the changes you make here in the tests using the Config.
func (*Config) LoadCommit ¶
func (*Config) ServicesConfig ¶
func (c *Config) ServicesConfig() (*ServicesConfig, error)
type Git ¶
func (Git) ListCommits ¶
func (g Git) ListCommits(dir string, branch string) (CommitList, error)
type NetworkConfiguration ¶
type NetworkConfiguration struct { // todo: implement smallest_subnet policy once subnetter is thoroughly tested Policy string `yaml:"policy" json:"policy"` // "smallest_subnet", "/{mask size}" Subnets []string `yaml:"subnets" json:"subnets"` }
func (*NetworkConfiguration) MarshalJSON ¶
func (n *NetworkConfiguration) MarshalJSON() ([]byte, error)
type RegistryMap ¶
RegistryMap maps registry names to their respective docker.Registry structs
func (*RegistryMap) UnmarshalYAML ¶
func (r *RegistryMap) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface
type ServicesConfig ¶
type ServicesConfig struct { Services service.ServiceMap `yaml:"services" json:"services"` Registries RegistryMap `yaml:"registries" json:"registries"` ControlPlane struct { Host string `yaml:"host" json:"host"` } `yaml:"control_plane" json:"controlPlane"` Proxy struct { HTTP string `yaml:"http" json:"http"` HTTPS string `yaml:"https" json:"https"` SelfSigned bool `yaml:"self_signed" json:"selfSigned"` } `yaml:"proxy" json:"proxy"` Network NetworkConfiguration `yaml:"network" json:"network"` }
ServicesConfig represents nest's config
func (*ServicesConfig) ExpandIncludes ¶
func (c *ServicesConfig) ExpandIncludes(config *Config) error
func (*ServicesConfig) MarshalJSON ¶
func (c *ServicesConfig) MarshalJSON() ([]byte, error)
func (*ServicesConfig) UnmarshalYAML ¶
func (c *ServicesConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.