types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeSetRecord = "setRecord"

	AttributeValueCategory = ModuleName
)

tombstone module event types

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "tombstone"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for routing msgs
	RouterKey = ModuleName

	// QuerierRoute to be used for querierer msgs
	QuerierRoute = ModuleName

	// LayoutDate Time format
	LayoutDate = "01/02/2006"

	// MemoMaxLength max length of memo
	MemoMaxLength = 140
)
View Source
const (
	QueryRecord      = "Record"
	QueryAllRecord   = "Records"
	QueryAllRecorder = "Recorder"
)

Query endpoints supported by the tombstone querier

View Source
const (
	DefaultParamspace = ModuleName
)

Default parameter namespace

View Source
const RecordConst = "Record"

Variables

View Source
var (
	ErrNotFound = sdkerrors.Register(ModuleName, 1, "Not Found")
)
View Source
var ModuleCdc *codec.Codec

ModuleCdc defines the module codec

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable for tombstone module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates the tombstone genesis parameters

Types

type GenesisState

type GenesisState struct {
}

GenesisState - all tombstone state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState - default GenesisState used by Cosmos Hub

func NewGenesisState

func NewGenesisState() GenesisState

NewGenesisState creates a new GenesisState object

type MsgSetRecord

type MsgSetRecord struct {
	Name string    `json:"name"`
	Born time.Time `json:"born"`
	Died time.Time `json:"died"`
	Memo string    `json:"memo"`
	Tags []string  `json:"tags"`

	Recorder sdk.AccAddress `json:"recorder"`
}

MsgSetRecord - struct for people be remembered

func NewMsgSetRecord

func NewMsgSetRecord(name string, born, died time.Time, memo string, tags []string, recorder sdk.AccAddress) MsgSetRecord

NewMsgSetRecord creates a new MsgSetRecord instance

func (MsgSetRecord) GetSignBytes

func (msg MsgSetRecord) GetSignBytes() []byte

GetSignBytes gets the bytes for the message signer to sign on

func (MsgSetRecord) GetSigners

func (msg MsgSetRecord) GetSigners() []sdk.AccAddress

func (MsgSetRecord) Route

func (msg MsgSetRecord) Route() string

nolint

func (MsgSetRecord) Type

func (msg MsgSetRecord) Type() string

func (MsgSetRecord) ValidateBasic

func (msg MsgSetRecord) ValidateBasic() error

ValidateBasic validity check for the AnteHandler

type Note

type Note struct {
	Records  []Record       `json:"records"`
	Recorder sdk.AccAddress `json:"recorder"`
}

Note have many record

type ParamSubspace

type ParamSubspace interface {
	WithKeyTable(table params.KeyTable) params.Subspace
	Get(ctx sdk.Context, key []byte, ptr interface{})
	GetParamSet(ctx sdk.Context, ps params.ParamSet)
	SetParamSet(ctx sdk.Context, ps params.ParamSet)
}

ParamSubspace defines the expected Subspace interfacace

type Params

type Params struct {
}

Params - used for initializing default parameter for tombstone at genesis

func DefaultParams

func DefaultParams() Params

DefaultParams defines the parameters for this module

func NewParams

func NewParams() Params

NewParams creates a new Params object

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs - Implements params.ParamSet

func (Params) String

func (p Params) String() string

String implements the stringer interface for Params

type QueryAllNoteRes

type QueryAllNoteRes []Note

type QueryRecordRes

type QueryRecordRes Note

type QueryRecorderRes

type QueryRecorderRes []sdk.AccAddress

type Record

type Record struct {
	Name string    `json:"name"`
	Born time.Time `json:"born"`
	Died time.Time `json:"died"`
	Memo string    `json:"memo"`
	Tags []string  `json:"tags"`
}

Record people who will be remembered

func (Record) String

func (r Record) String() string

Jump to

Keyboard shortcuts

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