keeper

package
v1.2.2-pre Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
) *Keeper

func (Keeper) AccountApprovalsCount added in v0.7.0

func (k Keeper) AccountApprovalsCount(ctx sdk.Context, percent float64) int

func (Keeper) AccountRejectApprovalsCount added in v0.11.0

func (k Keeper) AccountRejectApprovalsCount(ctx sdk.Context, percent float64) int

func (Keeper) AddAccountToRevokedAccount added in v0.10.0

func (k Keeper) AddAccountToRevokedAccount(
	ctx sdk.Context, accAddr sdk.AccAddress,
	approvals []*types.Grant,
	reason types.RevokedAccount_Reason,
) (*types.RevokedAccount, error)

func (Keeper) CountAccountsWithRole

func (k Keeper) CountAccountsWithRole(ctx sdk.Context, roleToCount types.AccountRole) int

Count account with assigned role.

func (Keeper) GetAccount

func (k Keeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI

exists to satisfy cosmos AccountKeeper.GetAccount interface TODO consider better way.

func (Keeper) GetAccountO

func (k Keeper) GetAccountO(
	ctx sdk.Context,
	address sdk.AccAddress,
) (val types.Account, found bool)

GetAccount returns a account from its index.

func (Keeper) GetAccountStat

func (k Keeper) GetAccountStat(ctx sdk.Context) (val types.AccountStat, found bool)

GetAccountStat returns accountStat.

func (Keeper) GetAllAccount

func (k Keeper) GetAllAccount(ctx sdk.Context) (list []types.Account)

GetAllAccount returns all account.

func (Keeper) GetAllPendingAccount

func (k Keeper) GetAllPendingAccount(ctx sdk.Context) (list []types.PendingAccount)

GetAllPendingAccount returns all pendingAccount.

func (Keeper) GetAllPendingAccountRevocation

func (k Keeper) GetAllPendingAccountRevocation(ctx sdk.Context) (list []types.PendingAccountRevocation)

GetAllPendingAccountRevocation returns all pendingAccountRevocation.

func (Keeper) GetAllRejectedAccount added in v0.11.0

func (k Keeper) GetAllRejectedAccount(ctx sdk.Context) (list []types.RejectedAccount)

GetAllRejectedAccount returns all rejectedAccount.

func (Keeper) GetAllRevokedAccount added in v0.10.0

func (k Keeper) GetAllRevokedAccount(ctx sdk.Context) (list []types.RevokedAccount)

GetAllRevokedAccount returns all revokedAccount.

func (Keeper) GetModuleAddress

func (k Keeper) GetModuleAddress(moduleName string) sdk.AccAddress

just a stub to have AccountKeeper.GetModuleAddress API filled.

func (Keeper) GetNextAccountNumber

func (k Keeper) GetNextAccountNumber(ctx sdk.Context) (accNumber uint64)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params authtypes.Params)

func (Keeper) GetPendingAccount

func (k Keeper) GetPendingAccount(
	ctx sdk.Context,
	address sdk.AccAddress,
) (val types.PendingAccount, found bool)

GetPendingAccount returns a pendingAccount from its index.

func (Keeper) GetPendingAccountRevocation

func (k Keeper) GetPendingAccountRevocation(
	ctx sdk.Context,
	address sdk.AccAddress,
) (val types.PendingAccountRevocation, found bool)

GetPendingAccountRevocation returns a pendingAccountRevocation from its index.

func (Keeper) GetRejectedAccount added in v0.11.0

func (k Keeper) GetRejectedAccount(
	ctx sdk.Context,
	address sdk.AccAddress,
) (val types.RejectedAccount, found bool)

GetRejectedAccount returns a rejectedAccount from its index.

func (Keeper) GetRevokedAccount added in v0.10.0

func (k Keeper) GetRevokedAccount(
	ctx sdk.Context,
	address sdk.AccAddress,
) (val types.RevokedAccount, found bool)

GetRevokedAccount returns a revokedAccount from its index.

func (Keeper) HasRole

func (k Keeper) HasRole(ctx sdk.Context, addr sdk.AccAddress, roleToCheck types.AccountRole) bool

Check if account has assigned role.

func (Keeper) HasVendorID

func (k Keeper) HasVendorID(ctx sdk.Context, addr sdk.AccAddress, vid int32) bool

Check if account has vendorID association.

func (Keeper) IsAccountPresent

func (k Keeper) IsAccountPresent(ctx sdk.Context, address sdk.AccAddress) bool

Check if the Account record associated with an address is present in the store or not.

func (Keeper) IsPendingAccountPresent

