model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 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

marshal error

func ErrFailedToMarshalInfraProviderList

func ErrFailedToMarshalInfraProviderList(err error) sdk.Error

func ErrFailedToUnmarshalInfraProvider

func ErrFailedToUnmarshalInfraProvider(err error) sdk.Error

unmarshal error

func ErrFailedToUnmarshalInfraProviderList

func ErrFailedToUnmarshalInfraProviderList(err error) sdk.Error

func ErrInfraProviderListNotFound

func ErrInfraProviderListNotFound() sdk.Error

func ErrInfraProviderNotFound

func ErrInfraProviderNotFound() sdk.Error

not found error

func GetInfraProviderKey

func GetInfraProviderKey(accKey types.AccountKey) []byte

func GetInfraProviderListKey

func GetInfraProviderListKey() []byte

Types

type InfraProvider

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

type InfraProviderList

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

type InfraProviderStorage

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

func NewInfraProviderStorage

func NewInfraProviderStorage(key sdk.StoreKey) InfraProviderStorage

func (InfraProviderStorage) DoesInfraProviderExist

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

func (InfraProviderStorage) GetInfraProvider

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

func (InfraProviderStorage) GetInfraProviderList

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

func (InfraProviderStorage) InitGenesis

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

func (InfraProviderStorage) SetInfraProvider

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

func (InfraProviderStorage) SetInfraProviderList

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

Jump to

Keyboard shortcuts

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