types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "blocktime"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName
)

Variables

View Source
var (
	ErrInvalidLengthBlocktime        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBlocktime          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBlocktime = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrNonpositiveDuration = errorsmod.Register(
		ModuleName,
		400,
		"Durations must be positive",
	)
	ErrUnorderedDurations = errorsmod.Register(
		ModuleName,
		401,
		"Durations must be in ascending order by length",
	)
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AllDowntimeInfo

type AllDowntimeInfo struct {
	// The downtime information for each tracked duration. Sorted by duration,
	// ascending. (i.e. the same order as they appear in DowntimeParams).
	Infos []*AllDowntimeInfo_DowntimeInfo `protobuf:"bytes,1,rep,name=infos,proto3" json:"infos,omitempty"`
}

AllDowntimeInfo stores information for all downtime durations.

func (*AllDowntimeInfo) Descriptor

func (*AllDowntimeInfo) Descriptor() ([]byte, []int)

func (*AllDowntimeInfo) GetInfos

func (*AllDowntimeInfo) Marshal

func (m *AllDowntimeInfo) Marshal() (dAtA []byte, err error)

func (*AllDowntimeInfo) MarshalTo

func (m *AllDowntimeInfo) MarshalTo(dAtA []byte) (int, error)

func (*AllDowntimeInfo) MarshalToSizedBuffer

func (m *AllDowntimeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AllDowntimeInfo) ProtoMessage

func (*AllDowntimeInfo) ProtoMessage()

func (*AllDowntimeInfo) Reset

func (m *AllDowntimeInfo) Reset()

func (*AllDowntimeInfo) Size

func (m *AllDowntimeInfo) Size() (n int)

func (*AllDowntimeInfo) String

func (m *AllDowntimeInfo) String() string

func (*AllDowntimeInfo) Unmarshal

func (m *AllDowntimeInfo) Unmarshal(dAtA []byte) error

func (*AllDowntimeInfo) XXX_DiscardUnknown

func (m *AllDowntimeInfo) XXX_DiscardUnknown()

func (*AllDowntimeInfo) XXX_Marshal

func (m *AllDowntimeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AllDowntimeInfo) XXX_Merge

func (m *AllDowntimeInfo) XXX_Merge(src proto.Message)

func (*AllDowntimeInfo) XXX_Size

func (m *AllDowntimeInfo) XXX_Size() int

func (*AllDowntimeInfo) XXX_Unmarshal

func (m *AllDowntimeInfo) XXX_Unmarshal(b []byte) error

type AllDowntimeInfo_DowntimeInfo

type AllDowntimeInfo_DowntimeInfo struct {
	Duration  time.Duration `protobuf:"bytes,1,opt,name=duration,proto3,stdduration" json:"duration"`
	BlockInfo BlockInfo     `protobuf:"bytes,2,opt,name=block_info,json=blockInfo,proto3" json:"block_info"`
}

Stores information about downtime. block_info corresponds to the most recent block at which a downtime occurred.

func (*AllDowntimeInfo_DowntimeInfo) Descriptor

func (*AllDowntimeInfo_DowntimeInfo) Descriptor() ([]byte, []int)

func (*AllDowntimeInfo_DowntimeInfo) GetBlockInfo

func (m *AllDowntimeInfo_DowntimeInfo) GetBlockInfo() BlockInfo

func (*AllDowntimeInfo_DowntimeInfo) GetDuration

func (m *AllDowntimeInfo_DowntimeInfo) GetDuration() time.Duration

func (*AllDowntimeInfo_DowntimeInfo) Marshal

func (m *AllDowntimeInfo_DowntimeInfo) Marshal() (dAtA []byte, err error)

func (*AllDowntimeInfo_DowntimeInfo) MarshalTo

func (m *AllDowntimeInfo_DowntimeInfo) MarshalTo(dAtA []byte) (int, error)

func (*AllDowntimeInfo_DowntimeInfo) MarshalToSizedBuffer

func (m *AllDowntimeInfo_DowntimeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AllDowntimeInfo_DowntimeInfo) ProtoMessage

func (*AllDowntimeInfo_DowntimeInfo) ProtoMessage()

func (*AllDowntimeInfo_DowntimeInfo) Reset

func (m *AllDowntimeInfo_DowntimeInfo) Reset()

func (*AllDowntimeInfo_DowntimeInfo) Size

func (m *AllDowntimeInfo_DowntimeInfo) Size() (n int)

func (*AllDowntimeInfo_DowntimeInfo) String

func (*AllDowntimeInfo_DowntimeInfo) Unmarshal

func (m *AllDowntimeInfo_DowntimeInfo) Unmarshal(dAtA []byte) error

func (*AllDowntimeInfo_DowntimeInfo) XXX_DiscardUnknown

func (m *AllDowntimeInfo_DowntimeInfo) XXX_DiscardUnknown()

func (*AllDowntimeInfo_DowntimeInfo) XXX_Marshal

func (m *AllDowntimeInfo_DowntimeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AllDowntimeInfo_DowntimeInfo) XXX_Merge

func (m *AllDowntimeInfo_DowntimeInfo) XXX_Merge(src proto.Message)

func (*AllDowntimeInfo_DowntimeInfo) XXX_Size

func (m *AllDowntimeInfo_DowntimeInfo) XXX_Size() int

func (*AllDowntimeInfo_DowntimeInfo) XXX_Unmarshal

func (m *AllDowntimeInfo_DowntimeInfo) XXX_Unmarshal(b []byte) error

type BlockInfo

type BlockInfo struct {
	Height    uint32    `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	Timestamp time.Time `protobuf:"bytes,2,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
}

BlockInfo stores information about a block

func (*BlockInfo) Descriptor

func (*BlockInfo) Descriptor() ([]byte, []int)

func (*BlockInfo) GetHeight

func (m *BlockInfo) GetHeight() uint32

func (*BlockInfo) GetTimestamp

func (m *BlockInfo) GetTimestamp() time.Time

func (*BlockInfo) Marshal

func (m *BlockInfo) Marshal() (dAtA []byte, err error)

func (*BlockInfo) MarshalTo

func (m *BlockInfo) MarshalTo(dAtA []byte) (int, error)

func (*BlockInfo) MarshalToSizedBuffer

func (m *BlockInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BlockInfo) ProtoMessage

func (*BlockInfo) ProtoMessage()

func (*BlockInfo) Reset

func (m *BlockInfo) Reset()

func (*BlockInfo) Size

func (m *BlockInfo) Size() (n int)

func (*BlockInfo) String

func (m *BlockInfo) String() string

func (*BlockInfo) Unmarshal

func (m *BlockInfo) Unmarshal(dAtA []byte) error

func (*BlockInfo) XXX_DiscardUnknown

func (m *BlockInfo) XXX_DiscardUnknown()

func (*BlockInfo) XXX_Marshal

func (m *BlockInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockInfo) XXX_Merge

func (m *BlockInfo) XXX_Merge(src proto.Message)

func (*BlockInfo) XXX_Size

func (m *BlockInfo) XXX_Size() int

func (*BlockInfo) XXX_Unmarshal

func (m *BlockInfo) XXX_Unmarshal(b []byte) error

type DowntimeParams

type DowntimeParams struct {
	// Durations tracked for downtime. The durations must be sorted from
	// shortest to longest and must all be positive.
	Durations []time.Duration `protobuf:"bytes,1,rep,name=durations,proto3,stdduration" json:"durations"`
	// Grace-period duration when validating `MsgIsDelayedBlock` messages. Must be
	// positive.
	ClockDriftGracePeriodDuration time.Duration `` /* 156-byte string literal not displayed */
}

DowntimeParams defines the parameters for downtime.

func (*DowntimeParams) Descriptor

func (*DowntimeParams) Descriptor() ([]byte, []int)

func (*DowntimeParams) GetClockDriftGracePeriodDuration

func (m *DowntimeParams) GetClockDriftGracePeriodDuration() time.Duration

func (*DowntimeParams) GetDurations

func (m *DowntimeParams) GetDurations() []time.Duration

func (*DowntimeParams) Marshal

func (m *DowntimeParams) Marshal() (dAtA []byte, err error)

func (*DowntimeParams) MarshalTo

func (m *DowntimeParams) MarshalTo(dAtA []byte) (int, error)

func (*DowntimeParams) MarshalToSizedBuffer

func (m *DowntimeParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DowntimeParams) ProtoMessage

func (*DowntimeParams) ProtoMessage()

func (*DowntimeParams) Reset

func (m *DowntimeParams) Reset()

func (*DowntimeParams) Size

func (m *DowntimeParams) Size() (n int)

func (*DowntimeParams) String

func (m *DowntimeParams) String() string

func (*DowntimeParams) Unmarshal

func (m *DowntimeParams) Unmarshal(dAtA []byte) error

func (*DowntimeParams) Validate

func (m *DowntimeParams) Validate() error

func (*DowntimeParams) XXX_DiscardUnknown

func (m *DowntimeParams) XXX_DiscardUnknown()

func (*DowntimeParams) XXX_Marshal

func (m *DowntimeParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DowntimeParams) XXX_Merge

func (m *DowntimeParams) XXX_Merge(src proto.Message)

func (*DowntimeParams) XXX_Size

func (m *DowntimeParams) XXX_Size() int

func (*DowntimeParams) XXX_Unmarshal

func (m *DowntimeParams) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	Params DowntimeParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the blocktime module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default blocktime genesis state.

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() DowntimeParams

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// UpdateDowntimeParams updates the DowntimeParams in state.
	UpdateDowntimeParams(ctx context.Context, in *MsgUpdateDowntimeParams, opts ...grpc.CallOption) (*MsgUpdateDowntimeParamsResponse, error)
	// IsDelayedBlock indicates a significant difference between wall time and the
	// time of the proposed block.
	IsDelayedBlock(ctx context.Context, in *MsgIsDelayedBlock, opts ...grpc.CallOption) (*MsgIsDelayedBlockResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgIsDelayedBlock

type MsgIsDelayedBlock struct {
	// The duration that the block is delayed by.
	// This value could possibly be negative in rare cases.
	DelayDuration time.Duration `protobuf:"bytes,1,opt,name=delay_duration,json=delayDuration,proto3,stdduration" json:"delay_duration"`
}

MsgIsDelayedBlock is the Msg/IsDelayedBlock request type.

func (*MsgIsDelayedBlock) Descriptor

func (*MsgIsDelayedBlock) Descriptor() ([]byte, []int)

func (*MsgIsDelayedBlock) GetDelayDuration

func (m *MsgIsDelayedBlock) GetDelayDuration() time.Duration

func (*MsgIsDelayedBlock) GetSigners

func (msg *MsgIsDelayedBlock) GetSigners() []sdk.AccAddress

func (*MsgIsDelayedBlock) Marshal

func (m *MsgIsDelayedBlock) Marshal() (dAtA []byte, err error)

func (*MsgIsDelayedBlock) MarshalTo

func (m *MsgIsDelayedBlock) MarshalTo(dAtA []byte) (int, error)

func (*MsgIsDelayedBlock) MarshalToSizedBuffer

func (m *MsgIsDelayedBlock) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgIsDelayedBlock) ProtoMessage

func (*MsgIsDelayedBlock) ProtoMessage()

func (*MsgIsDelayedBlock) Reset

func (m *MsgIsDelayedBlock) Reset()

func (*MsgIsDelayedBlock) Size

func (m *MsgIsDelayedBlock) Size() (n int)

func (*MsgIsDelayedBlock) String

func (m *MsgIsDelayedBlock) String() string

func (*MsgIsDelayedBlock) Unmarshal

func (m *MsgIsDelayedBlock) Unmarshal(dAtA []byte) error

func (*MsgIsDelayedBlock) ValidateBasic

func (msg *MsgIsDelayedBlock) ValidateBasic() error

func (*MsgIsDelayedBlock) XXX_DiscardUnknown

func (m *MsgIsDelayedBlock) XXX_DiscardUnknown()

func (*MsgIsDelayedBlock) XXX_Marshal

func (m *MsgIsDelayedBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgIsDelayedBlock) XXX_Merge

func (m *MsgIsDelayedBlock) XXX_Merge(src proto.Message)

func (*MsgIsDelayedBlock) XXX_Size

func (m *MsgIsDelayedBlock) XXX_Size() int

func (*MsgIsDelayedBlock) XXX_Unmarshal

func (m *MsgIsDelayedBlock) XXX_Unmarshal(b []byte) error

type MsgIsDelayedBlockResponse

type MsgIsDelayedBlockResponse struct {
}

MsgIsDelayedBlock is the Msg/IsDelayedBlock response type.

func (*MsgIsDelayedBlockResponse) Descriptor

func (*MsgIsDelayedBlockResponse) Descriptor() ([]byte, []int)

func (*MsgIsDelayedBlockResponse) Marshal

func (m *MsgIsDelayedBlockResponse) Marshal() (dAtA []byte, err error)

func (*MsgIsDelayedBlockResponse) MarshalTo

func (m *MsgIsDelayedBlockResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgIsDelayedBlockResponse) MarshalToSizedBuffer

func (m *MsgIsDelayedBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgIsDelayedBlockResponse) ProtoMessage

func (*MsgIsDelayedBlockResponse) ProtoMessage()

func (*MsgIsDelayedBlockResponse) Reset

func (m *MsgIsDelayedBlockResponse) Reset()

func (*MsgIsDelayedBlockResponse) Size

func (m *MsgIsDelayedBlockResponse) Size() (n int)

func (*MsgIsDelayedBlockResponse) String

func (m *MsgIsDelayedBlockResponse) String() string

func (*MsgIsDelayedBlockResponse) Unmarshal

func (m *MsgIsDelayedBlockResponse) Unmarshal(dAtA []byte) error

func (*MsgIsDelayedBlockResponse) XXX_DiscardUnknown

func (m *MsgIsDelayedBlockResponse) XXX_DiscardUnknown()

func (*MsgIsDelayedBlockResponse) XXX_Marshal

func (m *MsgIsDelayedBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgIsDelayedBlockResponse) XXX_Merge

func (m *MsgIsDelayedBlockResponse) XXX_Merge(src proto.Message)

func (*MsgIsDelayedBlockResponse) XXX_Size

func (m *MsgIsDelayedBlockResponse) XXX_Size() int

func (*MsgIsDelayedBlockResponse) XXX_Unmarshal

func (m *MsgIsDelayedBlockResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// UpdateDowntimeParams updates the DowntimeParams in state.
	UpdateDowntimeParams(context.Context, *MsgUpdateDowntimeParams) (*MsgUpdateDowntimeParamsResponse, error)
	// IsDelayedBlock indicates a significant difference between wall time and the
	// time of the proposed block.
	IsDelayedBlock(context.Context, *MsgIsDelayedBlock) (*MsgIsDelayedBlockResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateDowntimeParams

type MsgUpdateDowntimeParams struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Defines the parameters to update. All parameters must be supplied.
	Params DowntimeParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateDowntimeParams is the Msg/UpdateDowntimeParams request type.

func (*MsgUpdateDowntimeParams) Descriptor

func (*MsgUpdateDowntimeParams) Descriptor() ([]byte, []int)

func (*MsgUpdateDowntimeParams) GetAuthority

func (m *MsgUpdateDowntimeParams) GetAuthority() string

func (*MsgUpdateDowntimeParams) GetParams

func (m *MsgUpdateDowntimeParams) GetParams() DowntimeParams

func (*MsgUpdateDowntimeParams) GetSigners

func (msg *MsgUpdateDowntimeParams) GetSigners() []sdk.AccAddress

func (*MsgUpdateDowntimeParams) Marshal

func (m *MsgUpdateDowntimeParams) Marshal() (dAtA []byte, err error)

func (*MsgUpdateDowntimeParams) MarshalTo

func (m *MsgUpdateDowntimeParams) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateDowntimeParams) MarshalToSizedBuffer

func (m *MsgUpdateDowntimeParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateDowntimeParams) ProtoMessage

func (*MsgUpdateDowntimeParams) ProtoMessage()

func (*MsgUpdateDowntimeParams) Reset

func (m *MsgUpdateDowntimeParams) Reset()

func (*MsgUpdateDowntimeParams) Size

func (m *MsgUpdateDowntimeParams) Size() (n int)

func (*MsgUpdateDowntimeParams) String

func (m *MsgUpdateDowntimeParams) String() string

func (*MsgUpdateDowntimeParams) Unmarshal

func (m *MsgUpdateDowntimeParams) Unmarshal(dAtA []byte) error

func (*MsgUpdateDowntimeParams) ValidateBasic

func (msg *MsgUpdateDowntimeParams) ValidateBasic() error

func (*MsgUpdateDowntimeParams) XXX_DiscardUnknown

func (m *MsgUpdateDowntimeParams) XXX_DiscardUnknown()

func (*MsgUpdateDowntimeParams) XXX_Marshal

func (m *MsgUpdateDowntimeParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateDowntimeParams) XXX_Merge

func (m *MsgUpdateDowntimeParams) XXX_Merge(src proto.Message)

func (*MsgUpdateDowntimeParams) XXX_Size

func (m *MsgUpdateDowntimeParams) XXX_Size() int

func (*MsgUpdateDowntimeParams) XXX_Unmarshal

func (m *MsgUpdateDowntimeParams) XXX_Unmarshal(b []byte) error

type MsgUpdateDowntimeParamsResponse

type MsgUpdateDowntimeParamsResponse struct {
}

MsgUpdateDowntimeParamsResponse is the Msg/UpdateDowntimeParams response type.

func (*MsgUpdateDowntimeParamsResponse) Descriptor

func (*MsgUpdateDowntimeParamsResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateDowntimeParamsResponse) Marshal

func (m *MsgUpdateDowntimeParamsResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateDowntimeParamsResponse) MarshalTo

func (m *MsgUpdateDowntimeParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateDowntimeParamsResponse) MarshalToSizedBuffer

func (m *MsgUpdateDowntimeParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateDowntimeParamsResponse) ProtoMessage

func (*MsgUpdateDowntimeParamsResponse) ProtoMessage()

func (*MsgUpdateDowntimeParamsResponse) Reset

func (*MsgUpdateDowntimeParamsResponse) Size

func (m *MsgUpdateDowntimeParamsResponse) Size() (n int)

func (*MsgUpdateDowntimeParamsResponse) String

func (*MsgUpdateDowntimeParamsResponse) Unmarshal

func (m *MsgUpdateDowntimeParamsResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateDowntimeParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateDowntimeParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateDowntimeParamsResponse) XXX_Marshal

func (m *MsgUpdateDowntimeParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateDowntimeParamsResponse) XXX_Merge

func (m *MsgUpdateDowntimeParamsResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateDowntimeParamsResponse) XXX_Size

func (m *MsgUpdateDowntimeParamsResponse) XXX_Size() int

func (*MsgUpdateDowntimeParamsResponse) XXX_Unmarshal

func (m *MsgUpdateDowntimeParamsResponse) XXX_Unmarshal(b []byte) error

type QueryAllDowntimeInfoRequest

type QueryAllDowntimeInfoRequest struct {
}

QueryAllDowntimeInfoRequest is a request type for the AllDowntimeInfo RPC method.

func (*QueryAllDowntimeInfoRequest) Descriptor

func (*QueryAllDowntimeInfoRequest) Descriptor() ([]byte, []int)

func (*QueryAllDowntimeInfoRequest) Marshal

func (m *QueryAllDowntimeInfoRequest) Marshal() (dAtA []byte, err error)

func (*QueryAllDowntimeInfoRequest) MarshalTo

func (m *QueryAllDowntimeInfoRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllDowntimeInfoRequest) MarshalToSizedBuffer

func (m *QueryAllDowntimeInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllDowntimeInfoRequest) ProtoMessage

func (*QueryAllDowntimeInfoRequest) ProtoMessage()

func (*QueryAllDowntimeInfoRequest) Reset

func (m *QueryAllDowntimeInfoRequest) Reset()

func (*QueryAllDowntimeInfoRequest) Size

func (m *QueryAllDowntimeInfoRequest) Size() (n int)

func (*QueryAllDowntimeInfoRequest) String

func (m *QueryAllDowntimeInfoRequest) String() string

func (*QueryAllDowntimeInfoRequest) Unmarshal

func (m *QueryAllDowntimeInfoRequest) Unmarshal(dAtA []byte) error

func (*QueryAllDowntimeInfoRequest) XXX_DiscardUnknown

func (m *QueryAllDowntimeInfoRequest) XXX_DiscardUnknown()

func (*QueryAllDowntimeInfoRequest) XXX_Marshal

func (m *QueryAllDowntimeInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllDowntimeInfoRequest) XXX_Merge

func (m *QueryAllDowntimeInfoRequest) XXX_Merge(src proto.Message)

func (*QueryAllDowntimeInfoRequest) XXX_Size

func (m *QueryAllDowntimeInfoRequest) XXX_Size() int

func (*QueryAllDowntimeInfoRequest) XXX_Unmarshal

func (m *QueryAllDowntimeInfoRequest) XXX_Unmarshal(b []byte) error

type QueryAllDowntimeInfoResponse

type QueryAllDowntimeInfoResponse struct {
	Info *AllDowntimeInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
}

QueryAllDowntimeInfoResponse is a request type for the AllDowntimeInfo RPC method.

func (*QueryAllDowntimeInfoResponse) Descriptor

func (*QueryAllDowntimeInfoResponse) Descriptor() ([]byte, []int)

func (*QueryAllDowntimeInfoResponse) GetInfo

func (*QueryAllDowntimeInfoResponse) Marshal

func (m *QueryAllDowntimeInfoResponse) Marshal() (dAtA []byte, err error)

func (*QueryAllDowntimeInfoResponse) MarshalTo

func (m *QueryAllDowntimeInfoResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllDowntimeInfoResponse) MarshalToSizedBuffer

func (m *QueryAllDowntimeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllDowntimeInfoResponse) ProtoMessage

func (*QueryAllDowntimeInfoResponse) ProtoMessage()

func (*QueryAllDowntimeInfoResponse) Reset

func (m *QueryAllDowntimeInfoResponse) Reset()

func (*QueryAllDowntimeInfoResponse) Size

func (m *QueryAllDowntimeInfoResponse) Size() (n int)

func (*QueryAllDowntimeInfoResponse) String

func (*QueryAllDowntimeInfoResponse) Unmarshal

func (m *QueryAllDowntimeInfoResponse) Unmarshal(dAtA []byte) error

func (*QueryAllDowntimeInfoResponse) XXX_DiscardUnknown

func (m *QueryAllDowntimeInfoResponse) XXX_DiscardUnknown()

func (*QueryAllDowntimeInfoResponse) XXX_Marshal

func (m *QueryAllDowntimeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllDowntimeInfoResponse) XXX_Merge

func (m *QueryAllDowntimeInfoResponse) XXX_Merge(src proto.Message)

func (*QueryAllDowntimeInfoResponse) XXX_Size

func (m *QueryAllDowntimeInfoResponse) XXX_Size() int

func (*QueryAllDowntimeInfoResponse) XXX_Unmarshal

func (m *QueryAllDowntimeInfoResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Queries the DowntimeParams.
	DowntimeParams(ctx context.Context, in *QueryDowntimeParamsRequest, opts ...grpc.CallOption) (*QueryDowntimeParamsResponse, error)
	// Queries the information of the previous block
	PreviousBlockInfo(ctx context.Context, in *QueryPreviousBlockInfoRequest, opts ...grpc.CallOption) (*QueryPreviousBlockInfoResponse, error)
	// Queries all recorded downtime info.
	AllDowntimeInfo(ctx context.Context, in *QueryAllDowntimeInfoRequest, opts ...grpc.CallOption) (*QueryAllDowntimeInfoResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryDowntimeParamsRequest

type QueryDowntimeParamsRequest struct {
}

QueryDowntimeParamsRequest is a request type for the DowntimeParams RPC method.

func (*QueryDowntimeParamsRequest) Descriptor

func (*QueryDowntimeParamsRequest) Descriptor() ([]byte, []int)

func (*QueryDowntimeParamsRequest) Marshal

func (m *QueryDowntimeParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryDowntimeParamsRequest) MarshalTo

func (m *QueryDowntimeParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryDowntimeParamsRequest) MarshalToSizedBuffer

func (m *QueryDowntimeParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDowntimeParamsRequest) ProtoMessage

func (*QueryDowntimeParamsRequest) ProtoMessage()

func (*QueryDowntimeParamsRequest) Reset

func (m *QueryDowntimeParamsRequest) Reset()

func (*QueryDowntimeParamsRequest) Size

func (m *QueryDowntimeParamsRequest) Size() (n int)

func (*QueryDowntimeParamsRequest) String

func (m *QueryDowntimeParamsRequest) String() string

func (*QueryDowntimeParamsRequest) Unmarshal

func (m *QueryDowntimeParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryDowntimeParamsRequest) XXX_DiscardUnknown

func (m *QueryDowntimeParamsRequest) XXX_DiscardUnknown()

func (*QueryDowntimeParamsRequest) XXX_Marshal

func (m *QueryDowntimeParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDowntimeParamsRequest) XXX_Merge

func (m *QueryDowntimeParamsRequest) XXX_Merge(src proto.Message)

func (*QueryDowntimeParamsRequest) XXX_Size

func (m *QueryDowntimeParamsRequest) XXX_Size() int

func (*QueryDowntimeParamsRequest) XXX_Unmarshal

func (m *QueryDowntimeParamsRequest) XXX_Unmarshal(b []byte) error

type QueryDowntimeParamsResponse

type QueryDowntimeParamsResponse struct {
	Params DowntimeParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryDowntimeParamsResponse is a response type for the DowntimeParams RPC method.

func (*QueryDowntimeParamsResponse) Descriptor

func (*QueryDowntimeParamsResponse) Descriptor() ([]byte, []int)

func (*QueryDowntimeParamsResponse) GetParams

func (*QueryDowntimeParamsResponse) Marshal

func (m *QueryDowntimeParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryDowntimeParamsResponse) MarshalTo

func (m *QueryDowntimeParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryDowntimeParamsResponse) MarshalToSizedBuffer

func (m *QueryDowntimeParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDowntimeParamsResponse) ProtoMessage

func (*QueryDowntimeParamsResponse) ProtoMessage()

func (*QueryDowntimeParamsResponse) Reset

func (m *QueryDowntimeParamsResponse) Reset()

func (*QueryDowntimeParamsResponse) Size

func (m *QueryDowntimeParamsResponse) Size() (n int)

func (*QueryDowntimeParamsResponse) String

func (m *QueryDowntimeParamsResponse) String() string

func (*QueryDowntimeParamsResponse) Unmarshal

func (m *QueryDowntimeParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryDowntimeParamsResponse) XXX_DiscardUnknown

func (m *QueryDowntimeParamsResponse) XXX_DiscardUnknown()

func (*QueryDowntimeParamsResponse) XXX_Marshal

func (m *QueryDowntimeParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDowntimeParamsResponse) XXX_Merge

func (m *QueryDowntimeParamsResponse) XXX_Merge(src proto.Message)

func (*QueryDowntimeParamsResponse) XXX_Size

func (m *QueryDowntimeParamsResponse) XXX_Size() int

func (*QueryDowntimeParamsResponse) XXX_Unmarshal

func (m *QueryDowntimeParamsResponse) XXX_Unmarshal(b []byte) error

type QueryPreviousBlockInfoRequest

type QueryPreviousBlockInfoRequest struct {
}

QueryPreviousBlockInfoRequest is a request type for the PreviousBlockInfo RPC method.

func (*QueryPreviousBlockInfoRequest) Descriptor

func (*QueryPreviousBlockInfoRequest) Descriptor() ([]byte, []int)

func (*QueryPreviousBlockInfoRequest) Marshal

func (m *QueryPreviousBlockInfoRequest) Marshal() (dAtA []byte, err error)

func (*QueryPreviousBlockInfoRequest) MarshalTo

func (m *QueryPreviousBlockInfoRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryPreviousBlockInfoRequest) MarshalToSizedBuffer

func (m *QueryPreviousBlockInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPreviousBlockInfoRequest) ProtoMessage

func (*QueryPreviousBlockInfoRequest) ProtoMessage()

func (*QueryPreviousBlockInfoRequest) Reset

func (m *QueryPreviousBlockInfoRequest) Reset()

func (*QueryPreviousBlockInfoRequest) Size

func (m *QueryPreviousBlockInfoRequest) Size() (n int)

func (*QueryPreviousBlockInfoRequest) String

func (*QueryPreviousBlockInfoRequest) Unmarshal

func (m *QueryPreviousBlockInfoRequest) Unmarshal(dAtA []byte) error

func (*QueryPreviousBlockInfoRequest) XXX_DiscardUnknown

func (m *QueryPreviousBlockInfoRequest) XXX_DiscardUnknown()

func (*QueryPreviousBlockInfoRequest) XXX_Marshal

func (m *QueryPreviousBlockInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPreviousBlockInfoRequest) XXX_Merge

func (m *QueryPreviousBlockInfoRequest) XXX_Merge(src proto.Message)

func (*QueryPreviousBlockInfoRequest) XXX_Size

func (m *QueryPreviousBlockInfoRequest) XXX_Size() int

func (*QueryPreviousBlockInfoRequest) XXX_Unmarshal

func (m *QueryPreviousBlockInfoRequest) XXX_Unmarshal(b []byte) error

type QueryPreviousBlockInfoResponse

type QueryPreviousBlockInfoResponse struct {
	Info *BlockInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
}

QueryPreviousBlockInfoResponse is a request type for the PreviousBlockInfo RPC method.

func (*QueryPreviousBlockInfoResponse) Descriptor

func (*QueryPreviousBlockInfoResponse) Descriptor() ([]byte, []int)

func (*QueryPreviousBlockInfoResponse) GetInfo

func (*QueryPreviousBlockInfoResponse) Marshal

func (m *QueryPreviousBlockInfoResponse) Marshal() (dAtA []byte, err error)

func (*QueryPreviousBlockInfoResponse) MarshalTo

func (m *QueryPreviousBlockInfoResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryPreviousBlockInfoResponse) MarshalToSizedBuffer

func (m *QueryPreviousBlockInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPreviousBlockInfoResponse) ProtoMessage

func (*QueryPreviousBlockInfoResponse) ProtoMessage()

func (*QueryPreviousBlockInfoResponse) Reset

func (m *QueryPreviousBlockInfoResponse) Reset()

func (*QueryPreviousBlockInfoResponse) Size

func (m *QueryPreviousBlockInfoResponse) Size() (n int)

func (*QueryPreviousBlockInfoResponse) String

func (*QueryPreviousBlockInfoResponse) Unmarshal

func (m *QueryPreviousBlockInfoResponse) Unmarshal(dAtA []byte) error

func (*QueryPreviousBlockInfoResponse) XXX_DiscardUnknown

func (m *QueryPreviousBlockInfoResponse) XXX_DiscardUnknown()

func (*QueryPreviousBlockInfoResponse) XXX_Marshal

func (m *QueryPreviousBlockInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPreviousBlockInfoResponse) XXX_Merge

func (m *QueryPreviousBlockInfoResponse) XXX_Merge(src proto.Message)

func (*QueryPreviousBlockInfoResponse) XXX_Size

func (m *QueryPreviousBlockInfoResponse) XXX_Size() int

func (*QueryPreviousBlockInfoResponse) XXX_Unmarshal

func (m *QueryPreviousBlockInfoResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Queries the DowntimeParams.
	DowntimeParams(context.Context, *QueryDowntimeParamsRequest) (*QueryDowntimeParamsResponse, error)
	// Queries the information of the previous block
	PreviousBlockInfo(context.Context, *QueryPreviousBlockInfoRequest) (*QueryPreviousBlockInfoResponse, error)
	// Queries all recorded downtime info.
	AllDowntimeInfo(context.Context, *QueryAllDowntimeInfoRequest) (*QueryAllDowntimeInfoResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) IsDelayedBlock

func (*UnimplementedMsgServer) UpdateDowntimeParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AllDowntimeInfo

func (*UnimplementedQueryServer) DowntimeParams

func (*UnimplementedQueryServer) PreviousBlockInfo

Jump to

Keyboard shortcuts

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