mock

package
Version: v0.0.0-...-1301d1d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract struct {
	mock.Mock
}

Contract represents a contract (user account).

func (*Contract) Stats

func (mock *Contract) Stats() usage.Meter

Stats returns the stats.

func (*Contract) Validate

func (mock *Contract) Validate(key security.Key) bool

Validate validates the contract data against a key.

type ContractProvider

type ContractProvider struct {
	mock.Mock
}

ContractProvider is the mock provider for contracts

func NewContractProvider

func NewContractProvider() *ContractProvider

NewContractProvider creates a new mock client provider.

func (*ContractProvider) Configure

func (mock *ContractProvider) Configure(config map[string]interface{}) error

Configure configures the provider.

func (*ContractProvider) Create

func (mock *ContractProvider) Create() (security.Contract, error)

Create creates a contract.

func (*ContractProvider) Get

func (mock *ContractProvider) Get(id uint32) (security.Contract, bool)

Get returns a ContractData fetched by its id.

func (*ContractProvider) Name

func (mock *ContractProvider) Name() string

Name returns the name of the provider.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL