Documentation
¶
Index ¶
- func ParseIDFromKey(key []byte) types.ProviderID
- func ProviderKey(id types.ProviderID) []byte
- func ProviderPrefix(id sdk.Address) []byte
- type IKeeper
- type Keeper
- func (k Keeper) Codec() codec.BinaryCodec
- func (k Keeper) CreateOrUpdateProviderAttributes(ctx sdk.Context, id types.ProviderID, attr attrv1.Attributes) error
- func (k Keeper) DeleteProviderAttributes(ctx sdk.Context, id types.ProviderID, keys []string) error
- func (k Keeper) GetProviderAttributes(ctx sdk.Context, id sdk.Address) (types.AuditedProviders, bool)
- func (k Keeper) GetProviderByAuditor(ctx sdk.Context, id types.ProviderID) (types.AuditedProvider, bool)
- func (k Keeper) StoreKey() storetypes.StoreKey
- func (k Keeper) WithProvider(ctx sdk.Context, id sdk.Address, fn func(types.AuditedProvider) bool)
- func (k Keeper) WithProviders(ctx sdk.Context, fn func(types.AuditedProvider) bool)
- type Querier
- func (q Querier) AllProvidersAttributes(c context.Context, req *types.QueryAllProvidersAttributesRequest) (*types.QueryProvidersResponse, error)
- func (q Querier) AuditorAttributes(c context.Context, req *types.QueryAuditorAttributesRequest) (*types.QueryProvidersResponse, error)
- func (q Querier) ProviderAttributes(c context.Context, req *types.QueryProviderAttributesRequest) (*types.QueryProvidersResponse, error)
- func (q Querier) ProviderAuditorAttributes(c context.Context, req *types.QueryProviderAuditorRequest) (*types.QueryProvidersResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseIDFromKey ¶
func ParseIDFromKey(key []byte) types.ProviderID
func ProviderKey ¶
func ProviderKey(id types.ProviderID) []byte
func ProviderPrefix ¶
Types ¶
type IKeeper ¶
type IKeeper interface {
GetProviderByAuditor(ctx sdk.Context, id types.ProviderID) (types.AuditedProvider, bool)
GetProviderAttributes(ctx sdk.Context, id sdk.Address) (types.AuditedProviders, bool)
CreateOrUpdateProviderAttributes(ctx sdk.Context, id types.ProviderID, attr attrv1.Attributes) error
DeleteProviderAttributes(ctx sdk.Context, id types.ProviderID, keys []string) error
WithProviders(ctx sdk.Context, fn func(types.AuditedProvider) bool)
WithProvider(ctx sdk.Context, id sdk.Address, fn func(types.AuditedProvider) bool)
}
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the provider store
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, skey storetypes.StoreKey) Keeper
NewKeeper creates and returns an instance for Market keeper
func (Keeper) CreateOrUpdateProviderAttributes ¶
func (k Keeper) CreateOrUpdateProviderAttributes(ctx sdk.Context, id types.ProviderID, attr attrv1.Attributes) error
CreateOrUpdateProviderAttributes update signed provider attributes. creates new if key does not exist if key exists, existing values for matching pairs will be replaced
func (Keeper) DeleteProviderAttributes ¶
func (Keeper) GetProviderAttributes ¶
func (k Keeper) GetProviderAttributes(ctx sdk.Context, id sdk.Address) (types.AuditedProviders, bool)
GetProviderAttributes returns a provider with given auditor and owner id's
func (Keeper) GetProviderByAuditor ¶
func (k Keeper) GetProviderByAuditor(ctx sdk.Context, id types.ProviderID) (types.AuditedProvider, bool)
GetProviderByAuditor returns a provider with given auditor and owner id
func (Keeper) WithProvider ¶
WithProvider returns requested signed provider attributes
func (Keeper) WithProviders ¶
WithProviders iterates all signed provider's attributes
type Querier ¶
type Querier struct {
Keeper
}
Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper
func (Querier) AllProvidersAttributes ¶
func (q Querier) AllProvidersAttributes( c context.Context, req *types.QueryAllProvidersAttributesRequest, ) (*types.QueryProvidersResponse, error)
func (Querier) AuditorAttributes ¶
func (q Querier) AuditorAttributes( c context.Context, req *types.QueryAuditorAttributesRequest, ) (*types.QueryProvidersResponse, error)
func (Querier) ProviderAttributes ¶
func (q Querier) ProviderAttributes( c context.Context, req *types.QueryProviderAttributesRequest, ) (*types.QueryProvidersResponse, error)
func (Querier) ProviderAuditorAttributes ¶
func (q Querier) ProviderAuditorAttributes( c context.Context, req *types.QueryProviderAuditorRequest, ) (*types.QueryProvidersResponse, error)
Click to show internal directories.
Click to hide internal directories.