commands

package
v0.2.0-rc9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommandData

func AddCommandData(command *esApi.Command, commandData protoreflect.ProtoMessage) (*esApi.Command, error)

func CreateCommand

func CreateCommand(aggregateId uuid.UUID, commandType es.CommandType) *esApi.Command

CreateCommand builds up a new proto command with the given type and data.

func CreateCommandData

func CreateCommandData(commandData protoreflect.ProtoMessage) (*anypb.Any, error)

func NewCreateClusterCommand

func NewCreateClusterCommand(id uuid.UUID) es.Command

NewCreateClusterCommand creates a CreateClusterCommand.

func NewCreateTenantClusterBindingCommand added in v0.3.0

func NewCreateTenantClusterBindingCommand(id uuid.UUID) es.Command

func NewCreateTenantCommand

func NewCreateTenantCommand(id uuid.UUID) es.Command

NewCreateTenantCommand creates a CreateTenantCommand.

func NewCreateUserCommand

func NewCreateUserCommand(id uuid.UUID) es.Command

func NewCreateUserRoleBindingCommand

func NewCreateUserRoleBindingCommand(id uuid.UUID) es.Command

func NewDeleteClusterCommand

func NewDeleteClusterCommand(id uuid.UUID) es.Command

NewDeleteClusterCommand creates a DeleteClusterCommand.

func NewDeleteTenantClusterBindingCommand added in v0.3.0

func NewDeleteTenantClusterBindingCommand(id uuid.UUID) es.Command

NewDeleteTenantClusterBindingCommand creates a DeleteTenantClusterBindingCommand.

func NewDeleteTenantCommand

func NewDeleteTenantCommand(id uuid.UUID) es.Command

NewDeleteTenantCommand creates a DeleteTenantCommand.

func NewDeleteUserCommand

func NewDeleteUserCommand(id uuid.UUID) es.Command

NewDeleteUserCommand creates a DeleteUserCommand.

func NewDeleteUserRoleBindingCommand

func NewDeleteUserRoleBindingCommand(id uuid.UUID) es.Command

func NewRequestCertificateCommand

func NewRequestCertificateCommand(id uuid.UUID) es.Command

NewRequestCertificateCommand creates a RequestCertificateCommand.

func NewUpdateClusterCommand

func NewUpdateClusterCommand(id uuid.UUID) es.Command

NewUpdateClusterCommand creates an UpdateClusterCommand.

func NewUpdateTenantCommand

func NewUpdateTenantCommand(id uuid.UUID) es.Command

NewUpdateTenantCommand creates an UpdateTenantCommand.

func NewUpdateUserCommand added in v0.3.0

func NewUpdateUserCommand(id uuid.UUID) es.Command

NewUpdateUserCommand creates an UpdateUserCommand.

Types

type CreateClusterCommand

type CreateClusterCommand struct {
	*es.BaseCommand
	cmdData.CreateCluster
}

CreateClusterCommand is a command for creating a cluster.

func (*CreateClusterCommand) Policies

func (c *CreateClusterCommand) Policies(ctx context.Context) []es.Policy

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*CreateClusterCommand) SetData

func (c *CreateClusterCommand) SetData(a *anypb.Any) error

type CreateTenantClusterBindingCommand added in v0.3.0

type CreateTenantClusterBindingCommand struct {
	*es.BaseCommand
	cmdData.CreateTenantClusterBindingCommandData
}

CreateTenantClusterBindingCommand is a command for giving a tenant access to a cluster.

func (*CreateTenantClusterBindingCommand) Policies added in v0.3.0

func (*CreateTenantClusterBindingCommand) SetData added in v0.3.0

type CreateTenantCommand

type CreateTenantCommand struct {
	*es.BaseCommand
	cmdData.CreateTenantCommandData
}

CreateTenantCommand is a command for creating a tenant.

func (*CreateTenantCommand) Policies

func (c *CreateTenantCommand) Policies(ctx context.Context) []es.Policy

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*CreateTenantCommand) SetData

func (c *CreateTenantCommand) SetData(a *anypb.Any) error

type CreateUserCommand

type CreateUserCommand struct {
	*es.BaseCommand
	cmdData.CreateUserCommandData
}

CreateUserCommand is a command for creating a user.

func (*CreateUserCommand) Policies

func (c *CreateUserCommand) Policies(ctx context.Context) []es.Policy

