Documentation ¶
Index ¶
- func ErrFailedToMarshalInfraProvider(err error) sdk.Error
- func ErrFailedToMarshalInfraProviderList(err error) sdk.Error
- func ErrFailedToUnmarshalInfraProvider(err error) sdk.Error
- func ErrFailedToUnmarshalInfraProviderList(err error) sdk.Error
- func ErrInfraProviderListNotFound() sdk.Error
- func ErrInfraProviderNotFound() sdk.Error
- func GetInfraProviderKey(accKey types.AccountKey) []byte
- func GetInfraProviderListKey() []byte
- type InfraProvider
- type InfraProviderList
- type InfraProviderStorage
- func (is InfraProviderStorage) DoesInfraProviderExist(ctx sdk.Context, accKey types.AccountKey) bool
- func (is InfraProviderStorage) GetInfraProvider(ctx sdk.Context, accKey types.AccountKey) (*InfraProvider, sdk.Error)
- func (is InfraProviderStorage) GetInfraProviderList(ctx sdk.Context) (*InfraProviderList, sdk.Error)
- func (is InfraProviderStorage) InitGenesis(ctx sdk.Context) error
- func (is InfraProviderStorage) SetInfraProvider(ctx sdk.Context, accKey types.AccountKey, InfraProvider *InfraProvider) sdk.Error
- func (is InfraProviderStorage) SetInfraProviderList(ctx sdk.Context, lst *InfraProviderList) sdk.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrFailedToMarshalInfraProvider ¶
ErrFailedToMarshalInfraProvider - error if marshal infra provider failed
func ErrFailedToMarshalInfraProviderList ¶
ErrFailedToMarshalInfraProviderList - error if marshal infra provider list failed
func ErrFailedToUnmarshalInfraProvider ¶
ErrFailedToUnmarshalInfraProvider - error if unmarshal infra provider failed
func ErrFailedToUnmarshalInfraProviderList ¶
ErrFailedToUnmarshalInfraProviderList - error if unmarshal infra provider list failed
func ErrInfraProviderListNotFound ¶
ErrInfraProviderListNotFound - error if infra provider list is not found
func ErrInfraProviderNotFound ¶
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