types

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

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

	// 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

	FlagCerberusAddr = "cerberus-addr"
)

Variables

View Source
var (
	StorePrefix = []byte{0x00} // prefix for keys that store balance
	IndexPrefix = []byte{0x01} // prefix for index keys
)

Key prefixes

View Source
var ModuleCdc = codec.New()

ModuleCdc is the codec for the module

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec

Types

type MsgCreatePDV

type MsgCreatePDV struct {
	Timestamp uint64         `json:"timestamp"`
	Address   string         `json:"address"`
	Owner     sdk.AccAddress `json:"owner"`
	DataType  PDVType        `json:"type"`
}

MsgCreatePDV defines a CreatePDV message

func NewMsgCreatePDV

func NewMsgCreatePDV(timestamp uint64, value string, dataType PDVType, owner sdk.AccAddress) MsgCreatePDV

NewMsgCreatePDV is a constructor function for MsgCreatePDV

func (MsgCreatePDV) GetSignBytes

func (msg MsgCreatePDV) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgCreatePDV) GetSigners

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

GetSigners defines whose signature is required

func (MsgCreatePDV) Route

func (msg MsgCreatePDV) Route() string

Route should return the name of the module

func (MsgCreatePDV) Type

func (msg MsgCreatePDV) Type() string

Type should return the action

func (MsgCreatePDV) ValidateBasic

func (msg MsgCreatePDV) ValidateBasic() error

ValidateBasic runs stateless checks on the message

type PDV

type PDV struct {
	Timestamp uint64         `json:"timestamp"`
	Address   string         `json:"address"`
	Owner     sdk.AccAddress `json:"owner"`
	Type      PDVType        `json:"type"`
}

func (PDV) String

func (w PDV) String() string

implement fmt.Stringer

type PDVType

type PDVType int
const (
	PDVTypeCookie PDVType = iota + 1
	PDVTypeLoginCookie
)

Jump to

Keyboard shortcuts

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