func (*CreateUserCommand) SetData

func (c *CreateUserCommand) SetData(a *anypb.Any) error

type CreateUserRoleBindingCommand

type CreateUserRoleBindingCommand struct {
	*es.BaseCommand
	cmdData.CreateUserRoleBindingCommandData
}

CreateUserRoleBindingCommand is a command for adding a role to a user.

func (*CreateUserRoleBindingCommand) Policies

func (*CreateUserRoleBindingCommand) SetData

type DeleteClusterCommand

type DeleteClusterCommand struct {
	*es.BaseCommand
}

DeleteClusterCommand is a command for deleting a cluster.

func (*DeleteClusterCommand) Policies

func (c *DeleteClusterCommand) Policies(ctx context.Context) []es.Policy

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*DeleteClusterCommand) SetData

func (c *DeleteClusterCommand) SetData(a *anypb.Any) error

type DeleteTenantClusterBindingCommand added in v0.3.0

type DeleteTenantClusterBindingCommand struct {
	*es.BaseCommand
}

DeleteTenantClusterBindingCommand is a command for deleting a TenantClusterBinding.

func (*DeleteTenantClusterBindingCommand) Policies added in v0.3.0

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*DeleteTenantClusterBindingCommand) SetData added in v0.3.0

type DeleteTenantCommand

type DeleteTenantCommand struct {
	*es.BaseCommand
}

DeleteTenantCommand is a command for deleting a tenant.

func (*DeleteTenantCommand) Policies

func (c *DeleteTenantCommand) Policies(ctx context.Context) []es.Policy

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*DeleteTenantCommand) SetData

func (c *DeleteTenantCommand) SetData(a *anypb.Any) error

type DeleteUserCommand

type DeleteUserCommand struct {
	*es.BaseCommand
}

DeleteUserCommand is a command for deleting a user.

func (*DeleteUserCommand) Policies

func (c *DeleteUserCommand) Policies(ctx context.Context) []es.Policy

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*DeleteUserCommand) SetData

func (c *DeleteUserCommand) SetData(a *anypb.Any) error

type DeleteUserRoleBindingCommand

type DeleteUserRoleBindingCommand struct {
	*es.BaseCommand
}

DeleteUserRoleBindingCommand is a command for removing a role from a user.

func (*DeleteUserRoleBindingCommand) Policies

func (*DeleteUserRoleBindingCommand) SetData

type RequestCertificateCommand

type RequestCertificateCommand struct {
	*es.BaseCommand
	cmdData.RequestCertificate
}

RequestCertificateCommand is a command for requesting a certificate for a given aggregate.

func (*RequestCertificateCommand) Policies

func (c *RequestCertificateCommand) Policies(ctx context.Context) []es.Policy

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*RequestCertificateCommand) SetData

func (c *RequestCertificateCommand) SetData(a *anypb.Any) error

type UpdateClusterCommand

type UpdateClusterCommand struct {
	*es.BaseCommand
	cmdData.UpdateCluster
}

UpdateClusterCommand is a command for updating a cluster.

func (*UpdateClusterCommand) Policies

func (c *UpdateClusterCommand) Policies(ctx context.Context) []es.Policy

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*UpdateClusterCommand) SetData

func (c *UpdateClusterCommand) SetData(a *anypb.Any) error

type UpdateTenantCommand

type UpdateTenantCommand struct {
	*es.BaseCommand
	cmdData.UpdateTenantCommandData
}

UpdateTenantCommand is a command for updating a tenant.

func (*UpdateTenantCommand) Policies

func (c *UpdateTenantCommand) Policies(ctx context.Context) []es.Policy

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*UpdateTenantCommand) SetData

func (c *UpdateTenantCommand) SetData(a *anypb.Any) error

type UpdateUserCommand added in v0.3.0

type UpdateUserCommand struct {
	*es.BaseCommand
	cmdData.UpdateUserCommandData
}

UpdateUserCommand is a command for updating a user.

func (*UpdateUserCommand) Policies added in v0.3.0

func (c *UpdateUserCommand) Policies(ctx context.Context) []es.Policy

Policies returns the Role/Scope/Resource combination allowed to execute.

func (*UpdateUserCommand) SetData added in v0.3.0

func (c *UpdateUserCommand) SetData(a *anypb.Any) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL