Documentation ¶
Index ¶
- Constants
- func ErrInvalidProfilerName(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrProfilerExists(codespace sdk.CodespaceType, profiler sdk.AccAddress) sdk.Error
- func ErrProfilerNotExists(codespace sdk.CodespaceType, profiler sdk.AccAddress) sdk.Error
- func GetProfilerKey(addr sdk.AccAddress) []byte
- func GetProfilersSubspaceKey() []byte
- func GetTrusteeKey(addr sdk.AccAddress) []byte
- func GetTrusteesSubspaceKey() []byte
- func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
- func NewHandler(k Keeper) sdk.Handler
- func ProfilerEqual(profilerA, profilerB Profiler) bool
- func RegisterCodec(cdc *codec.Codec)
- func TrusteeEqual(trusteeA, trusteeB Trustee) bool
- type GenesisState
- type Keeper
- func (k Keeper) AddProfiler(ctx sdk.Context, profiler Profiler) sdk.Error
- func (k Keeper) AddTrustee(ctx sdk.Context, trustee Trustee) sdk.Error
- func (k Keeper) GetProfiler(ctx sdk.Context, addr sdk.AccAddress) (profiler Profiler, found bool)
- func (k Keeper) GetProfilers(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetTrustee(ctx sdk.Context, addr sdk.AccAddress) (trustee Trustee, found bool)
- func (k Keeper) GetTrustees(ctx sdk.Context) sdk.Iterator
- type MsgAddProfiler
- type Profiler
- type Trustee
Constants ¶
View Source
const ( DefaultCodespace sdk.CodespaceType = "guardian" CodeProfilerExists sdk.CodeType = 100 CodeProfilerNotExists sdk.CodeType = 101 CodeInvalidProfilerName sdk.CodeType = 102 )
View Source
const MsgType = "guardian"
Variables ¶
This section is empty.
Functions ¶
func ErrInvalidProfilerName ¶
func ErrInvalidProfilerName(codespace sdk.CodespaceType, msg string) sdk.Error
func ErrProfilerExists ¶
func ErrProfilerExists(codespace sdk.CodespaceType, profiler sdk.AccAddress) sdk.Error
func ErrProfilerNotExists ¶
func ErrProfilerNotExists(codespace sdk.CodespaceType, profiler sdk.AccAddress) sdk.Error
func GetProfilerKey ¶
func GetProfilerKey(addr sdk.AccAddress) []byte
func GetProfilersSubspaceKey ¶
func GetProfilersSubspaceKey() []byte
Key for getting all profilers from the store
func GetTrusteeKey ¶
func GetTrusteeKey(addr sdk.AccAddress) []byte
func GetTrusteesSubspaceKey ¶
func GetTrusteesSubspaceKey() []byte
Key for getting all profilers from the store
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
func ProfilerEqual ¶
func TrusteeEqual ¶
Types ¶
type GenesisState ¶
type GenesisState struct { Profilers []Profiler `json:"profilers"` Trustees []Trustee `json:"trustees"` }
GenesisState - all guardian state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
get raw genesis raw message for testing
func DefaultGenesisStateForTest ¶
func DefaultGenesisStateForTest() GenesisState
get raw genesis raw message for testing
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
func NewGenesisState ¶
func NewGenesisState(profilers []Profiler, trustees []Trustee) GenesisState
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) AddProfiler ¶
Add a profiler, only a existing profiler can add a new and the profiler is not existed
func (Keeper) AddTrustee ¶
Add a trustee
func (Keeper) GetProfiler ¶
func (Keeper) GetProfilers ¶
Gets all profilers
func (Keeper) GetTrustee ¶
type MsgAddProfiler ¶
type MsgAddProfiler struct {
Profiler
}
______________________________________________________________________ MsgAddProfiler - struct for add a profiler
func NewMsgAddProfiler ¶
func NewMsgAddProfiler(addr, addedAddr sdk.AccAddress, name string) MsgAddProfiler
func (MsgAddProfiler) GetSignBytes ¶
func (msg MsgAddProfiler) GetSignBytes() []byte
func (MsgAddProfiler) GetSigners ¶
func (msg MsgAddProfiler) GetSigners() []sdk.AccAddress
func (MsgAddProfiler) Route ¶
func (msg MsgAddProfiler) Route() string
func (MsgAddProfiler) Type ¶
func (msg MsgAddProfiler) Type() string
func (MsgAddProfiler) ValidateBasic ¶
func (msg MsgAddProfiler) ValidateBasic() sdk.Error
type Profiler ¶
type Profiler struct { Name string `json:"name"` Addr sdk.AccAddress `json:"addr"` AddedAddr sdk.AccAddress `json:"added_addr"` }
func NewProfiler ¶
func NewProfiler(addr, addedAddr sdk.AccAddress) Profiler
type Trustee ¶
type Trustee struct {
Addr sdk.AccAddress `json:"addr"`
}
func NewTrustee ¶
func NewTrustee(addr sdk.AccAddress) Trustee
Source Files ¶
Click to show internal directories.
Click to hide internal directories.