block

package
v0.0.0-...-be26699 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2015 License: AGPL-3.0 Imports: 4 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 *common.Resources,
	authorizer common.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 environment.
	List() (params.BlockResults, error)

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

	// SwitchBlockOff switches desired block type off for this
	// environment.
	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