Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func KeyPrefix(p string) []byte
- 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 Epoch
- func (*Epoch) Descriptor() ([]byte, []int)
- func (m *Epoch) GetCurrentEpoch() int64
- func (m *Epoch) GetCurrentEpochStartHeight() int64
- func (m *Epoch) GetCurrentEpochStartTime() time.Time
- func (m *Epoch) GetDuration() time.Duration
- func (m *Epoch) GetEpochCountingStarted() bool
- func (m *Epoch) GetIdentifier() string
- func (m *Epoch) GetStartTime() time.Time
- func (m *Epoch) Marshal() (dAtA []byte, err error)
- func (m *Epoch) MarshalTo(dAtA []byte) (int, error)
- func (m *Epoch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Epoch) ProtoMessage()
- func (m *Epoch) Reset()
- func (m *Epoch) Size() (n int)
- func (m *Epoch) String() string
- func (m *Epoch) Unmarshal(dAtA []byte) error
- func (epoch Epoch) Validate() error
- func (m *Epoch) XXX_DiscardUnknown()
- func (m *Epoch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Epoch) XXX_Merge(src proto.Message)
- func (m *Epoch) XXX_Size() int
- func (m *Epoch) XXX_Unmarshal(b []byte) error
- type EpochHooks
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetEpochs() []Epoch
- 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 QueryAllEpochRequest
- func (*QueryAllEpochRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllEpochRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllEpochRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllEpochRequest) ProtoMessage()
- func (m *QueryAllEpochRequest) Reset()
- func (m *QueryAllEpochRequest) Size() (n int)
- func (m *QueryAllEpochRequest) String() string
- func (m *QueryAllEpochRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllEpochRequest) XXX_DiscardUnknown()
- func (m *QueryAllEpochRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllEpochRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllEpochRequest) XXX_Size() int
- func (m *QueryAllEpochRequest) XXX_Unmarshal(b []byte) error
- type QueryAllEpochResponse
- func (*QueryAllEpochResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllEpochResponse) GetEpochs() []Epoch
- func (m *QueryAllEpochResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllEpochResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllEpochResponse) ProtoMessage()
- func (m *QueryAllEpochResponse) Reset()
- func (m *QueryAllEpochResponse) Size() (n int)
- func (m *QueryAllEpochResponse) String() string
- func (m *QueryAllEpochResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllEpochResponse) XXX_DiscardUnknown()
- func (m *QueryAllEpochResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllEpochResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllEpochResponse) XXX_Size() int
- func (m *QueryAllEpochResponse) XXX_Unmarshal(b []byte) error
- 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() int64
- 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 QueryServer
- type UnimplementedQueryServer
Constants ¶
const ( // ModuleName defines the module name ModuleName = "epoch" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey defines the module's message routing key RouterKey = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_epoch" )
const ( EventTypeEpochEnd = "epoch_end" EventTypeEpochStart = "epoch_start" AttributeEpochNumber = "epoch_number" AttributeEpochStartTime = "start_time" AttributeEpochProvision = "epoch_provision" )
const DefaultIndex uint64 = 1
DefaultIndex is the default global index
Variables ¶
var ( ErrInvalidLengthEpoch = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEpoch = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEpoch = 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 (
ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error")
)
x/epoch module sentinel errors
var KeyPrefixEpoch = []byte{0x01}
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
Types ¶
type Epoch ¶
type Epoch struct { // identifier is a unique reference to this particular timer. Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` // start time is the time at which the timer first ever ticks. // If start time is in the future, the epoch will not begin until the start // time. StartTime time.Time `protobuf:"bytes,2,opt,name=startTime,proto3,stdtime" json:"start_time,omitempty" yaml:"start_time"` // duration is the time in between epoch ticks. // In order for intended behavior to be met, duration should // be greater than the chains expected block time. // Duration must be non-zero. Duration time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration,omitempty" yaml:"duration"` // current epoch is the current epoch number, or in other words, // how many times has the timer 'ticked'. // The first tick (currentEpoch=1) is defined as // the first block whose blocktime is greater than the Epoch startTime. CurrentEpoch int64 `protobuf:"varint,4,opt,name=currentEpoch,proto3" json:"current_epoch,omitempty" yaml:"current_epoch"` // current epoch start time describes the start time of the current timer // interval. The interval is (currentEpochStartTime, // ccurrentEpochStartTime + duration] When the timer ticks, this is set to // currentEpochStartTime = lastEpochStartTime + duration only one timer // tick for a given identifier can occur per block. // // NOTE! The currentEpochStartTime may diverge significantly from the // wall-clock time the epoch began at. Wall-clock time of epoch start may be // >> currentEpochStartTime. Suppose currentEpochStartTime = 10, // duration = 5. Suppose the chain goes offline at t=14, and comes back online // at t=30, and produces blocks at every successive time. (t=31, 32, etc.) // * The t=30 block will start the epoch for (10, 15] // * The t=31 block will start the epoch for (15, 20] // * The t=32 block will start the epoch for (20, 25] // * The t=33 block will start the epoch for (25, 30] // * The t=34 block will start the epoch for (30, 35] // * The **t=36** block will start the epoch for (35, 40] CurrentEpochStartTime time.Time `` /* 138-byte string literal not displayed */ // epoch_counting_started is a boolean, that indicates whether this // epoch timer has began yet. EpochCountingStarted bool `` /* 126-byte string literal not displayed */ // current epoch start height is the block height at which the current epoch // started. (The block height at which the timer last ticked) CurrentEpochStartHeight int64 `` /* 137-byte string literal not displayed */ }
func (*Epoch) Descriptor ¶
func (*Epoch) GetCurrentEpoch ¶
func (*Epoch) GetCurrentEpochStartHeight ¶
func (*Epoch) GetCurrentEpochStartTime ¶
func (*Epoch) GetDuration ¶
func (*Epoch) GetEpochCountingStarted ¶
func (*Epoch) GetIdentifier ¶
func (*Epoch) GetStartTime ¶
func (*Epoch) ProtoMessage ¶
func (*Epoch) ProtoMessage()
func (*Epoch) XXX_DiscardUnknown ¶
func (m *Epoch) XXX_DiscardUnknown()
func (*Epoch) XXX_Marshal ¶
func (*Epoch) XXX_Unmarshal ¶
type EpochHooks ¶
type GenesisState ¶
type GenesisState struct {
Epochs []Epoch `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs"`
}
GenesisState defines the epoch module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default genesis state
func NewGenesisState ¶
func NewGenesisState(epochs []Epoch) *GenesisState
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetEpochs ¶
func (m *GenesisState) GetEpochs() []Epoch
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
func NewMultiEpochHooks ¶
func NewMultiEpochHooks(hooks ...EpochHooks) MultiEpochHooks
func (MultiEpochHooks) AfterEpochEnd ¶
func (MultiEpochHooks) BeforeEpochStart ¶
type QueryAllEpochRequest ¶
type QueryAllEpochRequest struct { }
func (*QueryAllEpochRequest) Descriptor ¶
func (*QueryAllEpochRequest) Descriptor() ([]byte, []int)
func (*QueryAllEpochRequest) Marshal ¶
func (m *QueryAllEpochRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllEpochRequest) MarshalTo ¶
func (m *QueryAllEpochRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllEpochRequest) MarshalToSizedBuffer ¶
func (m *QueryAllEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllEpochRequest) ProtoMessage ¶
func (*QueryAllEpochRequest) ProtoMessage()
func (*QueryAllEpochRequest) Reset ¶
func (m *QueryAllEpochRequest) Reset()
func (*QueryAllEpochRequest) Size ¶
func (m *QueryAllEpochRequest) Size() (n int)
func (*QueryAllEpochRequest) String ¶
func (m *QueryAllEpochRequest) String() string
func (*QueryAllEpochRequest) Unmarshal ¶
func (m *QueryAllEpochRequest) Unmarshal(dAtA []byte) error
func (*QueryAllEpochRequest) XXX_DiscardUnknown ¶
func (m *QueryAllEpochRequest) XXX_DiscardUnknown()
func (*QueryAllEpochRequest) XXX_Marshal ¶
func (m *QueryAllEpochRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllEpochRequest) XXX_Merge ¶
func (m *QueryAllEpochRequest) XXX_Merge(src proto.Message)
func (*QueryAllEpochRequest) XXX_Size ¶
func (m *QueryAllEpochRequest) XXX_Size() int
func (*QueryAllEpochRequest) XXX_Unmarshal ¶
func (m *QueryAllEpochRequest) XXX_Unmarshal(b []byte) error
type QueryAllEpochResponse ¶
type QueryAllEpochResponse struct {
Epochs []Epoch `protobuf:"bytes,1,rep,name=Epochs,proto3" json:"Epochs"`
}
func (*QueryAllEpochResponse) Descriptor ¶
func (*QueryAllEpochResponse) Descriptor() ([]byte, []int)
func (*QueryAllEpochResponse) GetEpochs ¶
func (m *QueryAllEpochResponse) GetEpochs() []Epoch
func (*QueryAllEpochResponse) Marshal ¶
func (m *QueryAllEpochResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllEpochResponse) MarshalTo ¶
func (m *QueryAllEpochResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllEpochResponse) MarshalToSizedBuffer ¶
func (m *QueryAllEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllEpochResponse) ProtoMessage ¶
func (*QueryAllEpochResponse) ProtoMessage()
func (*QueryAllEpochResponse) Reset ¶
func (m *QueryAllEpochResponse) Reset()
func (*QueryAllEpochResponse) Size ¶
func (m *QueryAllEpochResponse) Size() (n int)
func (*QueryAllEpochResponse) String ¶
func (m *QueryAllEpochResponse) String() string
func (*QueryAllEpochResponse) Unmarshal ¶
func (m *QueryAllEpochResponse) Unmarshal(dAtA []byte) error
func (*QueryAllEpochResponse) XXX_DiscardUnknown ¶
func (m *QueryAllEpochResponse) XXX_DiscardUnknown()
func (*QueryAllEpochResponse) XXX_Marshal ¶
func (m *QueryAllEpochResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllEpochResponse) XXX_Merge ¶
func (m *QueryAllEpochResponse) XXX_Merge(src proto.Message)
func (*QueryAllEpochResponse) XXX_Size ¶
func (m *QueryAllEpochResponse) XXX_Size() int
func (*QueryAllEpochResponse) XXX_Unmarshal ¶
func (m *QueryAllEpochResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Queries current Epoch. CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) // Queries a list of Epoch items. EpochAll(ctx context.Context, in *QueryAllEpochRequest, opts ...grpc.CallOption) (*QueryAllEpochResponse, 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 int64 `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() int64
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 QueryServer ¶
type QueryServer interface { // Queries current Epoch. CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) // Queries a list of Epoch items. EpochAll(context.Context, *QueryAllEpochRequest) (*QueryAllEpochResponse, 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) EpochAll ¶
func (*UnimplementedQueryServer) EpochAll(ctx context.Context, req *QueryAllEpochRequest) (*QueryAllEpochResponse, error)