Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Handler
- type Keeper
- func (k Keeper) AccountsByAttribute(ctx sdk.Context, name string) (addresses []sdk.AccAddress, err error)
- func (k Keeper) Attribute(c context.Context, req *types.QueryAttributeRequest) (*types.QueryAttributeResponse, error)
- func (k Keeper) AttributeAccounts(c context.Context, req *types.QueryAttributeAccountsRequest) (*types.QueryAttributeAccountsResponse, error)
- func (k Keeper) Attributes(c context.Context, req *types.QueryAttributesRequest) (*types.QueryAttributesResponse, error)
- func (k Keeper) DecAttrNameAddressLookup(ctx sdk.Context, name string, addrBytes []byte)
- func (k Keeper) DeleteAttribute(ctx sdk.Context, addr string, name string, value *[]byte, owner sdk.AccAddress) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)
- func (k Keeper) GetAllAttributes(ctx sdk.Context, addr string) ([]types.Attribute, error)
- func (k Keeper) GetAttributes(ctx sdk.Context, addr string, name string) ([]types.Attribute, error)
- func (k Keeper) GetMaxValueLength(ctx sdk.Context) (maxValueLength uint32)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) IncAttrNameAddressLookup(ctx sdk.Context, name string, addrBytes []byte)
- func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
- func (k Keeper) IterateRecords(ctx sdk.Context, prefix []byte, handle Handler) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PopulateAddressAttributeNameTable(ctx sdk.Context)
- func (k Keeper) PurgeAttribute(ctx sdk.Context, name string, owner sdk.AccAddress) error
- func (k Keeper) Scan(c context.Context, req *types.QueryScanRequest) (*types.QueryScanResponse, error)
- func (k Keeper) SetAttribute(ctx sdk.Context, attr types.Attribute, owner sdk.AccAddress) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) UpdateAttribute(ctx sdk.Context, originalAttribute types.Attribute, ...) error
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the attribute MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the attribute module Keeper
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, authKeeper types.AccountKeeper, nameKeeper types.NameKeeper, ) Keeper
NewKeeper returns an attribute keeper. It handles: - setting attributes against an account - removing attributes - scanning for existing attributes on an account
CONTRACT: the parameter Subspace must have the param key table already initialized
func (Keeper) AccountsByAttribute ¶ added in v1.15.0
func (k Keeper) AccountsByAttribute(ctx sdk.Context, name string) (addresses []sdk.AccAddress, err error)
AccountsByAttribute returns a list of sdk.AccAddress that have attribute name assigned
func (Keeper) Attribute ¶
func (k Keeper) Attribute(c context.Context, req *types.QueryAttributeRequest) (*types.QueryAttributeResponse, error)
Attribute queries for a specific attribute
func (Keeper) AttributeAccounts ¶ added in v1.15.0
func (k Keeper) AttributeAccounts(c context.Context, req *types.QueryAttributeAccountsRequest) (*types.QueryAttributeAccountsResponse, error)
AttributeAccounts queries for all accounts that have a specific attribute
func (Keeper) Attributes ¶
func (k Keeper) Attributes(c context.Context, req *types.QueryAttributesRequest) (*types.QueryAttributesResponse, error)
Attributes queries for all attributes on a specified account
func (Keeper) DecAttrNameAddressLookup ¶ added in v1.15.0
DecAttrNameAddressLookup decrements the name to account lookups and removes value if decremented to 0
func (Keeper) DeleteAttribute ¶
func (k Keeper) DeleteAttribute(ctx sdk.Context, addr string, name string, value *[]byte, owner sdk.AccAddress) error
DeleteAttribute removes attributes under the given account from the state store.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)
ExportGenesis exports the current keeper state of the attribute module.
func (Keeper) GetAllAttributes ¶
GetAllAttributes gets all attributes for an address.
func (Keeper) GetAttributes ¶
GetAttributes gets all attributes with the given name from an account.
func (Keeper) GetMaxValueLength ¶
GetMaxValueLength returns the current distribution community tax (or default if unset)
func (Keeper) IncAttrNameAddressLookup ¶ added in v1.15.0
IncAttrNameAddressLookup increments the count of name to address lookups
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)
InitGenesis creates the initial genesis state for the attribute module.
func (Keeper) IterateRecords ¶
IterateRecords iterates over all the stored attribute records and passes them to a callback function.
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries params of attribute module
func (Keeper) PopulateAddressAttributeNameTable ¶ added in v1.15.0
PopulateAddressAttributeNameTable retrieves all attributes and populates address by attribute name lookup table TODO: remove after v1.15.0 upgrade handler is removed
func (Keeper) PurgeAttribute ¶ added in v1.15.0
PurgeAttribute removes attributes under the given account from the state store.
func (Keeper) Scan ¶
func (k Keeper) Scan(c context.Context, req *types.QueryScanRequest) (*types.QueryScanResponse, error)
Scan queries for all attributes on a specied account that have a given suffix in their name
func (Keeper) SetAttribute ¶
Stores an attribute under the given account. The attribute name must resolve to the given owner address.
func (Keeper) UpdateAttribute ¶ added in v1.5.0
func (k Keeper) UpdateAttribute(ctx sdk.Context, originalAttribute types.Attribute, updateAttribute types.Attribute, owner sdk.AccAddress, ) error
Updates an attribute under the given account. The attribute name must resolve to the given owner address and value must resolve to an existing attribute.