Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateEpochIdentifierInterface(i interface{}) error
- func ValidateEpochIdentifierString(s string) error
- type EpochHooks
- type EpochInfo
- func (*EpochInfo) Descriptor() ([]byte, []int)
- func (m *EpochInfo) GetCurrentEpoch() uint64
- func (m *EpochInfo) GetCurrentEpochStartHeight() int64
- func (m *EpochInfo) GetCurrentEpochStartTime() time.Time
- func (m *EpochInfo) GetDuration() time.Duration
- func (m *EpochInfo) GetEpochCountingStarted() bool
- func (m *EpochInfo) GetIdentifier() string
- func (m *EpochInfo) GetStartTime() time.Time
- func (m *EpochInfo) Marshal() (dAtA []byte, err error)
- func (m *EpochInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EpochInfo) ProtoMessage()
- func (m *EpochInfo) Reset()
- func (m *EpochInfo) Size() (n int)
- func (m *EpochInfo) String() string
- func (m *EpochInfo) Unmarshal(dAtA []byte) error
- func (e *EpochInfo) Validate() error
- func (m *EpochInfo) XXX_DiscardUnknown()
- func (m *EpochInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EpochInfo) XXX_Merge(src proto.Message)
- func (m *EpochInfo) XXX_Size() int
- func (m *EpochInfo) XXX_Unmarshal(b []byte) error
- type EventEpochEnd
- func (*EventEpochEnd) Descriptor() ([]byte, []int)
- func (m *EventEpochEnd) GetEpochNumber() uint64
- func (m *EventEpochEnd) Marshal() (dAtA []byte, err error)
- func (m *EventEpochEnd) MarshalTo(dAtA []byte) (int, error)
- func (m *EventEpochEnd) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventEpochEnd) ProtoMessage()
- func (m *EventEpochEnd) Reset()
- func (m *EventEpochEnd) Size() (n int)
- func (m *EventEpochEnd) String() string
- func (m *EventEpochEnd) Unmarshal(dAtA []byte) error
- func (m *EventEpochEnd) XXX_DiscardUnknown()
- func (m *EventEpochEnd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventEpochEnd) XXX_Merge(src proto.Message)
- func (m *EventEpochEnd) XXX_Size() int
- func (m *EventEpochEnd) XXX_Unmarshal(b []byte) error
- type EventEpochStart
- func (*EventEpochStart) Descriptor() ([]byte, []int)
- func (m *EventEpochStart) GetEpochNumber() uint64
- func (m *EventEpochStart) GetEpochStartTime() time.Time
- func (m *EventEpochStart) Marshal() (dAtA []byte, err error)
- func (m *EventEpochStart) MarshalTo(dAtA []byte) (int, error)
- func (m *EventEpochStart) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventEpochStart) ProtoMessage()
- func (m *EventEpochStart) Reset()
- func (m *EventEpochStart) Size() (n int)
- func (m *EventEpochStart) String() string
- func (m *EventEpochStart) Unmarshal(dAtA []byte) error
- func (m *EventEpochStart) XXX_DiscardUnknown()
- func (m *EventEpochStart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventEpochStart) XXX_Merge(src proto.Message)
- func (m *EventEpochStart) XXX_Size() int
- func (m *EventEpochStart) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetEpochs() []EpochInfo
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MultiEpochHooks
- type QueryClient
- type QueryCurrentEpochRequest
- func (*QueryCurrentEpochRequest) Descriptor() ([]byte, []int)
- func (m *QueryCurrentEpochRequest) GetIdentifier() string
- func (m *QueryCurrentEpochRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryCurrentEpochRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryCurrentEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryCurrentEpochRequest) ProtoMessage()
- func (m *QueryCurrentEpochRequest) Reset()
- func (m *QueryCurrentEpochRequest) Size() (n int)
- func (m *QueryCurrentEpochRequest) String() string
- func (m *QueryCurrentEpochRequest) Unmarshal(dAtA []byte) error
- func (m *QueryCurrentEpochRequest) XXX_DiscardUnknown()
- func (m *QueryCurrentEpochRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryCurrentEpochRequest) XXX_Merge(src proto.Message)
- func (m *QueryCurrentEpochRequest) XXX_Size() int
- func (m *QueryCurrentEpochRequest) XXX_Unmarshal(b []byte) error
- type QueryCurrentEpochResponse
- func (*QueryCurrentEpochResponse) Descriptor() ([]byte, []int)
- func (m *QueryCurrentEpochResponse) GetCurrentEpoch() uint64
- func (m *QueryCurrentEpochResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryCurrentEpochResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryCurrentEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryCurrentEpochResponse) ProtoMessage()
- func (m *QueryCurrentEpochResponse) Reset()
- func (m *QueryCurrentEpochResponse) Size() (n int)
- func (m *QueryCurrentEpochResponse) String() string
- func (m *QueryCurrentEpochResponse) Unmarshal(dAtA []byte) error
- func (m *QueryCurrentEpochResponse) XXX_DiscardUnknown()
- func (m *QueryCurrentEpochResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryCurrentEpochResponse) XXX_Merge(src proto.Message)
- func (m *QueryCurrentEpochResponse) XXX_Size() int
- func (m *QueryCurrentEpochResponse) XXX_Unmarshal(b []byte) error
- type QueryEpochsInfoRequest
- func (*QueryEpochsInfoRequest) Descriptor() ([]byte, []int)
- func (m *QueryEpochsInfoRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryEpochsInfoRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEpochsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEpochsInfoRequest) ProtoMessage()
- func (m *QueryEpochsInfoRequest) Reset()
- func (m *QueryEpochsInfoRequest) Size() (n int)
- func (m *QueryEpochsInfoRequest) String() string
- func (m *QueryEpochsInfoRequest) Unmarshal(dAtA []byte) error
- func (m *QueryEpochsInfoRequest) XXX_DiscardUnknown()
- func (m *QueryEpochsInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEpochsInfoRequest) XXX_Merge(src proto.Message)
- func (m *QueryEpochsInfoRequest) XXX_Size() int
- func (m *QueryEpochsInfoRequest) XXX_Unmarshal(b []byte) error
- type QueryEpochsInfoResponse
- func (*QueryEpochsInfoResponse) Descriptor() ([]byte, []int)
- func (m *QueryEpochsInfoResponse) GetEpochs() []EpochInfo
- func (m *QueryEpochsInfoResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryEpochsInfoResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryEpochsInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryEpochsInfoResponse) ProtoMessage()
- func (m *QueryEpochsInfoResponse) Reset()
- func (m *QueryEpochsInfoResponse) Size() (n int)
- func (m *QueryEpochsInfoResponse) String() string
- func (m *QueryEpochsInfoResponse) Unmarshal(dAtA []byte) error
- func (m *QueryEpochsInfoResponse) XXX_DiscardUnknown()
- func (m *QueryEpochsInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryEpochsInfoResponse) XXX_Merge(src proto.Message)
- func (m *QueryEpochsInfoResponse) XXX_Size() int
- func (m *QueryEpochsInfoResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedQueryServer
Constants ¶
const ( // WeekEpochID defines the identifier for weekly epochs WeekEpochID = "week" // DayEpochID defines the identifier for daily epochs DayEpochID = "day" // HourEpochID defines the identifier for hourly epochs HourEpochID = "hour" // FifteenMinuteEpochID defines the identifier for 15 minute epochs FifteenMinuteEpochID = "15 min" // ThirtyMinuteEpochID defines the identifier for 30 minute epochs ThirtyMinuteEpochID = "30 min" )
const ( // ModuleName defines the module name. ModuleName = "epochs" // StoreKey defines the primary module store key. StoreKey = ModuleName // RouterKey is the message route for slashing. RouterKey = ModuleName // QuerierRoute defines the module's query routing key. QuerierRoute = ModuleName )
Variables ¶
var ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowState = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupState = fmt.Errorf("proto: unexpected end of group") )
var (
ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error")
)
x/epochs module sentinel errors.
var KeyPrefixEpoch = []byte{0x01}
KeyPrefixEpoch defines prefix key for storing epochs.
Functions ¶
func RegisterQueryHandler ¶
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)
func ValidateEpochIdentifierInterface ¶
func ValidateEpochIdentifierInterface(i interface{}) error
ValidateEpochIdentifierInterface performs a stateless validation of the epoch ID interface.
func ValidateEpochIdentifierString ¶
ValidateEpochIdentifierInterface performs a stateless validation of the epoch ID.
Types ¶
type EpochHooks ¶
type EpochHooks interface { // AfterEpochEnd the first block whose timestamp is after the duration is counted as the end of the epoch AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber uint64) // BeforeEpochStart new epoch is next block of epoch end block BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber uint64) }
type EpochInfo ¶
type EpochInfo struct { // A string identifier for the epoch. e.g. "15min" or "1hour" Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` // When the epoch repetitino should start. StartTime time.Time `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` // How long each epoch lasts for. Duration time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration,omitempty" yaml:"duration"` // The current epoch number, starting from 1. CurrentEpoch uint64 `protobuf:"varint,4,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` // The start timestamp of the current epoch. CurrentEpochStartTime time.Time `` /* 158-byte string literal not displayed */ // Whether or not this epoch has started. Set to true if current blocktime >= // start_time. EpochCountingStarted bool `protobuf:"varint,6,opt,name=epoch_counting_started,json=epochCountingStarted,proto3" json:"epoch_counting_started,omitempty"` // The block height at which the current epoch started at. CurrentEpochStartHeight int64 `` /* 135-byte string literal not displayed */ }
func (*EpochInfo) Descriptor ¶
func (*EpochInfo) GetCurrentEpoch ¶
func (*EpochInfo) GetCurrentEpochStartHeight ¶
func (*EpochInfo) GetCurrentEpochStartTime ¶
func (*EpochInfo) GetDuration ¶
func (*EpochInfo) GetEpochCountingStarted ¶
func (*EpochInfo) GetIdentifier ¶
func (*EpochInfo) GetStartTime ¶
func (*EpochInfo) MarshalToSizedBuffer ¶
func (*EpochInfo) ProtoMessage ¶
func (*EpochInfo) ProtoMessage()
func (*EpochInfo) XXX_DiscardUnknown ¶
func (m *EpochInfo) XXX_DiscardUnknown()
func (*EpochInfo) XXX_Marshal ¶
func (*EpochInfo) XXX_Unmarshal ¶
type EventEpochEnd ¶ added in v0.16.1
type EventEpochEnd struct { // Epoch number, starting from 1. EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` }
func (*EventEpochEnd) Descriptor ¶ added in v0.16.1
func (*EventEpochEnd) Descriptor() ([]byte, []int)
func (*EventEpochEnd) GetEpochNumber ¶ added in v0.16.1
func (m *EventEpochEnd) GetEpochNumber() uint64
func (*EventEpochEnd) Marshal ¶ added in v0.16.1
func (m *EventEpochEnd) Marshal() (dAtA []byte, err error)
func (*EventEpochEnd) MarshalTo ¶ added in v0.16.1
func (m *EventEpochEnd) MarshalTo(dAtA []byte) (int, error)
func (*EventEpochEnd) MarshalToSizedBuffer ¶ added in v0.16.1
func (m *EventEpochEnd) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventEpochEnd) ProtoMessage ¶ added in v0.16.1
func (*EventEpochEnd) ProtoMessage()
func (*EventEpochEnd) Reset ¶ added in v0.16.1
func (m *EventEpochEnd) Reset()
func (*EventEpochEnd) Size ¶ added in v0.16.1
func (m *EventEpochEnd) Size() (n int)
func (*EventEpochEnd) String ¶ added in v0.16.1
func (m *EventEpochEnd) String() string
func (*EventEpochEnd) Unmarshal ¶ added in v0.16.1
func (m *EventEpochEnd) Unmarshal(dAtA []byte) error
func (*EventEpochEnd) XXX_DiscardUnknown ¶ added in v0.16.1
func (m *EventEpochEnd) XXX_DiscardUnknown()
func (*EventEpochEnd) XXX_Marshal ¶ added in v0.16.1
func (m *EventEpochEnd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventEpochEnd) XXX_Merge ¶ added in v0.16.1
func (m *EventEpochEnd) XXX_Merge(src proto.Message)
func (*EventEpochEnd) XXX_Size ¶ added in v0.16.1
func (m *EventEpochEnd) XXX_Size() int
func (*EventEpochEnd) XXX_Unmarshal ¶ added in v0.16.1
func (m *EventEpochEnd) XXX_Unmarshal(b []byte) error
type EventEpochStart ¶ added in v0.16.1
type EventEpochStart struct { // Epoch number, starting from 1. EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` // The start timestamp of the epoch. EpochStartTime time.Time `protobuf:"bytes,2,opt,name=epoch_start_time,json=epochStartTime,proto3,stdtime" json:"epoch_start_time"` }
func (*EventEpochStart) Descriptor ¶ added in v0.16.1
func (*EventEpochStart) Descriptor() ([]byte, []int)
func (*EventEpochStart) GetEpochNumber ¶ added in v0.16.1
func (m *EventEpochStart) GetEpochNumber() uint64
func (*EventEpochStart) GetEpochStartTime ¶ added in v0.16.1
func (m *EventEpochStart) GetEpochStartTime() time.Time
func (*EventEpochStart) Marshal ¶ added in v0.16.1
func (m *EventEpochStart) Marshal() (dAtA []byte, err error)
func (*EventEpochStart) MarshalTo ¶ added in v0.16.1
func (m *EventEpochStart) MarshalTo(dAtA []byte) (int, error)
func (*EventEpochStart) MarshalToSizedBuffer ¶ added in v0.16.1
func (m *EventEpochStart) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventEpochStart) ProtoMessage ¶ added in v0.16.1
func (*EventEpochStart) ProtoMessage()
func (*EventEpochStart) Reset ¶ added in v0.16.1
func (m *EventEpochStart) Reset()
func (*EventEpochStart) Size ¶ added in v0.16.1
func (m *EventEpochStart) Size() (n int)
func (*EventEpochStart) String ¶ added in v0.16.1
func (m *EventEpochStart) String() string
func (*EventEpochStart) Unmarshal ¶ added in v0.16.1
func (m *EventEpochStart) Unmarshal(dAtA []byte) error
func (*EventEpochStart) XXX_DiscardUnknown ¶ added in v0.16.1
func (m *EventEpochStart) XXX_DiscardUnknown()
func (*EventEpochStart) XXX_Marshal ¶ added in v0.16.1
func (m *EventEpochStart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventEpochStart) XXX_Merge ¶ added in v0.16.1
func (m *EventEpochStart) XXX_Merge(src proto.Message)
func (*EventEpochStart) XXX_Size ¶ added in v0.16.1
func (m *EventEpochStart) XXX_Size() int
func (*EventEpochStart) XXX_Unmarshal ¶ added in v0.16.1
func (m *EventEpochStart) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct {
Epochs []EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs"`
}
GenesisState defines the epochs module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Capability genesis state.
func NewGenesisState ¶
func NewGenesisState(epochs []EpochInfo) *GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetEpochs ¶
func (m *GenesisState) GetEpochs() []EpochInfo
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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 MultiEpochHooks ¶
type MultiEpochHooks []EpochHooks
MultiEpochHooks combine multiple gamm hooks, all hook functions are run in array sequence.
func NewMultiEpochHooks ¶
func NewMultiEpochHooks(hooks ...EpochHooks) MultiEpochHooks
func (MultiEpochHooks) AfterEpochEnd ¶
func (h MultiEpochHooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber uint64)
AfterEpochEnd is called when epoch is going to be ended, epochNumber is the number of epoch that is ending.
func (MultiEpochHooks) BeforeEpochStart ¶
func (h MultiEpochHooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber uint64)
BeforeEpochStart is called when epoch is going to be started, epochNumber is the number of epoch that is starting.
type QueryClient ¶
type QueryClient interface { // EpochInfos provide running epochInfos EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) // CurrentEpoch provide current epoch of specified identifier CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, 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 QueryCurrentEpochRequest ¶
type QueryCurrentEpochRequest struct {
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
}
func (*QueryCurrentEpochRequest) Descriptor ¶
func (*QueryCurrentEpochRequest) Descriptor() ([]byte, []int)
func (*QueryCurrentEpochRequest) GetIdentifier ¶
func (m *QueryCurrentEpochRequest) GetIdentifier() string
func (*QueryCurrentEpochRequest) Marshal ¶
func (m *QueryCurrentEpochRequest) Marshal() (dAtA []byte, err error)
func (*QueryCurrentEpochRequest) MarshalTo ¶
func (m *QueryCurrentEpochRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryCurrentEpochRequest) MarshalToSizedBuffer ¶
func (m *QueryCurrentEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryCurrentEpochRequest) ProtoMessage ¶
func (*QueryCurrentEpochRequest) ProtoMessage()
func (*QueryCurrentEpochRequest) Reset ¶
func (m *QueryCurrentEpochRequest) Reset()
func (*QueryCurrentEpochRequest) Size ¶
func (m *QueryCurrentEpochRequest) Size() (n int)
func (*QueryCurrentEpochRequest) String ¶
func (m *QueryCurrentEpochRequest) String() string
func (*QueryCurrentEpochRequest) Unmarshal ¶
func (m *QueryCurrentEpochRequest) Unmarshal(dAtA []byte) error
func (*QueryCurrentEpochRequest) XXX_DiscardUnknown ¶
func (m *QueryCurrentEpochRequest) XXX_DiscardUnknown()
func (*QueryCurrentEpochRequest) XXX_Marshal ¶
func (m *QueryCurrentEpochRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryCurrentEpochRequest) XXX_Merge ¶
func (m *QueryCurrentEpochRequest) XXX_Merge(src proto.Message)
func (*QueryCurrentEpochRequest) XXX_Size ¶
func (m *QueryCurrentEpochRequest) XXX_Size() int
func (*QueryCurrentEpochRequest) XXX_Unmarshal ¶
func (m *QueryCurrentEpochRequest) XXX_Unmarshal(b []byte) error
type QueryCurrentEpochResponse ¶
type QueryCurrentEpochResponse struct {
CurrentEpoch uint64 `protobuf:"varint,1,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"`
}
func (*QueryCurrentEpochResponse) Descriptor ¶
func (*QueryCurrentEpochResponse) Descriptor() ([]byte, []int)
func (*QueryCurrentEpochResponse) GetCurrentEpoch ¶
func (m *QueryCurrentEpochResponse) GetCurrentEpoch() uint64
func (*QueryCurrentEpochResponse) Marshal ¶
func (m *QueryCurrentEpochResponse) Marshal() (dAtA []byte, err error)
func (*QueryCurrentEpochResponse) MarshalTo ¶
func (m *QueryCurrentEpochResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryCurrentEpochResponse) MarshalToSizedBuffer ¶
func (m *QueryCurrentEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryCurrentEpochResponse) ProtoMessage ¶
func (*QueryCurrentEpochResponse) ProtoMessage()
func (*QueryCurrentEpochResponse) Reset ¶
func (m *QueryCurrentEpochResponse) Reset()
func (*QueryCurrentEpochResponse) Size ¶
func (m *QueryCurrentEpochResponse) Size() (n int)
func (*QueryCurrentEpochResponse) String ¶
func (m *QueryCurrentEpochResponse) String() string
func (*QueryCurrentEpochResponse) Unmarshal ¶
func (m *QueryCurrentEpochResponse) Unmarshal(dAtA []byte) error
func (*QueryCurrentEpochResponse) XXX_DiscardUnknown ¶
func (m *QueryCurrentEpochResponse) XXX_DiscardUnknown()
func (*QueryCurrentEpochResponse) XXX_Marshal ¶
func (m *QueryCurrentEpochResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryCurrentEpochResponse) XXX_Merge ¶
func (m *QueryCurrentEpochResponse) XXX_Merge(src proto.Message)
func (*QueryCurrentEpochResponse) XXX_Size ¶
func (m *QueryCurrentEpochResponse) XXX_Size() int
func (*QueryCurrentEpochResponse) XXX_Unmarshal ¶
func (m *QueryCurrentEpochResponse) XXX_Unmarshal(b []byte) error
type QueryEpochsInfoRequest ¶
type QueryEpochsInfoRequest struct { }
func (*QueryEpochsInfoRequest) Descriptor ¶
func (*QueryEpochsInfoRequest) Descriptor() ([]byte, []int)
func (*QueryEpochsInfoRequest) Marshal ¶
func (m *QueryEpochsInfoRequest) Marshal() (dAtA []byte, err error)
func (*QueryEpochsInfoRequest) MarshalTo ¶
func (m *QueryEpochsInfoRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryEpochsInfoRequest) MarshalToSizedBuffer ¶
func (m *QueryEpochsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEpochsInfoRequest) ProtoMessage ¶
func (*QueryEpochsInfoRequest) ProtoMessage()
func (*QueryEpochsInfoRequest) Reset ¶
func (m *QueryEpochsInfoRequest) Reset()
func (*QueryEpochsInfoRequest) Size ¶
func (m *QueryEpochsInfoRequest) Size() (n int)
func (*QueryEpochsInfoRequest) String ¶
func (m *QueryEpochsInfoRequest) String() string
func (*QueryEpochsInfoRequest) Unmarshal ¶
func (m *QueryEpochsInfoRequest) Unmarshal(dAtA []byte) error
func (*QueryEpochsInfoRequest) XXX_DiscardUnknown ¶
func (m *QueryEpochsInfoRequest) XXX_DiscardUnknown()
func (*QueryEpochsInfoRequest) XXX_Marshal ¶
func (m *QueryEpochsInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEpochsInfoRequest) XXX_Merge ¶
func (m *QueryEpochsInfoRequest) XXX_Merge(src proto.Message)
func (*QueryEpochsInfoRequest) XXX_Size ¶
func (m *QueryEpochsInfoRequest) XXX_Size() int
func (*QueryEpochsInfoRequest) XXX_Unmarshal ¶
func (m *QueryEpochsInfoRequest) XXX_Unmarshal(b []byte) error
type QueryEpochsInfoResponse ¶
type QueryEpochsInfoResponse struct {
Epochs []EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs"`
}
func (*QueryEpochsInfoResponse) Descriptor ¶
func (*QueryEpochsInfoResponse) Descriptor() ([]byte, []int)
func (*QueryEpochsInfoResponse) GetEpochs ¶
func (m *QueryEpochsInfoResponse) GetEpochs() []EpochInfo
func (*QueryEpochsInfoResponse) Marshal ¶
func (m *QueryEpochsInfoResponse) Marshal() (dAtA []byte, err error)
func (*QueryEpochsInfoResponse) MarshalTo ¶
func (m *QueryEpochsInfoResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryEpochsInfoResponse) MarshalToSizedBuffer ¶
func (m *QueryEpochsInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryEpochsInfoResponse) ProtoMessage ¶
func (*QueryEpochsInfoResponse) ProtoMessage()
func (*QueryEpochsInfoResponse) Reset ¶
func (m *QueryEpochsInfoResponse) Reset()
func (*QueryEpochsInfoResponse) Size ¶
func (m *QueryEpochsInfoResponse) Size() (n int)
func (*QueryEpochsInfoResponse) String ¶
func (m *QueryEpochsInfoResponse) String() string
func (*QueryEpochsInfoResponse) Unmarshal ¶
func (m *QueryEpochsInfoResponse) Unmarshal(dAtA []byte) error
func (*QueryEpochsInfoResponse) XXX_DiscardUnknown ¶
func (m *QueryEpochsInfoResponse) XXX_DiscardUnknown()
func (*QueryEpochsInfoResponse) XXX_Marshal ¶
func (m *QueryEpochsInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryEpochsInfoResponse) XXX_Merge ¶
func (m *QueryEpochsInfoResponse) XXX_Merge(src proto.Message)
func (*QueryEpochsInfoResponse) XXX_Size ¶
func (m *QueryEpochsInfoResponse) XXX_Size() int
func (*QueryEpochsInfoResponse) XXX_Unmarshal ¶
func (m *QueryEpochsInfoResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // EpochInfos provide running epochInfos EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) // CurrentEpoch provide current epoch of specified identifier CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) CurrentEpoch ¶
func (*UnimplementedQueryServer) CurrentEpoch(ctx context.Context, req *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error)
func (*UnimplementedQueryServer) EpochInfos ¶
func (*UnimplementedQueryServer) EpochInfos(ctx context.Context, req *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error)