block

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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(
	st *state.State,
	resources facade.Resources,
	authorizer facade.Authorizer,
) (*API, error)

NewAPI returns a new block API facade.

func (*API) List

func (a *API) List() (params.BlockResults, error)

List implements Block.List().

func (*API) SwitchBlockOff

func (a *API) SwitchBlockOff(args params.BlockSwitchParams) params.ErrorResult

SwitchBlockOff implements Block.SwitchBlockOff().

func (*API) SwitchBlockOn

func (a *API) SwitchBlockOn(args params.BlockSwitchParams) params.ErrorResult

SwitchBlockOn implements Block.SwitchBlockOn().

type Block

type Block interface {
	// List returns all current blocks for this model.
	List() (params.BlockResults, error)

	// SwitchBlockOn switches desired block type on for this
	// model.
	SwitchBlockOn(params.BlockSwitchParams) params.ErrorResult

	// SwitchBlockOff switches desired block type off for this
	// model.
	SwitchBlockOff(params.BlockSwitchParams) params.ErrorResult
}

Block defines the methods on the block API end point.

Jump to

Keyboard shortcuts

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