Documentation ¶
Overview ¶
Package keeper specifies the keeper for the cert module.
Index ¶
- func HandleCertifierUpdateProposal(ctx sdk.Context, k Keeper, p *types.CertifierUpdateProposal) error
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) CertifyPlatform(ctx context.Context, certifier sdk.AccAddress, validator cryptotypes.PubKey, ...) error
- func (k Keeper) DeleteCertificate(ctx context.Context, certificate types.Certificate) error
- func (k Keeper) GetAllCertificates(ctx context.Context) (certificates []types.Certificate)
- func (k Keeper) GetAllCertifiers(ctx context.Context) types.Certifiers
- func (k Keeper) GetAllLibraries(ctx sdk.Context) (libraries types.Libraries)
- func (k Keeper) GetAllLibraryAddresses(ctx sdk.Context) (libraryAddresses []sdk.AccAddress)
- func (k Keeper) GetAllPlatforms(ctx sdk.Context) (platforms []types.Platform)
- func (k Keeper) GetCertificateByID(ctx context.Context, id uint64) (types.Certificate, error)
- func (k Keeper) GetCertificateType(ctx context.Context, id uint64) (types.CertificateType, error)
- func (k Keeper) GetCertificatesByCertifier(ctx context.Context, certifier sdk.AccAddress) []types.Certificate
- func (k Keeper) GetCertificatesByContent(ctx context.Context, content string) []types.Certificate
- func (k Keeper) GetCertificatesByTypeAndContent(ctx context.Context, certType types.CertificateType, content string) []types.Certificate
- func (k Keeper) GetCertificatesFiltered(ctx context.Context, params types.QueryCertificatesParams) (uint64, []types.Certificate, error)
- func (k Keeper) GetCertifiedIdentities(ctx context.Context) []sdk.AccAddress
- func (k Keeper) GetCertifier(ctx context.Context, certifierAddress sdk.AccAddress) (types.Certifier, error)
- func (k Keeper) GetCertifierByAlias(ctx context.Context, alias string) (types.Certifier, error)
- func (k Keeper) GetNextCertificateID(ctx context.Context) (uint64, error)
- func (k Keeper) GetPlatform(ctx sdk.Context, validator cryptotypes.PubKey) (types.Platform, bool)
- func (k Keeper) HasCertificateByID(ctx context.Context, id uint64) (bool, error)
- func (k Keeper) HasCertifierAlias(ctx context.Context, alias string) (bool, error)
- func (k Keeper) InvalidateLibrary(ctx sdk.Context, library sdk.AccAddress, invalidator sdk.AccAddress) error
- func (k Keeper) IsBountyAdmin(ctx context.Context, address sdk.AccAddress) bool
- func (k Keeper) IsCertified(ctx context.Context, content string, certType string) bool
- func (k Keeper) IsCertifier(ctx context.Context, address sdk.AccAddress) (bool, error)
- func (k Keeper) IsContentCertified(ctx context.Context, content string) bool
- func (k Keeper) IsLibrary(ctx sdk.Context, library sdk.AccAddress) (bool, error)
- func (k Keeper) IssueCertificate(ctx context.Context, c types.Certificate) (uint64, error)
- func (k Keeper) IterateAllCertificate(ctx context.Context, callback func(certificate types.Certificate) (stop bool))
- func (k Keeper) IterateAllCertifiers(ctx context.Context, callback func(certifier types.Certifier) (stop bool))
- func (k Keeper) IterateAllLibraries(ctx sdk.Context, callback func(library types.Library) (stop bool))
- func (k Keeper) PublishLibrary(ctx sdk.Context, library sdk.AccAddress, publisher sdk.AccAddress) error
- func (k Keeper) RevokeCertificate(ctx context.Context, certificate types.Certificate, revoker sdk.AccAddress) error
- func (k Keeper) SetCertificate(ctx context.Context, certificate types.Certificate) error
- func (k Keeper) SetCertifier(ctx context.Context, certifier types.Certifier) error
- func (k Keeper) SetLibrary(ctx sdk.Context, library sdk.AccAddress, publisher sdk.AccAddress) error
- func (k Keeper) SetNextCertificateID(ctx context.Context, id uint64) error
- type Migrator
- type Querier
- func (q Querier) AddrConversion(c context.Context, req *types.ConversionToShentuAddrRequest) (*types.ConversionToShentuAddrResponse, error)
- func (q Querier) Certificate(c context.Context, req *types.QueryCertificateRequest) (*types.QueryCertificateResponse, error)
- func (q Querier) Certificates(c context.Context, req *types.QueryCertificatesRequest) (*types.QueryCertificatesResponse, error)
- func (q Querier) Certifier(c context.Context, req *types.QueryCertifierRequest) (*types.QueryCertifierResponse, error)
- func (q Querier) Certifiers(c context.Context, req *types.QueryCertifiersRequest) (*types.QueryCertifiersResponse, error)
- func (q Querier) Platform(c context.Context, req *types.QueryPlatformRequest) (*types.QueryPlatformResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCertifierUpdateProposal ¶
func HandleCertifierUpdateProposal(ctx sdk.Context, k Keeper, p *types.CertifierUpdateProposal) error
HandleCertifierUpdateProposal is a handler for executing a passed certifier update proposal
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the cert MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper manages certifier & security council related logics.
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, storeService store.KVStoreService, slashingKeeper types.SlashingKeeper, stakingKeeper types.StakingKeeper) Keeper
NewKeeper creates a new instance of the certifier keeper.
func (Keeper) CertifyPlatform ¶
func (k Keeper) CertifyPlatform(ctx context.Context, certifier sdk.AccAddress, validator cryptotypes.PubKey, description string) error
CertifyPlatform certifies a validator host platform by a certifier.
func (Keeper) DeleteCertificate ¶
DeleteCertificate deletes a certificate using its ID field.
func (Keeper) GetAllCertificates ¶
func (k Keeper) GetAllCertificates(ctx context.Context) (certificates []types.Certificate)
GetAllCertificates gets all certificates.
func (Keeper) GetAllCertifiers ¶
func (k Keeper) GetAllCertifiers(ctx context.Context) types.Certifiers
GetAllCertifiers gets all certifiers.
func (Keeper) GetAllLibraries ¶
GetAllLibraries gets all libraries.
func (Keeper) GetAllLibraryAddresses ¶
func (k Keeper) GetAllLibraryAddresses(ctx sdk.Context) (libraryAddresses []sdk.AccAddress)
GetAllLibraryAddresses gets all library addresses.
func (Keeper) GetAllPlatforms ¶
GetAllPlatforms gets all platform certificates for genesis export
func (Keeper) GetCertificateByID ¶
GetCertificateByID retrieves a certificate given an ID.
func (Keeper) GetCertificateType ¶
GetCertificateType gets type of a certificate by certificate ID.
func (Keeper) GetCertificatesByCertifier ¶
func (k Keeper) GetCertificatesByCertifier(ctx context.Context, certifier sdk.AccAddress) []types.Certificate
GetCertificatesByCertifier gets certificates certified by a given certifier.
func (Keeper) GetCertificatesByContent ¶
GetCertificatesByContent retrieves all certificates with given content.
func (Keeper) GetCertificatesByTypeAndContent ¶
func (k Keeper) GetCertificatesByTypeAndContent(ctx context.Context, certType types.CertificateType, content string) []types.Certificate
GetCertificatesByTypeAndContent retrieves all certificates with given certificate type and content.
func (Keeper) GetCertificatesFiltered ¶
func (k Keeper) GetCertificatesFiltered(ctx context.Context, params types.QueryCertificatesParams) (uint64, []types.Certificate, error)
GetCertificatesFiltered gets certificates filtered.
func (Keeper) GetCertifiedIdentities ¶
func (k Keeper) GetCertifiedIdentities(ctx context.Context) []sdk.AccAddress
GetCertifiedIdentities returns a list of addresses certified as identities.
func (Keeper) GetCertifier ¶
func (k Keeper) GetCertifier(ctx context.Context, certifierAddress sdk.AccAddress) (types.Certifier, error)
GetCertifier returns the certification information for a certifier.
func (Keeper) GetCertifierByAlias ¶
GetCertifierByAlias returns the certification information for a certifier by its alias.
func (Keeper) GetNextCertificateID ¶
GetNextCertificateID gets the next certificate ID from store.
func (Keeper) GetPlatform ¶
GetPlatform returns the host platform of the validator.
func (Keeper) HasCertificateByID ¶
HasCertificateByID checks if a certificate exists given an ID.
func (Keeper) HasCertifierAlias ¶
HasCertifierAlias checks if the alias of a certifier exists.
func (Keeper) InvalidateLibrary ¶
func (k Keeper) InvalidateLibrary(ctx sdk.Context, library sdk.AccAddress, invalidator sdk.AccAddress) error
InvalidateLibrary invalidate a Certificate library.
func (Keeper) IsBountyAdmin ¶ added in v2.9.0
IsBountyAdmin checks if an address is a bounty admin.
func (Keeper) IsCertified ¶
IsCertified checks if a certificate of given type and content exists.
func (Keeper) IsCertifier ¶
IsCertifier checks if an address is a certifier.
func (Keeper) IsContentCertified ¶
IsContentCertified checks if a certificate of given content exists.
func (Keeper) IssueCertificate ¶
IssueCertificate issues a certificate.
func (Keeper) IterateAllCertificate ¶
func (k Keeper) IterateAllCertificate(ctx context.Context, callback func(certificate types.Certificate) (stop bool))
IterateAllCertificate iterates over the all the stored certificates and performs a callback function.
func (Keeper) IterateAllCertifiers ¶
func (k Keeper) IterateAllCertifiers(ctx context.Context, callback func(certifier types.Certifier) (stop bool))
IterateAllCertifiers iterates over the all the stored certifiers and performs a callback function.
func (Keeper) IterateAllLibraries ¶
func (k Keeper) IterateAllLibraries(ctx sdk.Context, callback func(library types.Library) (stop bool))
IterateAllLibraries iterates over the all the stored libraries and performs a callback function.
func (Keeper) PublishLibrary ¶
func (k Keeper) PublishLibrary(ctx sdk.Context, library sdk.AccAddress, publisher sdk.AccAddress) error
PublishLibrary publishes a new Certificate library.
func (Keeper) RevokeCertificate ¶
func (k Keeper) RevokeCertificate(ctx context.Context, certificate types.Certificate, revoker sdk.AccAddress) error
RevokeCertificate revokes a certificate.
func (Keeper) SetCertificate ¶
SetCertificate stores a certificate using its ID field.
func (Keeper) SetCertifier ¶
SetCertifier sets a certifier.
func (Keeper) SetLibrary ¶
func (k Keeper) SetLibrary(ctx sdk.Context, library sdk.AccAddress, publisher sdk.AccAddress) error
SetLibrary sets a new Certificate library registry.
type Migrator ¶ added in v2.8.0
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func NewMigrator ¶ added in v2.8.0
NewMigrator returns a new Migrator.
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) AddrConversion ¶ added in v2.9.0
func (q Querier) AddrConversion(c context.Context, req *types.ConversionToShentuAddrRequest) (*types.ConversionToShentuAddrResponse, error)
func (Querier) Certificate ¶
func (q Querier) Certificate(c context.Context, req *types.QueryCertificateRequest) (*types.QueryCertificateResponse, error)
func (Querier) Certificates ¶
func (q Querier) Certificates(c context.Context, req *types.QueryCertificatesRequest) (*types.QueryCertificatesResponse, error)
func (Querier) Certifier ¶
func (q Querier) Certifier(c context.Context, req *types.QueryCertifierRequest) (*types.QueryCertifierResponse, error)
Certifier queries a certifier given its address or alias.
func (Querier) Certifiers ¶
func (q Querier) Certifiers(c context.Context, req *types.QueryCertifiersRequest) (*types.QueryCertifiersResponse, error)
Certifiers queries all certifiers.
func (Querier) Platform ¶
func (q Querier) Platform(c context.Context, req *types.QueryPlatformRequest) (*types.QueryPlatformResponse, error)