func (k Keeper) IsPendingAccountPresent(ctx sdk.Context, address sdk.AccAddress) bool

Check if the Account record associated with an address is present in the store or not.

func (Keeper) IsPendingAccountRevocationPresent

func (k Keeper) IsPendingAccountRevocationPresent(ctx sdk.Context, address sdk.AccAddress) bool

Check if the Pending Account Revocation record associated with an address is present in the store or not.

func (Keeper) IsRevokedAccountPresent added in v0.10.0

func (k Keeper) IsRevokedAccountPresent(ctx sdk.Context, address sdk.AccAddress) bool

Check if the Revoked Account record associated with an address is present in the store or not.

func (Keeper) IterateAccounts

func (k Keeper) IterateAccounts(ctx sdk.Context, cb func(account types.Account) (stop bool))

func (Keeper) IteratePendingAccountRevocations

func (k Keeper) IteratePendingAccountRevocations(ctx sdk.Context, cb func(account types.PendingAccountRevocation) (stop bool))

func (Keeper) IteratePendingAccounts

func (k Keeper) IteratePendingAccounts(ctx sdk.Context, cb func(account types.PendingAccount) (stop bool))

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MemKey

func (k Keeper) MemKey() sdk.StoreKey

func (Keeper) RejectedAccount added in v0.11.0

func (Keeper) RejectedAccountAll added in v0.11.0

func (Keeper) RemoveAccount

func (k Keeper) RemoveAccount(
	ctx sdk.Context,
	address sdk.AccAddress,
)

RemoveAccount removes a account from the store.

func (Keeper) RemovePendingAccount

func (k Keeper) RemovePendingAccount(
	ctx sdk.Context,
	address sdk.AccAddress,
)

RemovePendingAccount removes a pendingAccount from the store.

func (Keeper) RemovePendingAccountRevocation

func (k Keeper) RemovePendingAccountRevocation(
	ctx sdk.Context,
	address sdk.AccAddress,
)

RemovePendingAccountRevocation removes a pendingAccountRevocation from the store.

func (Keeper) RemoveRejectedAccount added in v0.11.0

func (k Keeper) RemoveRejectedAccount(
	ctx sdk.Context,
	address sdk.AccAddress,
)

RemoveRejectedAccount removes a rejectedAccount from the store.

func (Keeper) RemoveRevokedAccount added in v0.10.0

func (k Keeper) RemoveRevokedAccount(
	ctx sdk.Context,
	address sdk.AccAddress,
)

RemoveRevokedAccount removes a revokedAccount from the store.

func (Keeper) RevokedAccount added in v0.10.0

func (Keeper) RevokedAccountAll added in v0.10.0

func (Keeper) SetAccount

func (k Keeper) SetAccount(ctx sdk.Context, account authtypes.AccountI)

TODO issue 99: currently it's just a dirty fulfill

to satisfy comsmos auth.keeper.AccountI ifaces

func (Keeper) SetAccountO

func (k Keeper) SetAccountO(ctx sdk.Context, account types.Account)

SetAccount set a specific account in the store from its index.

func (Keeper) SetAccountStat

func (k Keeper) SetAccountStat(ctx sdk.Context, accountStat types.AccountStat)

SetAccountStat set accountStat in the store NOTE:

  • the API is needed by genesis logic
  • but it shouldn't be used in run-time, so makes sense to take care about better way

func (Keeper) SetPendingAccount

func (k Keeper) SetPendingAccount(ctx sdk.Context, pendingAccount types.PendingAccount)

SetPendingAccount set a specific pendingAccount in the store from its index.

func (Keeper) SetPendingAccountRevocation

func (k Keeper) SetPendingAccountRevocation(ctx sdk.Context, pendingAccountRevocation types.PendingAccountRevocation)

SetPendingAccountRevocation set a specific pendingAccountRevocation in the store from its index.

func (Keeper) SetRejectedAccount added in v0.11.0

func (k Keeper) SetRejectedAccount(ctx sdk.Context, rejectedAccount types.RejectedAccount)

SetRejectedAccount set a specific rejectedAccount in the store from its index.

func (Keeper) SetRevokedAccount added in v0.10.0

func (k Keeper) SetRevokedAccount(ctx sdk.Context, revokedAccount types.RevokedAccount)

SetRevokedAccount set a specific revokedAccount in the store from its index.

func (Keeper) StoreKey

func (k Keeper) StoreKey() sdk.StoreKey

TODO issue 99: these getters were initially created

for tests needs: to link dependent keepers,
need to explore the alternatives

Jump to

Keyboard shortcuts

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