Documentation ¶
Index ¶
- type Config
- type ConfigRepository
- type ConfigService
- type ConfigTemplate
- type ErrorInventoryAlreadyExist
- type ErrorInventoryNotFound
- type ErrorReadingDefaultsFile
- type Inventory
- type InventoryRelease
- type InventoryRepository
- type InventoryService
- type PlaybookRepository
- type PlaybookService
- type Release
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config represents a set of kubernetes configuration. Usually, Values are expected to be yaml.
type ConfigRepository ¶
type ConfigRepository interface { Save(namespace string, configs []Config) error Delete(namespace string) error }
ConfigRepository represents a service that implements configs management
type ConfigService ¶
ConfigService define the way configuration are managed
func NewConfigService ¶
func NewConfigService(configs ConfigRepository, playbooks PlaybookService) ConfigService
NewConfigService creates a ConfigService
type ConfigTemplate ¶
ConfigTemplate represents a set of kubernetes configuration template. Usually, Template is expected to be golang template of yaml.
type ErrorInventoryAlreadyExist ¶
type ErrorInventoryAlreadyExist struct {
// contains filtered or unexported fields
}
ErrorInventoryAlreadyExist represents an error due to an already existing inventory for a given namespace
func NewErrorInventoryAlreadyExist ¶
func NewErrorInventoryAlreadyExist(namespace string) ErrorInventoryAlreadyExist
NewErrorInventoryAlreadyExist creates a new ErrorInventoryAlreadyExist error
func (ErrorInventoryAlreadyExist) Error ¶
func (err ErrorInventoryAlreadyExist) Error() string
Error returns the error message
type ErrorInventoryNotFound ¶
type ErrorInventoryNotFound struct {
// contains filtered or unexported fields
}
ErrorInventoryNotFound represents an error due to a missing inventory for the given namespace
func NewErrorInventoryNotFound ¶
func NewErrorInventoryNotFound(namespace string) ErrorInventoryNotFound
NewErrorInventoryNotFound creates a new ErrorInventoryNotFound error
func (ErrorInventoryNotFound) Error ¶
func (err ErrorInventoryNotFound) Error() string
Error returns the error message
type ErrorReadingDefaultsFile ¶
type ErrorReadingDefaultsFile struct {
// contains filtered or unexported fields
}
ErrorReadingDefaultsFile represents an error due to unreadable default inventory
func NewErrorReadingDefaultsFile ¶
func NewErrorReadingDefaultsFile(err error) ErrorReadingDefaultsFile
NewErrorReadingDefaultsFile creates an ErrorReadingDefaultsFile error
func (ErrorReadingDefaultsFile) Error ¶
func (err ErrorReadingDefaultsFile) Error() string
Error returns the error message
type Inventory ¶
type Inventory struct { Namespace string `json:"namespace"` Values map[string]interface{} `json:"values"` }
Inventory represents a set of variable to apply to the templates (see config). Namespace is the namespace dedicated files where to apply the variables contains into Values Values is map of string that contains whatever the user set in the default inventory from a playbook
type InventoryRelease ¶
type InventoryRelease struct { Namespace string `json:"namespace"` Values map[string]interface{} `json:"values"` Release Release `json:"release"` }
InventoryRelease represents an inventory enriched with release data.
type InventoryRepository ¶
type InventoryRepository interface { Get(namespace string) (Inventory, error) Exists(namespace string) bool Create(Inventory) error Delete(namespace string) error Update(namespace string, inventory Inventory) error List() ([]Inventory, error) }
InventoryRepository define the way inventories are actually managed
type InventoryService ¶
type InventoryService interface { Create(namespace string) (Inventory, error) Update(namespace string, inventory Inventory) error Get(namespace string) (Inventory, error) Exists(namespace string) bool List() ([]Inventory, error) Delete(namespace string) error Reset(namespace string) (Inventory, error) }
InventoryService define the way inventories are managed.
func NewInventoryService ¶
func NewInventoryService(inventories InventoryRepository, playbooks PlaybookService) InventoryService
NewInventoryService create an InventoryService
type PlaybookRepository ¶
type PlaybookRepository interface { GetDefault() (Inventory, error) GetTemplate() ([]ConfigTemplate, error) }
PlaybookRepository is an actual implementation of playbook management
type PlaybookService ¶
type PlaybookService interface { GetDefault() (Inventory, error) GetTemplate() ([]ConfigTemplate, error) }
PlaybookService represents the way playbook are managed
func NewPlaybookService ¶
func NewPlaybookService(playbooks PlaybookRepository) PlaybookService
NewPlaybookService returns a new PlaybookService