mock

package
v0.0.0-...-996fa4a Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 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 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() (contract.Contract, error)

Create creates a contract.

func (*ContractProvider) Get

func (mock *ContractProvider) Get(id uint32) (contract.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.

Jump to

Keyboard shortcuts

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