Documentation ¶
Index ¶
- func NewQuerier(k Keeper) sdk.Querier
- type Keeper
- func (k Keeper) AppendProduct(ctx sdk.Context, product types.Product) (alreadyExist bool)
- func (k Keeper) AppendUnit(ctx sdk.Context, unit types.Unit) (alreadyExist bool)
- func (k Keeper) GetAllOrganizations(ctx sdk.Context) (organizations []types.Organization)
- func (k Keeper) GetAllProducts(ctx sdk.Context) (products []types.Product)
- func (k Keeper) GetOrganization(ctx sdk.Context, addr sdk.AccAddress) (organization types.Organization, found bool)
- func (k Keeper) GetProduct(ctx sdk.Context, name string) (product types.Product, found bool)
- func (k Keeper) GetUnit(ctx sdk.Context, reference string) (unit types.Unit, found bool)
- func (k Keeper) GetUnitComponents(ctx sdk.Context, reference string) (components []types.Unit, found bool)
- func (k Keeper) GetUnitTrace(ctx sdk.Context, reference string) (trace []sdk.AccAddress, found bool)
- func (k Keeper) IncreaseProductCount(ctx sdk.Context, name string) (found bool)
- func (k Keeper) IsAuthority(ctx sdk.Context, addr sdk.ValAddress) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetOrganization(ctx sdk.Context, organization types.Organization)
- func (k Keeper) SetUnit(ctx sdk.Context, unit types.Unit)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier creates a new querier for scx clients.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the scx store
func (Keeper) AppendProduct ¶
Append a product
func (Keeper) AppendUnit ¶
Append an unit
func (Keeper) GetAllOrganizations ¶
func (k Keeper) GetAllOrganizations(ctx sdk.Context) (organizations []types.Organization)
Get the set of all organizations
func (Keeper) GetAllProducts ¶
Retrieve all products
func (Keeper) GetOrganization ¶
func (k Keeper) GetOrganization(ctx sdk.Context, addr sdk.AccAddress) (organization types.Organization, found bool)
Get on organization
func (Keeper) GetProduct ¶
Fetch one product from its name
func (Keeper) GetUnitComponents ¶
func (k Keeper) GetUnitComponents(ctx sdk.Context, reference string) (components []types.Unit, found bool)
Get all the component units of the unit
func (Keeper) GetUnitTrace ¶
func (k Keeper) GetUnitTrace(ctx sdk.Context, reference string) (trace []sdk.AccAddress, found bool)
Get the list of all the holder
func (Keeper) IncreaseProductCount ¶
Increase the count of a product
func (Keeper) IsAuthority ¶
Verify if an address is an authority (an authority is in the validator set)
func (Keeper) SetOrganization ¶
func (k Keeper) SetOrganization(ctx sdk.Context, organization types.Organization)
Set organization details
Click to show internal directories.
Click to hide internal directories.