Documentation ¶
Overview ¶
Package store implements CRUD operations for project, environment, application and pipeline configuration. This configuration contains the archer projects a customer has, and the environments and pipelines associated with each project.
Index ¶
- type ErrNoSuchApplication
- type ErrNoSuchEnvironment
- type ErrNoSuchProject
- type Store
- func (s *Store) CreateApplication(app *archer.Application) error
- func (s *Store) CreateEnvironment(environment *archer.Environment) error
- func (s *Store) CreateProject(project *archer.Project) error
- func (s *Store) DeleteApplication(projectName, appName string) error
- func (s *Store) DeleteEnvironment(projectName, environmentName string) error
- func (s *Store) DeleteProject(name string) error
- func (s *Store) GetApplication(projectName, appName string) (*archer.Application, error)
- func (s *Store) GetEnvironment(projectName string, environmentName string) (*archer.Environment, error)
- func (s *Store) GetProject(projectName string) (*archer.Project, error)
- func (s *Store) ListApplications(projectName string) ([]*archer.Application, error)
- func (s *Store) ListEnvironments(projectName string) ([]*archer.Environment, error)
- func (s *Store) ListProjects() ([]*archer.Project, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrNoSuchApplication ¶
ErrNoSuchApplication means a specific application couldn't be found in a specific project.
func (*ErrNoSuchApplication) Error ¶
func (e *ErrNoSuchApplication) Error() string
func (*ErrNoSuchApplication) Is ¶
func (e *ErrNoSuchApplication) Is(target error) bool
Is returns whether the provided error equals this error.
type ErrNoSuchEnvironment ¶
ErrNoSuchEnvironment means a specific environment couldn't be found in a specific project.
func (*ErrNoSuchEnvironment) Error ¶
func (e *ErrNoSuchEnvironment) Error() string
func (*ErrNoSuchEnvironment) Is ¶
func (e *ErrNoSuchEnvironment) Is(target error) bool
Is returns whether the provided error equals this error.
type ErrNoSuchProject ¶
ErrNoSuchProject means a project couldn't be found within a specific account and region.
func (*ErrNoSuchProject) Error ¶
func (e *ErrNoSuchProject) Error() string
func (*ErrNoSuchProject) Is ¶
func (e *ErrNoSuchProject) Is(target error) bool
Is returns whether the provided error equals this error.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is in charge of fetching and creating projects, environment and pipeline configuration in SSM.
func (*Store) CreateApplication ¶
func (s *Store) CreateApplication(app *archer.Application) error
CreateApplication instantiates a new application within an existing project. Skip if the application already exists in the project.
func (*Store) CreateEnvironment ¶
func (s *Store) CreateEnvironment(environment *archer.Environment) error
CreateEnvironment instantiates a new environment within an existing project. Skip if the environment already exists in the project.
func (*Store) CreateProject ¶
CreateProject instantiates a new project, validates its uniqueness and stores it in SSM.
func (*Store) DeleteApplication ¶
DeleteApplication removes an application from SSM. If the application does not exist in the store or is successfully deleted then returns nil. Otherwise, returns an error.
func (*Store) DeleteEnvironment ¶
DeleteEnvironment removes an environment from SSM. If the environment does not exist in the store or is successfully deleted then returns nil. Otherwise, returns an error.
func (*Store) DeleteProject ¶ added in v0.0.5
DeleteProject deletes the SSM parameter related to the project.
func (*Store) GetApplication ¶
func (s *Store) GetApplication(projectName, appName string) (*archer.Application, error)
GetApplication gets an application belonging to a particular project by name. If no app is found it returns ErrNoSuchApplication.
func (*Store) GetEnvironment ¶
func (s *Store) GetEnvironment(projectName string, environmentName string) (*archer.Environment, error)
GetEnvironment gets an environment belonging to a particular project by name. If no environment is found it returns ErrNoSuchEnvironment.
func (*Store) GetProject ¶
GetProject fetches a project by name. If it can't be found, return a ErrNoSuchProject
func (*Store) ListApplications ¶
func (s *Store) ListApplications(projectName string) ([]*archer.Application, error)
ListApplications returns all applications belonging to a particular project.
func (*Store) ListEnvironments ¶
func (s *Store) ListEnvironments(projectName string) ([]*archer.Environment, error)
ListEnvironments returns all environments belonging to a particular project.