guardian

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Genesis  = types.Genesis
	Ordinary = types.Ordinary

	ModuleName     = types.ModuleName
	RouterKey      = types.RouterKey
	QuerierRoute   = types.QuerierRoute
	QueryProfilers = types.QueryProfilers
	StoreKey       = types.StoreKey
)

Variables

View Source
var (
	NewMsgAddProfiler       = types.NewMsgAddProfiler
	NewMsgDeleteProfiler    = types.NewMsgDeleteProfiler
	NewGuardian             = types.NewGuardian
	GetProfilerKey          = types.GetProfilerKey
	GetProfilersSubspaceKey = types.GetProfilersSubspaceKey

	ErrInvalidOperator       = types.ErrInvalidOperator
	ErrProfilerNotExists     = types.ErrProfilerNotExists
	ErrDeleteGenesisProfiler = types.ErrDeleteGenesisProfiler
	ErrProfilerExists        = types.ErrProfilerExists
	ErrInvalidDescription    = types.ErrInvalidDescription
	ErrAddressEmpty          = types.ErrAddressEmpty
	ErrAddedByEmpty          = types.ErrAddedByEmpty
	ErrDeletedByEmpty        = types.ErrDeletedByEmpty
)

Functions

func AddGenesisGuardianCmd

func AddGenesisGuardianCmd(ctx *server.Context, cdc *codec.Codec, defaultNodeHome string) *cobra.Command

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)

func NewHandler

func NewHandler(k Keeper) sdk.Handler

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule implements an application module for the guardian module.

func NewAppModule

func NewAppModule(keeper Keeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (a AppModule) BeginBlock(sdk.Context, types.RequestBeginBlock)

BeginBlock returns the begin blocker for the guardian module.

func (AppModule) EndBlock

EndBlock returns the end blocker for the guardian module. It returns no validator updates.

func (AppModule) ExportGenesis

func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis returns the exported genesis state as raw bytes for the guardian module.

func (AppModule) InitGenesis

func (a AppModule) InitGenesis(ctx sdk.Context, d json.RawMessage) []types.ValidatorUpdate

InitGenesis performs genesis initialization for the guardian module. It returns no validator updates.

func (AppModule) NewHandler

func (a AppModule) NewHandler() sdk.Handler

NewHandler returns an sdk.Handler for the guardian module.

func (AppModule) NewQuerierHandler

func (a AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns no sdk.Querier.

func (AppModule) QuerierRoute

func (a AppModule) QuerierRoute() string

QuerierRoute returns the guardian module's querier route name.

func (AppModule) RegisterInvariants

func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)

RegisterInvariants registers module invariants

func (AppModule) Route

func (a AppModule) Route() string

Route returns the message routing key for the guardian module.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic defines the basic application module used by the guardian module.

func (AppModuleBasic) DefaultGenesis

func (a AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns default genesis state as raw bytes for the guardian module.

func (AppModuleBasic) GetQueryCmd

func (a AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

GetQueryCmd returns the root query command for the guardian module.

func (AppModuleBasic) GetTxCmd

func (a AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

GetTxCmd returns the root tx command

func (AppModuleBasic) Name

func (a AppModuleBasic) Name() string

Name returns the guardian module's name.

func (AppModuleBasic) RegisterCodec

func (a AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec registers the guardian module's types for the given codec.

func (AppModuleBasic) RegisterRESTRoutes

func (a AppModuleBasic) RegisterRESTRoutes(context.CLIContext, *mux.Router)

RegisterRESTRoutes registers the REST routes

func (AppModuleBasic) ValidateGenesis

func (a AppModuleBasic) ValidateGenesis(d json.RawMessage) error

ValidateGenesis performs genesis state validation

type GenesisState

type GenesisState struct {
	Profilers []types.Guardian `json:"profilers"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState

func NewGenesisState

func NewGenesisState(profilers []types.Guardian) GenesisState

func (GenesisState) Contains

func (gs GenesisState) Contains(addr sdk.Address) bool

type Guardian

type Guardian = types.Guardian

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper defines the guardian store

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey) Keeper

NewKeeper creates a new guardian Keeper instance

func (Keeper) AddProfiler

func (k Keeper) AddProfiler(ctx sdk.Context, guardian Guardian) error

func (Keeper) DeleteProfiler

func (k Keeper) DeleteProfiler(ctx sdk.Context, address sdk.AccAddress) error

func (Keeper) GetProfiler

func (k Keeper) GetProfiler(ctx sdk.Context, addr sdk.AccAddress) (guardian Guardian, found bool)

func (Keeper) ProfilersIterator

func (k Keeper) ProfilersIterator(ctx sdk.Context) sdk.Iterator

type MsgAddProfiler

type MsgAddProfiler = types.MsgAddProfiler

type MsgDeleteProfiler

type MsgDeleteProfiler = types.MsgDeleteProfiler

type Profilers

type Profilers = types.Profilers

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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