Documentation ¶
Index ¶
- func NewAccountsController(db ports.Repositories) *accountsController
- func NewTeamsController(db ports.Teams) *teamsController
- type AccountsController
- type CreateAccountCommand
- type CreateOperatorCommand
- type CreateOperatorSigningKeyGroupCommand
- type CreateSystemCommand
- type CreateTeamCommand
- type CreateUserCommand
- type DeleteOperatorCommand
- type DeleteSystemCommand
- type DeleteTeamCommand
- type DeleteUserCommand
- type GetAccountQuery
- type GetAccountTokenQuery
- type GetOperatorQuery
- type GetOperatorSystemAccountQuery
- type GetOperatorTokenQuery
- type GetSystemQuery
- type GetTeamQuery
- type GetUserCredentialsQuery
- type GetUserQuery
- type ListAccountsQuery
- type ListOperatorsQuery
- type ListSystemsQuery
- type ListTeamsQuery
- type ListUsersQuery
- type OperatorsController
- type OperatorsControllerImpl
- func (c *OperatorsControllerImpl) CreateOperator(ctx context.Context, cmd CreateOperatorCommand) (models.Operator, error)
- func (c *OperatorsControllerImpl) CreateOperatorSigningKeyGroup(ctx context.Context, cmd CreateOperatorSigningKeyGroupCommand) (models.SigningKeyGroup, error)
- func (c *OperatorsControllerImpl) DeleteOperator(ctx context.Context, cmd DeleteOperatorCommand) error
- func (c *OperatorsControllerImpl) GetOperator(ctx context.Context, query GetOperatorQuery) (models.Operator, error)
- func (c *OperatorsControllerImpl) GetOperatorSystemAccount(ctx context.Context, query GetOperatorSystemAccountQuery) (models.Account, error)
- func (c *OperatorsControllerImpl) GetOperatorToken(ctx context.Context, query GetOperatorTokenQuery) (models.Token, error)
- func (c *OperatorsControllerImpl) ListOperators(ctx context.Context, query ListOperatorsQuery) (models.Pagination[models.Operator], error)
- func (c *OperatorsControllerImpl) UpdateOperatorSystemAccount(ctx context.Context, cmd UpdateOperatorSystemAccountCommand) (models.Account, error)
- type SystemsController
- type SystemsControllerImpl
- func (s *SystemsControllerImpl) CreateSystem(ctx context.Context, cmd CreateSystemCommand) (models.System, error)
- func (s *SystemsControllerImpl) DeleteSystem(ctx context.Context, cmd DeleteSystemCommand) error
- func (s *SystemsControllerImpl) GetSystem(ctx context.Context, query GetSystemQuery) (models.System, error)
- func (s *SystemsControllerImpl) ListSystems(ctx context.Context, query ListSystemsQuery) (models.Pagination[models.System], error)
- func (s *SystemsControllerImpl) UpdateSystemOperator(ctx context.Context, systemId, operatorID uuid.UUID) (models.System, error)
- type TeamsController
- type UpdateOperatorSystemAccountCommand
- type UsersController
- type UsersControllerImpl
- func (c *UsersControllerImpl) CreateUser(ctx context.Context, cmd CreateUserCommand) (models.User, error)
- func (c *UsersControllerImpl) DeleteUser(ctx context.Context, cmd DeleteUserCommand) error
- func (c *UsersControllerImpl) GetCredentials(ctx context.Context, query GetUserCredentialsQuery) ([]byte, error)
- func (c *UsersControllerImpl) GetUser(ctx context.Context, query GetUserQuery) (models.User, error)
- func (c *UsersControllerImpl) ListUsers(ctx context.Context, query ListUsersQuery) (models.Pagination[models.User], error)
- type VersionController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccountsController ¶
func NewAccountsController(db ports.Repositories) *accountsController
NewAccountsController ...
func NewTeamsController ¶
NewTeamsController ...
Types ¶
type AccountsController ¶
type AccountsController interface { // CreateAccount creates a new account. CreateAccount(ctx context.Context, cmd CreateAccountCommand) (models.Account, error) // DeleteToken deletes a token. DeleteToken(ctx context.Context, accountID uuid.UUID) error // CreateSigningKeyGroup creates a new signing key group. CreateSigningKeyGroup(ctx context.Context) (*models.Account, error) // ListSigningKeys of an account. ListSigningKeys(ctx context.Context, accountID uuid.UUID, pagination models.Pagination[models.NKey]) (models.Pagination[models.NKey], error) // ListAccounts ... ListAccounts(ctx context.Context, req ListAccountsQuery) (models.Pagination[models.Account], error) // GetAccount ... GetAccount(ctx context.Context, query GetAccountQuery) (models.Account, error) // GetAccountToken ... GetAccountToken(ctx context.Context, query GetAccountTokenQuery) (models.Token, error) }
AccountsController is the interface that wraps the methods to access accounts.
type CreateAccountCommand ¶ added in v0.1.15
type CreateAccountCommand struct { Name string `json:"name"` Description string `json:"description"` OperatorID uuid.UUID `json:"operator_id"` }
CreateAccountCommand ...
type CreateOperatorCommand ¶ added in v0.1.15
type CreateOperatorCommand struct { Name string `json:"name" validate:"required,min=3,max=255"` Description string `json:"description" validate:"max=1024"` }
CreateOperatorCommand ...
type CreateOperatorSigningKeyGroupCommand ¶ added in v0.1.15
type CreateOperatorSigningKeyGroupCommand struct { OperatorID uuid.UUID `json:"operator_id" validate:"required"` Name string `json:"name" validate:"required,min=3,max=255"` Description string `json:"description" validate:"max=1024"` }
CreateOperatorSigningKeyGroupCommand ...
type CreateSystemCommand ¶ added in v0.1.15
type CreateSystemCommand struct { Name string `json:"name" validate:"required,min=3,max=255"` Description string `json:"description" validate:"max=1024"` OperatorID uuid.UUID `json:"operator_id" validate:"required"` }
CreateSystemCommand ...
type CreateTeamCommand ¶ added in v0.1.15
type CreateTeamCommand struct { Name string `json:"name" validate:"required,min=3,max=255"` Description string `json:"description" validate:"max=1024"` }
CreateTeamCommand ...
type CreateUserCommand ¶ added in v0.1.15
type CreateUserCommand struct { AccountID uuid.UUID `json:"account_id"` Name string `json:"name"` Description string `json:"description"` }
CreateUserCommand ...
type DeleteOperatorCommand ¶ added in v0.1.15
DeleteOperatorCommand ...
type DeleteSystemCommand ¶ added in v0.1.15
DeleteSystemCommand ...
type DeleteTeamCommand ¶ added in v0.1.15
DeleteTeamCommand ...
type DeleteUserCommand ¶ added in v0.1.15
DeleteUserCommand ...
type GetAccountQuery ¶ added in v0.1.15
GetAccountQuery ...
type GetAccountTokenQuery ¶ added in v0.1.15
GetAccountTokenQuery ...
type GetOperatorQuery ¶ added in v0.1.15
GetOperatorQuery ...
type GetOperatorSystemAccountQuery ¶ added in v0.1.15
type GetOperatorSystemAccountQuery struct {
OperatorID uuid.UUID `json:"operator_id" validate:"required"`
}
GetOperatorSystemAccountQuery ...
type GetOperatorTokenQuery ¶ added in v0.1.15
GetOperatorTokenQuery ...
type GetSystemQuery ¶ added in v0.1.15
GetSystemQuery ...
type GetTeamQuery ¶ added in v0.1.15
GetTeamQuery ...
type GetUserCredentialsQuery ¶ added in v0.1.15
GetUserCredentialsQuery ...
type GetUserQuery ¶ added in v0.1.15
GetUserQuery ...
type ListAccountsQuery ¶ added in v0.1.15
type ListAccountsQuery struct { OperatorID uuid.UUID `json:"system_id"` Limit int `json:"limit"` Offset int `json:"offset"` }
ListAccountsQuery ...
type ListOperatorsQuery ¶ added in v0.1.15
type ListOperatorsQuery struct { Limit int `json:"limit" validate:"required"` Offset int `json:"offset" validate:"required"` Search string `json:"search"` Sort string `json:"sort"` }
ListOperatorsQuery ...
type ListSystemsQuery ¶ added in v0.1.15
type ListSystemsQuery struct { Limit int `json:"limit" validate:"required"` Offset int `json:"offset" validate:"required"` Search string `json:"search"` Sort string `json:"sort"` }
ListSystemsQuery ...
type ListTeamsQuery ¶ added in v0.1.15
type ListTeamsQuery struct { Offset int `json:"offset" validate:"required"` Limit int `json:"limit" validate:"required"` Sort string `json:"sort" validate:"required"` Search string `json:"search" validate:"required"` }
ListTeamsQuery ...
type ListUsersQuery ¶ added in v0.1.15
ListUsersQuery ...
type OperatorsController ¶
type OperatorsController interface { // CreateOperator creates a new operator. CreateOperator(ctx context.Context, cmd CreateOperatorCommand) (models.Operator, error) // GetOperator gets an operator. GetOperator(ctx context.Context, query GetOperatorQuery) (models.Operator, error) // CreateOperatorSigningKeyGroup creates a new signing key group. CreateOperatorSigningKeyGroup(ctx context.Context, cmd CreateOperatorSigningKeyGroupCommand) (models.SigningKeyGroup, error) // GetOperatorToken gets an operator token. GetOperatorToken(ctx context.Context, query GetOperatorTokenQuery) (models.Token, error) // ListOperators lists operators. ListOperators(ctx context.Context, query ListOperatorsQuery) (models.Pagination[models.Operator], error) // DeleteOperator deletes an operator. DeleteOperator(ctx context.Context, cmd DeleteOperatorCommand) error // UpdateOperatorSystemAccount ... UpdateOperatorSystemAccount(ctx context.Context, cmd UpdateOperatorSystemAccountCommand) (models.Account, error) // GetOperatorSystemAccount ... GetOperatorSystemAccount(ctx context.Context, query GetOperatorSystemAccountQuery) (models.Account, error) }
OperatorsController is the interface that wraps the methods to access operators.
type OperatorsControllerImpl ¶ added in v0.1.15
type OperatorsControllerImpl struct {
// contains filtered or unexported fields
}
OperatorsControllerImpl is the controller for operators.
func NewOperatorsController ¶
func NewOperatorsController(db ports.Repositories) *OperatorsControllerImpl
NewOperatorsController returns a new OperatorsController.
func (*OperatorsControllerImpl) CreateOperator ¶ added in v0.1.15
func (c *OperatorsControllerImpl) CreateOperator(ctx context.Context, cmd CreateOperatorCommand) (models.Operator, error)
CreateOperator is the method to create a new operator.
func (*OperatorsControllerImpl) CreateOperatorSigningKeyGroup ¶ added in v0.1.15
func (c *OperatorsControllerImpl) CreateOperatorSigningKeyGroup(ctx context.Context, cmd CreateOperatorSigningKeyGroupCommand) (models.SigningKeyGroup, error)
CreateOperatorSigningKeyGroup ...
func (*OperatorsControllerImpl) DeleteOperator ¶ added in v0.1.15
func (c *OperatorsControllerImpl) DeleteOperator(ctx context.Context, cmd DeleteOperatorCommand) error
DeleteOperator ...
func (*OperatorsControllerImpl) GetOperator ¶ added in v0.1.15
func (c *OperatorsControllerImpl) GetOperator(ctx context.Context, query GetOperatorQuery) (models.Operator, error)
GetOperator ...
func (*OperatorsControllerImpl) GetOperatorSystemAccount ¶ added in v0.1.15
func (c *OperatorsControllerImpl) GetOperatorSystemAccount(ctx context.Context, query GetOperatorSystemAccountQuery) (models.Account, error)
GetOperatorSystemAccount ...
func (*OperatorsControllerImpl) GetOperatorToken ¶ added in v0.1.15
func (c *OperatorsControllerImpl) GetOperatorToken(ctx context.Context, query GetOperatorTokenQuery) (models.Token, error)
GetOperatorToken ...
func (*OperatorsControllerImpl) ListOperators ¶ added in v0.1.15
func (c *OperatorsControllerImpl) ListOperators(ctx context.Context, query ListOperatorsQuery) (models.Pagination[models.Operator], error)
ListOperators is the method to list operators.
func (*OperatorsControllerImpl) UpdateOperatorSystemAccount ¶ added in v0.1.15
func (c *OperatorsControllerImpl) UpdateOperatorSystemAccount(ctx context.Context, cmd UpdateOperatorSystemAccountCommand) (models.Account, error)
UpdateOperatorSystemAccount ...
type SystemsController ¶
type SystemsController interface { // CreateSystem creates a new system. CreateSystem(ctx context.Context, cmd CreateSystemCommand) (models.System, error) // DeleteSystem deletes a system. DeleteSystem(ctx context.Context, cmd DeleteSystemCommand) error // GetSystem retrieves a system by its ID. GetSystem(ctx context.Context, query GetSystemQuery) (models.System, error) // ListSystems retrieves a list of systems. ListSystems(ctx context.Context, query ListSystemsQuery) (models.Pagination[models.System], error) }
SystemsController is the controller for systems.
type SystemsControllerImpl ¶ added in v0.1.15
type SystemsControllerImpl struct {
// contains filtered or unexported fields
}
SystemsControllerImpl ...
func NewSystemsController ¶
func NewSystemsController(db ports.Systems) *SystemsControllerImpl
NewSystemsController ...
func (*SystemsControllerImpl) CreateSystem ¶ added in v0.1.15
func (s *SystemsControllerImpl) CreateSystem(ctx context.Context, cmd CreateSystemCommand) (models.System, error)
CreateSystem is the implementation of the CreateSystem method.
func (*SystemsControllerImpl) DeleteSystem ¶ added in v0.1.15
func (s *SystemsControllerImpl) DeleteSystem(ctx context.Context, cmd DeleteSystemCommand) error
DeleteSystem is deleting a system.
func (*SystemsControllerImpl) GetSystem ¶ added in v0.1.15
func (s *SystemsControllerImpl) GetSystem(ctx context.Context, query GetSystemQuery) (models.System, error)
GetSystem ...
func (*SystemsControllerImpl) ListSystems ¶ added in v0.1.15
func (s *SystemsControllerImpl) ListSystems(ctx context.Context, query ListSystemsQuery) (models.Pagination[models.System], error)
ListSystems ...
func (*SystemsControllerImpl) UpdateSystemOperator ¶ added in v0.1.15
func (s *SystemsControllerImpl) UpdateSystemOperator(ctx context.Context, systemId, operatorID uuid.UUID) (models.System, error)
UpdateSystemOperator ...
type TeamsController ¶
type TeamsController interface { // CreateTeam ... CreateTeam(ctx context.Context, cmd CreateTeamCommand) (authz.Team, error) // DeleteTeam ... DeleteTeam(ctx context.Context, cmd DeleteTeamCommand) error // GetTeam ... GetTeam(ctx context.Context, query GetTeamQuery) (authz.Team, error) // ListTeams ... ListTeams(ctx context.Context, query ListTeamsQuery) (models.Pagination[authz.Team], error) }
TeamsController ...
type UpdateOperatorSystemAccountCommand ¶ added in v0.1.15
type UpdateOperatorSystemAccountCommand struct { OperatorID uuid.UUID `json:"operator_id" validate:"required"` AccountID uuid.UUID `json:"system_id" validate:"required"` }
UpdateOperatorSystemAccountCommand ..,
type UsersController ¶
type UsersController interface { // CreateUser creates a new user. CreateUser(ctx context.Context, cmd CreateUserCommand) (models.User, error) // GetCredentials returns the credentials for a user. GetCredentials(ctx context.Context, query GetUserCredentialsQuery) ([]byte, error) // GetUser retrieves a user by its ID. GetUser(ctx context.Context, query GetUserQuery) (models.User, error) // ListUsers retrieves a list of users. ListUsers(ctx context.Context, query ListUsersQuery) (models.Pagination[models.User], error) // DeleteUser deletes a user by its ID. DeleteUser(ctx context.Context, cmd DeleteUserCommand) error }
UsersController is the interface that wraps the methods to access users.
type UsersControllerImpl ¶ added in v0.1.15
type UsersControllerImpl struct {
// contains filtered or unexported fields
}
func NewUsersController ¶
func NewUsersController(db ports.Repositories) *UsersControllerImpl
NewUsersController ...
func (*UsersControllerImpl) CreateUser ¶ added in v0.1.15
func (c *UsersControllerImpl) CreateUser(ctx context.Context, cmd CreateUserCommand) (models.User, error)
CreateUser ...
func (*UsersControllerImpl) DeleteUser ¶ added in v0.1.15
func (c *UsersControllerImpl) DeleteUser(ctx context.Context, cmd DeleteUserCommand) error
DeleteUser ...
func (*UsersControllerImpl) GetCredentials ¶ added in v0.1.15
func (c *UsersControllerImpl) GetCredentials(ctx context.Context, query GetUserCredentialsQuery) ([]byte, error)
GetCredentials ...
func (*UsersControllerImpl) GetUser ¶ added in v0.1.15
func (c *UsersControllerImpl) GetUser(ctx context.Context, query GetUserQuery) (models.User, error)
GetUser ...
func (*UsersControllerImpl) ListUsers ¶ added in v0.1.15
func (c *UsersControllerImpl) ListUsers(ctx context.Context, query ListUsersQuery) (models.Pagination[models.User], error)
ListUsers ...
type VersionController ¶
type VersionController struct {
// contains filtered or unexported fields
}
VersionController ...
func NewVersionController ¶
func NewVersionController(v ports.Build) *VersionController
NewVersionController ...
func (*VersionController) Version ¶
func (c *VersionController) Version() (string, error)
Version ...