Documentation ¶
Index ¶
- type CreateEnvironmentCommand
- type CreateProjectCommand
- type CreateSnapshotCommand
- type CreateTeamCommand
- type DeleteEnvironmentCommand
- type DeleteProjectCommand
- type DeleteTeamCommand
- type EnvironmentController
- type EnvironmentControllerImpl
- func (c *EnvironmentControllerImpl) CreateEnvironment(ctx context.Context, cmd CreateEnvironmentCommand) error
- func (c *EnvironmentControllerImpl) DeleteEnvironment(ctx context.Context, cmd DeleteEnvironmentCommand) error
- func (c *EnvironmentControllerImpl) GetEnvironment(ctx context.Context, query GetEnvironmentQuery) (models.Environment, error)
- func (c *EnvironmentControllerImpl) ListEnvironments(ctx context.Context, query ListEnvironmentsQuery) (tables.Results[models.Environment], error)
- func (c *EnvironmentControllerImpl) ListStates(ctx context.Context, query ListStatesQuery) (tables.Results[models.State], error)
- type GetEnvironmentQuery
- type GetProjectQuery
- type GetStateControllerQuery
- type GetTeamQuery
- type ListEnvironmentsQuery
- type ListProjectsQuery
- type ListStatesQuery
- type ListTeamsQuery
- type LockControllerCommand
- type LocksController
- type LocksControllerImpl
- type ProjectController
- type ProjectControllerImpl
- func (c *ProjectControllerImpl) CreateProject(ctx context.Context, cmd CreateProjectCommand) error
- func (c *ProjectControllerImpl) DeleteProject(ctx context.Context, cmd DeleteProjectCommand) error
- func (c *ProjectControllerImpl) GetProject(ctx context.Context, cmd GetProjectQuery) (models.Project, error)
- func (c *ProjectControllerImpl) ListProjects(ctx context.Context, cmd ListProjectsQuery) (tables.Results[models.Project], error)
- type SnapshotController
- type SnapshotControllerImpl
- type StateController
- type StateControllerImpl
- type TeamController
- type TeamControllerImpl
- func (c *TeamControllerImpl) CreateTeam(ctx context.Context, cmd CreateTeamCommand) error
- func (c *TeamControllerImpl) DeleteTeam(ctx context.Context, cmd DeleteTeamCommand) error
- func (c *TeamControllerImpl) GetTeam(ctx context.Context, query GetTeamQuery) (models.Team, error)
- func (c *TeamControllerImpl) ListTeams(ctx context.Context, query ListTeamsQuery) (tables.Results[models.Team], error)
- type UnlockControllerCommand
- type UpdateStateControllerCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateEnvironmentCommand ¶
type CreateEnvironmentCommand struct { TeamName string `json:"team_name" form:"team_name" validate:"required"` ProjectName string `json:"project_name" form:"project_name" validate:"required"` Name string `json:"name" form:"name" validate:"required,min=1,max=255,alphanum,lowercase"` Username string `json:"username" form:"username" validate:"required,min=1,max=255"` Password string `json:"password" form:"password" validate:"required,min=1,max=255"` }
CreateEnvironmentCommand ...
type CreateProjectCommand ¶
type CreateProjectCommand struct { TeamName string `json:"team_name" form:"team_name" validate:"required"` Name string `json:"name" form:"name" validate:"required,min=1,max=255,alphanum,lowercase"` Description string `json:"description" form:"description" validate:"omitempty,min=3,max=2048"` }
CreateProjectCommand ...
type CreateSnapshotCommand ¶
CreateSnapshotCommand ...
type CreateTeamCommand ¶
type CreateTeamCommand struct { // Name is the name of the team. Name string `json:"name" form:"name" validate:"required,min=1,max=255,alphanum,lowercase"` // Description is the description of the team. Description string `json:"description" form:"description"` }
CreateTeamCommand ...
type DeleteEnvironmentCommand ¶
type DeleteEnvironmentCommand struct { TeamName string `json:"team_name" form:"team_name" validate:"required"` ProjectName string `json:"project_name" form:"project_name" validate:"required"` EnvironmentName string `json:"environment_name" form:"environment_name" validate:"required"` }
DeleteEnvironmentCommand ...
type DeleteProjectCommand ¶
type DeleteProjectCommand struct { TeamName string `json:"team_name" form:"team_name" validate:"required"` ProjectName string `json:"project_name" form:"project_name" validate:"required"` }
DeleteProjectCommand ...
type DeleteTeamCommand ¶
type DeleteTeamCommand struct { // TeamName is the name of the team. TeamName string `json:"team_name" form:"team_name"` }
DeleteTeamCommand ...
type EnvironmentController ¶
type EnvironmentController interface { // CreateEnvironment ... CreateEnvironment(ctx context.Context, cmd CreateEnvironmentCommand) error // ListEnvironments ... ListEnvironments(ctx context.Context, query ListEnvironmentsQuery) (tables.Results[models.Environment], error) // GetEnvironment ... GetEnvironment(ctx context.Context, query GetEnvironmentQuery) (models.Environment, error) // DeleteEnvironment ... DeleteEnvironment(ctx context.Context, cmd DeleteEnvironmentCommand) error // ListStates ... ListStates(ctx context.Context, query ListStatesQuery) (tables.Results[models.State], error) }
EnvironmentController ...
type EnvironmentControllerImpl ¶
type EnvironmentControllerImpl struct {
// contains filtered or unexported fields
}
EnvironmentControllerImpl ...
func NewEnvironmentController ¶
func NewEnvironmentController(store dbx.Database[ports.ReadTx, ports.ReadWriteTx]) *EnvironmentControllerImpl
NewEnvironmentController ...
func (*EnvironmentControllerImpl) CreateEnvironment ¶
func (c *EnvironmentControllerImpl) CreateEnvironment(ctx context.Context, cmd CreateEnvironmentCommand) error
CreateEnvironment ...
func (*EnvironmentControllerImpl) DeleteEnvironment ¶
func (c *EnvironmentControllerImpl) DeleteEnvironment(ctx context.Context, cmd DeleteEnvironmentCommand) error
DeleteEnvironment ...
func (*EnvironmentControllerImpl) GetEnvironment ¶
func (c *EnvironmentControllerImpl) GetEnvironment(ctx context.Context, query GetEnvironmentQuery) (models.Environment, error)
GetEnvironment ...
func (*EnvironmentControllerImpl) ListEnvironments ¶
func (c *EnvironmentControllerImpl) ListEnvironments(ctx context.Context, query ListEnvironmentsQuery) (tables.Results[models.Environment], error)
ListEnvironments ...
func (*EnvironmentControllerImpl) ListStates ¶
func (c *EnvironmentControllerImpl) ListStates(ctx context.Context, query ListStatesQuery) (tables.Results[models.State], error)
ListStates ...
type GetEnvironmentQuery ¶
type GetEnvironmentQuery struct { TeamName string `json:"team_name" form:"team_name" validate:"required"` ProjectName string `json:"project_name" form:"project_name" validate:"required"` EnvironmentName string `json:"environment_name" form:"environment_name" validate:"required"` }
GetEnvironmentQuery ...
type GetProjectQuery ¶
type GetProjectQuery struct { TeamName string `json:"team_name" form:"team_name" validate:"required"` ProjectName string `json:"project_name" form:"project_name" validate:"required"` }
GetProjectQuery ...
type GetStateControllerQuery ¶
type GetStateControllerQuery struct { // Team is the team of the lock. Team string `json:"team" form:"team"` // Project is the project of the lock. Project string `json:"project" form:"project"` // Environment is the environment of the lock. Environment string `json:"environment" form:"environment"` }
GetStateControllerQuery ...
type GetTeamQuery ¶
type GetTeamQuery struct { // ID is the ID of the team. TeamName string `json:"team_name" form:"team_name"` }
GetTeamQuery ...
type ListEnvironmentsQuery ¶
type ListEnvironmentsQuery struct { TeamName string `json:"team_name" form:"team_name" validate:"required"` ProjectName string `json:"project_name" form:"project_name" validate:"required"` Limit int `json:"limit" form:"limit" validate:"omitempty,min=1,max=100"` Offset int `json:"offset" form:"offset" validate:"omitempty,min=0"` }
ListEnvironmentsQuery ...
type ListProjectsQuery ¶
type ListProjectsQuery struct { TeamName string `json:"team_name" form:"team_name" validate:"required"` Limit int `json:"limit" form:"limit"` Offset int `json:"offset" form:"offset"` Sort string `json:"sort" form:"sort"` }
ListProjectsQuery ...
type ListStatesQuery ¶
type ListStatesQuery struct { TeamName string `json:"team_name" form:"team_name" validate:"required"` ProjectName string `json:"project_name" form:"project_name" validate:"required"` EnvironmentName string `json:"environment_name" form:"environment_name" validate:"required"` Limit int `json:"limit" form:"limit" validate:"omitempty,min=1,max=100"` Offset int `json:"offset" form:"offset" validate:"omitempty,min=0"` }
ListStatesQuery ...
type ListTeamsQuery ¶
type ListTeamsQuery struct { // Limit is the maximum number of teams to return. Limit int `json:"limit" form:"limit"` // Offset is the number of teams to skip. Offset int `json:"offset" form:"offset"` }
ListTeamsQuery ...
type LockControllerCommand ¶
type LockControllerCommand struct { // ID is the ID of the lock. ID uuid.UUID `json:"id" form:"id"` // Team is the team of the lock. Team string `json:"team" form:"team"` // Project is the project of the lock. Project string `json:"project" form:"project"` // Environment is the environment of the lock. Environment string `json:"environment" form:"environment"` // Info is the info of the lock. Info string `json:"info" form:"info"` // Operation is the operation of the lock. Operation string `json:"operation" form:"operation"` // Path is the path of the lock. Path string `json:"path" form:"path"` // Version is the version of the lock. Version string `json:"version" form:"version"` // Who is the who of the lock. Who string `json:"who" form:"who"` }
LockControllerCommand ...
type LocksController ¶
type LocksController interface { // Lock ... Lock(ctx context.Context, cmd LockControllerCommand) error // Unlock ... Unlock(ctx context.Context, cmd UnlockControllerCommand) error }
LocksController ...
type LocksControllerImpl ¶
type LocksControllerImpl struct {
// contains filtered or unexported fields
}
LocksControllerImpl is the controller for operators.
func NewLocksController ¶
func NewLocksController(store dbx.Database[ports.ReadTx, ports.ReadWriteTx]) *LocksControllerImpl
NewLocksController returns a new LocksControllerImpl.
func (*LocksControllerImpl) Lock ¶
func (c *LocksControllerImpl) Lock(ctx context.Context, cmd LockControllerCommand) error
Lock ...
func (*LocksControllerImpl) Unlock ¶
func (c *LocksControllerImpl) Unlock(ctx context.Context, cmd UnlockControllerCommand) error
Unlock ...
type ProjectController ¶
type ProjectController interface { // CreateProject ... CreateProject(ctx context.Context, cmd CreateProjectCommand) error // GetProject ... GetProject(ctx context.Context, cmd GetProjectQuery) (models.Project, error) // ListProjects ... ListProjects(ctx context.Context, cmd ListProjectsQuery) (tables.Results[models.Project], error) // DeleteProject ... DeleteProject(ctx context.Context, cmd DeleteProjectCommand) error }
ProjectController ...
type ProjectControllerImpl ¶
type ProjectControllerImpl struct {
// contains filtered or unexported fields
}
ProjectControllerImpl ...
func NewProjectController ¶
func NewProjectController(store dbx.Database[ports.ReadTx, ports.ReadWriteTx]) *ProjectControllerImpl
NewProjectController ...
func (*ProjectControllerImpl) CreateProject ¶
func (c *ProjectControllerImpl) CreateProject(ctx context.Context, cmd CreateProjectCommand) error
CreateProject ...
func (*ProjectControllerImpl) DeleteProject ¶
func (c *ProjectControllerImpl) DeleteProject(ctx context.Context, cmd DeleteProjectCommand) error
DeleteProject ...
func (*ProjectControllerImpl) GetProject ¶
func (c *ProjectControllerImpl) GetProject(ctx context.Context, cmd GetProjectQuery) (models.Project, error)
GetProject ...
func (*ProjectControllerImpl) ListProjects ¶
func (c *ProjectControllerImpl) ListProjects(ctx context.Context, cmd ListProjectsQuery) (tables.Results[models.Project], error)
ListProjects ...
type SnapshotController ¶
type SnapshotController interface { // CreateSnapshot ... CreateSnapshot(ctx context.Context, cmd CreateSnapshotCommand) (models.Snapshot, error) }
SnapshotController ...
type SnapshotControllerImpl ¶
type SnapshotControllerImpl struct {
// contains filtered or unexported fields
}
SnapshotControllerImpl ...
func NewSnapshotController ¶
func NewSnapshotController(store dbx.Database[ports.ReadTx, ports.ReadWriteTx]) *SnapshotControllerImpl
NewSnapshotController ...
func (*SnapshotControllerImpl) CreateSnapshot ¶
func (c *SnapshotControllerImpl) CreateSnapshot(ctx context.Context, cmd CreateSnapshotCommand) (models.Snapshot, error)
CreateSnapshot ...
type StateController ¶
type StateController interface { // GetState ... GetState(ctx context.Context, query GetStateControllerQuery) (map[string]interface{}, error) // UpdateState ... UpdateState(ctx context.Context, cmd UpdateStateControllerCommand) error }
StateController ...
type StateControllerImpl ¶
type StateControllerImpl struct {
// contains filtered or unexported fields
}
StateControllerImpl is the controller for the state.
func NewStateController ¶
func NewStateController(store dbx.Database[ports.ReadTx, ports.ReadWriteTx]) *StateControllerImpl
NewStateController returns a new LocksControllerImpl.
func (*StateControllerImpl) GetState ¶
func (c *StateControllerImpl) GetState(ctx context.Context, query GetStateControllerQuery) (map[string]interface{}, error)
GetState ...
func (*StateControllerImpl) UpdateState ¶
func (c *StateControllerImpl) UpdateState(ctx context.Context, cmd UpdateStateControllerCommand) error
UpdateState ...
type TeamController ¶
type TeamController interface { // CreateTeam creates a new team. CreateTeam(ctx context.Context, cmd CreateTeamCommand) error // GetTeam gets a team. GetTeam(ctx context.Context, query GetTeamQuery) (models.Team, error) // DeleteTeam deletes a team. DeleteTeam(ctx context.Context, cmd DeleteTeamCommand) error // ListTeams lists teams. ListTeams(ctx context.Context, query ListTeamsQuery) (tables.Results[models.Team], error) }
TeamController ...
type TeamControllerImpl ¶
type TeamControllerImpl struct {
// contains filtered or unexported fields
}
TeamControllerImpl is the controller for teams.
func NewTeamController ¶
func NewTeamController(store dbx.Database[ports.ReadTx, ports.ReadWriteTx]) *TeamControllerImpl
NewTeamController returns a new instance of TeamController.
func (*TeamControllerImpl) CreateTeam ¶
func (c *TeamControllerImpl) CreateTeam(ctx context.Context, cmd CreateTeamCommand) error
CreateTeam creates a new team.
func (*TeamControllerImpl) DeleteTeam ¶
func (c *TeamControllerImpl) DeleteTeam(ctx context.Context, cmd DeleteTeamCommand) error
DeleteTeam deletes a team.
func (*TeamControllerImpl) GetTeam ¶
func (c *TeamControllerImpl) GetTeam(ctx context.Context, query GetTeamQuery) (models.Team, error)
GetTeam gets a team.
type UnlockControllerCommand ¶
type UnlockControllerCommand struct { // ID is the ID of the lock. ID uuid.UUID `json:"id" form:"id"` // Team is the team of the lock. Team string `json:"team" form:"team"` // Project is the project of the lock. Project string `json:"project" form:"project"` // Environment is the environment of the lock. Environment string `json:"environment" form:"environment"` }
UnlockControllerCommand ...
type UpdateStateControllerCommand ¶
type UpdateStateControllerCommand struct { // Team is the team of the lock. Team string `json:"team" form:"team"` // Project is the project of the lock. Project string `json:"project" form:"project"` // Environment is the environment of the lock. Environment string `json:"environment" form:"environment"` // LockID is the ID of the lock. LockID uuid.UUID `json:"lock_id" form:"lock_id"` // State is the state of the lock. State *map[string]interface{} `json:"state" form:"state"` }
UpdateStateControllerCommand ...