Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API implements Block interface and is the concrete implementation of the api end point.
func NewAPI ¶
func NewAPI(ctx facade.ModelContext) (*API, error)
NewAPI returns a new block API facade.
func (*API) SwitchBlockOff ¶
func (a *API) SwitchBlockOff(ctx context.Context, args params.BlockSwitchParams) params.ErrorResult
SwitchBlockOff implements Block.SwitchBlockOff().
func (*API) SwitchBlockOn ¶
func (a *API) SwitchBlockOn(ctx context.Context, args params.BlockSwitchParams) params.ErrorResult
SwitchBlockOn implements Block.SwitchBlockOn().
type Authorizer ¶
type Authorizer interface { // HasPermission reports whether the given access is allowed for the given // target by the authenticated entity. HasPermission(ctx context.Context, operation permission.Access, target names.Tag) error }
Authorizer defines the methods that the BlockCommandService
type BlockCommandService ¶
type BlockCommandService interface { // SwitchBlockOn switches on a command block for a given type and message. SwitchBlockOn(ctx context.Context, t blockcommand.BlockType, message string) error // SwitchBlockOff disables block of specified type for the current model. SwitchBlockOff(ctx context.Context, t blockcommand.BlockType) error // GetBlocks returns all the blocks for the current model. GetBlocks(ctx context.Context) ([]blockcommand.Block, error) }
BlockCommandService defines the methods that the BlockCommandService facade requires from the domain service.
Click to show internal directories.
Click to hide internal directories.