model

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrFailedToMarshalInfraProvider

func ErrFailedToMarshalInfraProvider(err error) sdk.Error

ErrFailedToMarshalInfraProvider - error if marshal infra provider failed

func ErrFailedToMarshalInfraProviderList

func ErrFailedToMarshalInfraProviderList(err error) sdk.Error

ErrFailedToMarshalInfraProviderList - error if marshal infra provider list failed

func ErrFailedToUnmarshalInfraProvider

func ErrFailedToUnmarshalInfraProvider(err error) sdk.Error

ErrFailedToUnmarshalInfraProvider - error if unmarshal infra provider failed

func ErrFailedToUnmarshalInfraProviderList

func ErrFailedToUnmarshalInfraProviderList(err error) sdk.Error

ErrFailedToUnmarshalInfraProviderList - error if unmarshal infra provider list failed

func ErrInfraProviderListNotFound

func ErrInfraProviderListNotFound() sdk.Error

ErrInfraProviderListNotFound - error if infra provider list is not found

func ErrInfraProviderNotFound

func ErrInfraProviderNotFound() sdk.Error

ErrInfraProviderNotFound - error if infra provider is not found

func GetInfraProviderKey

func GetInfraProviderKey(accKey types.AccountKey) []byte

GetInfraProviderKey - get infra provider key in infra provider substore

func GetInfraProviderListKey

func GetInfraProviderListKey() []byte

GetInfraProviderListKey - get infra provider list key in infra provider list substore

Types

type InfraProvider

type InfraProvider struct {
	Username types.AccountKey `json:"username"`
	Usage    int64            `json:"usage"`
}

InfraProvider - infra provider of blockchain

type InfraProviderList

type InfraProviderList struct {
	AllInfraProviders []types.AccountKey `json:"all_infra_providers"`
}

InfraProviderList - infra provider list of blockchain

type InfraProviderStorage

type InfraProviderStorage struct {
	// contains filtered or unexported fields
}

InfraProviderStorage - infra provider storage

func NewInfraProviderStorage

func NewInfraProviderStorage(key sdk.StoreKey) InfraProviderStorage

NewInfraProviderStorage - create a new infra provider storage

func (InfraProviderStorage) DoesInfraProviderExist

func (is InfraProviderStorage) DoesInfraProviderExist(ctx sdk.Context, accKey types.AccountKey) bool

DoesInfraProviderExist - check infra provider exists in KVStore or not

func (InfraProviderStorage) GetInfraProvider

func (is InfraProviderStorage) GetInfraProvider(
	ctx sdk.Context, accKey types.AccountKey) (*InfraProvider, sdk.Error)

GetInfraProvider - get infra provider from KVStore

func (InfraProviderStorage) GetInfraProviderList

func (is InfraProviderStorage) GetInfraProviderList(ctx sdk.Context) (*InfraProviderList, sdk.Error)

GetInfraProviderList - get infra provider list from KVStore

func (InfraProviderStorage) InitGenesis

func (is InfraProviderStorage) InitGenesis(ctx sdk.Context) error

InitGenesis - initialize infra provider manager

func (InfraProviderStorage) SetInfraProvider

func (is InfraProviderStorage) SetInfraProvider(
	ctx sdk.Context, accKey types.AccountKey, InfraProvider *InfraProvider) sdk.Error

SetInfraProvider - set infra provider to KVStore

func (InfraProviderStorage) SetInfraProviderList

func (is InfraProviderStorage) SetInfraProviderList(ctx sdk.Context, lst *InfraProviderList) sdk.Error

SetInfraProviderList - set infra provider list to KVStore

Jump to

Keyboard shortcuts

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