Documentation
¶
Overview ¶
Package account contains request verifiers used to interact with accounts in the starname module
Index ¶
- type Account
- func (a *Account) Account() types.Account
- func (a *Account) CertificateExists(cert []byte, certIndex *int) *Account
- func (a *Account) CertificateLimitNotExceeded() *Account
- func (a *Account) CertificateNotExist(cert []byte) *Account
- func (a *Account) CertificateSizeNotExceeded(cert []byte) *Account
- func (a *Account) DeletableBy(addr sdk.AccAddress) *Account
- func (a *Account) MetadataSizeNotExceeded(metadata string) *Account
- func (a *Account) MustExist() *Account
- func (a *Account) MustNotExist() *Account
- func (a *Account) NotExpired() *Account
- func (a *Account) OwnedBy(addr sdk.AccAddress) *Account
- func (a *Account) RegistrableBy(addr sdk.AccAddress) *Account
- func (a *Account) Renewable() *Account
- func (a *Account) ResettableBy(addr sdk.AccAddress, reset bool) *Account
- func (a *Account) ResourceLimitNotExceeded(resources []types.Resource) *Account
- func (a *Account) TransferableBy(addr sdk.AccAddress) *Account
- func (a *Account) ValidName() *Account
- func (a *Account) ValidResources(resources []types.Resource) *Account
- func (a *Account) Validate() error
- func (a *Account) WithAccount(acc types.Account) *Account
- func (a *Account) WithConfiguration(cfg configuration.Config) *Account
- func (a *Account) WithDomainController(dom *domain.Domain) *Account
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Account is an account controller, it caches information in order to avoid useless query to state to get the same information. Order of execution of controllers matters if the correct order is not followed the controller will panic because of bad operation flow. Errors returned are wrapped sdk.Error types.
func NewController ¶
NewController is Account constructor
func (*Account) Account ¶
Account returns the cached account, if the account existence was not asserted before, it panics.
func (*Account) CertificateExists ¶ added in v0.9.1
CertificateExists asserts that the provided certificate exists and if it does the index is saved in the provided pointer if certIndex pointer is nil the certificate index will not be saved
func (*Account) CertificateLimitNotExceeded ¶ added in v0.9.1
CertificateLimitNotExceeded asserts that the numbers of certificates in an account was not exceeded
func (*Account) CertificateNotExist ¶ added in v0.9.1
CertificateNotExist asserts the provided certificate does not exist in the account already
func (*Account) CertificateSizeNotExceeded ¶ added in v0.9.1
CertificateSizeNotExceeded asserts that the size of a cert is not beyond the limits
func (*Account) DeletableBy ¶ added in v0.9.1
func (a *Account) DeletableBy(addr sdk.AccAddress) *Account
DeletableBy checks if the account can be deleted by the provided address
func (*Account) MetadataSizeNotExceeded ¶ added in v0.9.1
MetadataSizeNotExceeded asserts that the metadata size of an account was not exceeded
func (*Account) MustNotExist ¶ added in v0.9.1
MustNotExist asserts that the given account does not exist
func (*Account) NotExpired ¶ added in v0.9.1
NotExpired asserts the account is not expired
func (*Account) OwnedBy ¶ added in v0.9.1
func (a *Account) OwnedBy(addr sdk.AccAddress) *Account
OwnedBy asserts that the account is owned by the provided address
func (*Account) RegistrableBy ¶ added in v0.9.1
func (a *Account) RegistrableBy(addr sdk.AccAddress) *Account
RegistrableBy asserts that an account can be registered by the provided address
func (*Account) ResettableBy ¶ added in v0.9.1
func (a *Account) ResettableBy(addr sdk.AccAddress, reset bool) *Account
ResettableBy checks if the account attributes resettable by the provided address
func (*Account) ResourceLimitNotExceeded ¶ added in v0.9.1
ResettableBy checks if the account attributes resettable by the provided address
func (*Account) TransferableBy ¶ added in v0.9.1
func (a *Account) TransferableBy(addr sdk.AccAddress) *Account
TransferableBy checks if the account can be transferred by the provided address
func (*Account) ValidResources ¶ added in v0.9.1
ValidResources verifies that the provided resources are valid for the account
func (*Account) WithAccount ¶
WithAccount allows to specify a cached account
func (*Account) WithConfiguration ¶
func (a *Account) WithConfiguration(cfg configuration.Config) *Account
WithConfiguration allows to specify a cached config