account

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package account contains request verifiers used to interact with accounts in the starname module

Index

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

func NewController(ctx sdk.Context, k keeper.Keeper, domain, name string) *Account

NewController is Account constructor

func (*Account) Account

func (a *Account) Account() types.Account

Account returns the cached account, if the account existence was not asserted before, it panics.

func (*Account) CertificateExists added in v0.9.1

func (a *Account) CertificateExists(cert []byte, certIndex *int) *Account

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

func (a *Account) CertificateLimitNotExceeded() *Account

CertificateLimitNotExceeded asserts that the numbers of certificates in an account was not exceeded

func (*Account) CertificateNotExist added in v0.9.1

func (a *Account) CertificateNotExist(cert []byte) *Account

CertificateNotExist asserts the provided certificate does not exist in the account already

func (*Account) CertificateSizeNotExceeded added in v0.9.1

func (a *Account) CertificateSizeNotExceeded(cert []byte) *Account

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

func (a *Account) MetadataSizeNotExceeded(metadata string) *Account

MetadataSizeNotExceeded asserts that the metadata size of an account was not exceeded

func (*Account) MustExist added in v0.9.1

func (a *Account) MustExist() *Account

MustExist asserts that the given account exists

func (*Account) MustNotExist added in v0.9.1

func (a *Account) MustNotExist() *Account

MustNotExist asserts that the given account does not exist

func (*Account) NotExpired added in v0.9.1

func (a *Account) NotExpired() *Account

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) Renewable added in v0.9.1

func (a *Account) Renewable() *Account

Renewable asserts that the account is renewable

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

func (a *Account) ResourceLimitNotExceeded(resources []types.Resource) *Account

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) ValidName added in v0.9.1

func (a *Account) ValidName() *Account

ValidName asserts the account name is valid

func (*Account) ValidResources added in v0.9.1

func (a *Account) ValidResources(resources []types.Resource) *Account

ValidResources verifies that the provided resources are valid for the account

func (*Account) Validate

func (a *Account) Validate() error

Validate verifies the account against the order of provided controllers

func (*Account) WithAccount

func (a *Account) WithAccount(acc types.Account) *Account

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

func (*Account) WithDomainController

func (a *Account) WithDomainController(dom *domain.Domain) *Account

WithDomainController allows to specify a cached domain controller

Jump to

Keyboard shortcuts

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