Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func BlockHashKey(blockHeight int64) []byte
- func KeyPrefix(p string) []byte
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- 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 ValidateNumSuppliersPerSession(numSuppliersPerSessionAny any) error
- type AccountKeeper
- type ApplicationKeeper
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- 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 MsgClient
- type MsgServer
- type MsgUpdateParam
- func (*MsgUpdateParam) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType
- func (m *MsgUpdateParam) GetAsUint64() uint64
- func (m *MsgUpdateParam) GetAuthority() string
- func (m *MsgUpdateParam) GetName() string
- func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParam) ProtoMessage()
- func (m *MsgUpdateParam) Reset()
- func (m *MsgUpdateParam) Size() (n int)
- func (m *MsgUpdateParam) String() string
- func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdateParam) ValidateBasic() error
- func (m *MsgUpdateParam) XXX_DiscardUnknown()
- func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParam) XXX_Merge(src proto.Message)
- func (*MsgUpdateParam) XXX_OneofWrappers() []interface{}
- func (m *MsgUpdateParam) XXX_Size() int
- func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamResponse
- func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamResponse) GetParams() *Params
- func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamResponse) ProtoMessage()
- func (m *MsgUpdateParamResponse) Reset()
- func (m *MsgUpdateParamResponse) Size() (n int)
- func (m *MsgUpdateParamResponse) String() string
- func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamResponse) XXX_Size() int
- func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error
- type MsgUpdateParam_AsUint64
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() Params
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParams) ValidateBasic() error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetNumSuppliersPerSession() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) ValidateBasic() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryGetSessionRequest
- func (*QueryGetSessionRequest) Descriptor() ([]byte, []int)
- func (m *QueryGetSessionRequest) GetApplicationAddress() string
- func (m *QueryGetSessionRequest) GetBlockHeight() int64
- func (m *QueryGetSessionRequest) GetServiceId() string
- func (m *QueryGetSessionRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryGetSessionRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGetSessionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGetSessionRequest) ProtoMessage()
- func (m *QueryGetSessionRequest) Reset()
- func (m *QueryGetSessionRequest) Size() (n int)
- func (m *QueryGetSessionRequest) String() string
- func (m *QueryGetSessionRequest) Unmarshal(dAtA []byte) error
- func (query *QueryGetSessionRequest) ValidateBasic() error
- func (m *QueryGetSessionRequest) XXX_DiscardUnknown()
- func (m *QueryGetSessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGetSessionRequest) XXX_Merge(src proto.Message)
- func (m *QueryGetSessionRequest) XXX_Size() int
- func (m *QueryGetSessionRequest) XXX_Unmarshal(b []byte) error
- type QueryGetSessionResponse
- func (*QueryGetSessionResponse) Descriptor() ([]byte, []int)
- func (m *QueryGetSessionResponse) GetSession() *Session
- func (m *QueryGetSessionResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryGetSessionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryGetSessionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryGetSessionResponse) ProtoMessage()
- func (m *QueryGetSessionResponse) Reset()
- func (m *QueryGetSessionResponse) Size() (n int)
- func (m *QueryGetSessionResponse) String() string
- func (m *QueryGetSessionResponse) Unmarshal(dAtA []byte) error
- func (m *QueryGetSessionResponse) XXX_DiscardUnknown()
- func (m *QueryGetSessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryGetSessionResponse) XXX_Merge(src proto.Message)
- func (m *QueryGetSessionResponse) XXX_Size() int
- func (m *QueryGetSessionResponse) XXX_Unmarshal(b []byte) error
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type Session
- func (*Session) Descriptor() ([]byte, []int)
- func (m *Session) GetApplication() *types.Application
- func (m *Session) GetHeader() *SessionHeader
- func (m *Session) GetNumBlocksPerSession() int64
- func (m *Session) GetSessionId() string
- func (m *Session) GetSessionNumber() int64
- func (m *Session) GetSuppliers() []*types1.Supplier
- func (m *Session) Marshal() (dAtA []byte, err error)
- func (m *Session) MarshalTo(dAtA []byte) (int, error)
- func (m *Session) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Session) ProtoMessage()
- func (m *Session) Reset()
- func (m *Session) Size() (n int)
- func (m *Session) String() string
- func (m *Session) Unmarshal(dAtA []byte) error
- func (m *Session) XXX_DiscardUnknown()
- func (m *Session) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Session) XXX_Merge(src proto.Message)
- func (m *Session) XXX_Size() int
- func (m *Session) XXX_Unmarshal(b []byte) error
- type SessionHeader
- func (*SessionHeader) Descriptor() ([]byte, []int)
- func (m *SessionHeader) GetApplicationAddress() string
- func (m *SessionHeader) GetServiceId() string
- func (m *SessionHeader) GetSessionEndBlockHeight() int64
- func (m *SessionHeader) GetSessionId() string
- func (m *SessionHeader) GetSessionStartBlockHeight() int64
- func (m *SessionHeader) Marshal() (dAtA []byte, err error)
- func (m *SessionHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *SessionHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SessionHeader) ProtoMessage()
- func (m *SessionHeader) Reset()
- func (m *SessionHeader) Size() (n int)
- func (m *SessionHeader) String() string
- func (m *SessionHeader) Unmarshal(dAtA []byte) error
- func (sh *SessionHeader) ValidateBasic() error
- func (m *SessionHeader) XXX_DiscardUnknown()
- func (m *SessionHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SessionHeader) XXX_Merge(src proto.Message)
- func (m *SessionHeader) XXX_Size() int
- func (m *SessionHeader) XXX_Unmarshal(b []byte) error
- type SharedKeeper
- type SupplierKeeper
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( // ModuleName defines the module name ModuleName = "session" // StoreKey defines the primary module store key StoreKey = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_session" )
const (
// BlockHashKeyPrefix is the prefix to retrieve all BlockHash
BlockHashKeyPrefix = "BlockHash/height/"
)
Variables ¶
var ( ErrSessionInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") ErrSessionHydration = sdkerrors.Register(ModuleName, 1101, "error during session hydration") ErrSessionAppNotFound = sdkerrors.Register(ModuleName, 1102, "application for session not found not found ") ErrSessionAppNotStakedForService = sdkerrors.Register(ModuleName, 1103, "application in session not staked for requested service") ErrSessionSuppliersNotFound = sdkerrors.Register(ModuleName, 1104, "no suppliers not found for session") ErrSessionInvalidAppAddress = sdkerrors.Register(ModuleName, 1105, "invalid application address for session") ErrSessionInvalidService = sdkerrors.Register(ModuleName, 1106, "invalid service in session") ErrSessionInvalidBlockHeight = sdkerrors.Register(ModuleName, 1107, "invalid block height for session") ErrSessionInvalidSessionId = sdkerrors.Register(ModuleName, 1108, "invalid sessionId") ErrSessionAppNotActive = sdkerrors.Register(ModuleName, 1109, "application is not active") ErrSessionParamInvalid = sdkerrors.Register(ModuleName, 1110, "the provided param is invalid") )
x/session module sentinel errors
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 ( KeyNumSuppliersPerSession = []byte("NumSuppliersPerSession") ParamNumSuppliersPerSession = "num_suppliers_per_session" DefaultNumSuppliersPerSession uint64 = 15 )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = 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 ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var ParamsKey = []byte("p_session")
Functions ¶
func BlockHashKey ¶
BlockHashKey returns the store key to retrieve a BlockHash from the index fields
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable the param key table for launch module
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgServer ¶ added in v0.0.3
func RegisterQueryHandler ¶ added in v0.0.3
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶ added in v0.0.3
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 ¶ added in v0.0.3
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 ¶ added in v0.0.3
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 ¶ added in v0.0.3
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidateNumSuppliersPerSession ¶ added in v0.0.11
ValidateNumSuppliersPerSession validates the NumSuppliersPerSession param.
Types ¶
type AccountKeeper ¶
type AccountKeeper interface {
GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // only used for simulation
}
AccountKeeper defines the expected account keeper used for simulations (noalias)
type ApplicationKeeper ¶
type ApplicationKeeper interface {
GetApplication(ctx context.Context, address string) (app apptypes.Application, found bool)
}
ApplicationKeeper defines the expected application keeper to retrieve applications
type BankKeeper ¶
BankKeeper defines the expected interface needed to retrieve account balances.
type GenesisState ¶ added in v0.0.3
type GenesisState struct { // params defines all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
GenesisState defines the session module's genesis state.
func DefaultGenesis ¶ added in v0.0.3
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default genesis state
func (*GenesisState) Descriptor ¶ added in v0.0.3
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶ added in v0.0.3
func (m *GenesisState) GetParams() Params
func (*GenesisState) Marshal ¶ added in v0.0.3
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalTo ¶ added in v0.0.3
func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
func (*GenesisState) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶ added in v0.0.3
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶ added in v0.0.3
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶ added in v0.0.3
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶ added in v0.0.3
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶ added in v0.0.3
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶ added in v0.0.3
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶ added in v0.0.3
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶ added in v0.0.3
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶ added in v0.0.3
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶ added in v0.0.3
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶ added in v0.0.3
type MsgClient interface { // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) UpdateParam(ctx context.Context, in *MsgUpdateParam, opts ...grpc.CallOption) (*MsgUpdateParamResponse, 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 ¶ added in v0.0.3
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶ added in v0.0.3
type MsgServer interface { // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) UpdateParam(context.Context, *MsgUpdateParam) (*MsgUpdateParamResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpdateParam ¶ added in v0.0.11
type MsgUpdateParam struct { // authority is the address that controls the module (defaults to x/gov unless overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Types that are valid to be assigned to AsType: // *MsgUpdateParam_AsUint64 AsType isMsgUpdateParam_AsType `protobuf_oneof:"as_type"` }
func NewMsgUpdateParam ¶ added in v0.0.11
func NewMsgUpdateParam(authority string, name string, asType any) (*MsgUpdateParam, error)
func (*MsgUpdateParam) Descriptor ¶ added in v0.0.11
func (*MsgUpdateParam) Descriptor() ([]byte, []int)
func (*MsgUpdateParam) GetAsType ¶ added in v0.0.11
func (m *MsgUpdateParam) GetAsType() isMsgUpdateParam_AsType
func (*MsgUpdateParam) GetAsUint64 ¶ added in v0.0.11
func (m *MsgUpdateParam) GetAsUint64() uint64
func (*MsgUpdateParam) GetAuthority ¶ added in v0.0.11
func (m *MsgUpdateParam) GetAuthority() string
func (*MsgUpdateParam) GetName ¶ added in v0.0.11
func (m *MsgUpdateParam) GetName() string
func (*MsgUpdateParam) Marshal ¶ added in v0.0.11
func (m *MsgUpdateParam) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParam) MarshalTo ¶ added in v0.0.11
func (m *MsgUpdateParam) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParam) MarshalToSizedBuffer ¶ added in v0.0.11
func (m *MsgUpdateParam) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParam) ProtoMessage ¶ added in v0.0.11
func (*MsgUpdateParam) ProtoMessage()
func (*MsgUpdateParam) Reset ¶ added in v0.0.11
func (m *MsgUpdateParam) Reset()
func (*MsgUpdateParam) Size ¶ added in v0.0.11
func (m *MsgUpdateParam) Size() (n int)
func (*MsgUpdateParam) String ¶ added in v0.0.11
func (m *MsgUpdateParam) String() string
func (*MsgUpdateParam) Unmarshal ¶ added in v0.0.11
func (m *MsgUpdateParam) Unmarshal(dAtA []byte) error
func (*MsgUpdateParam) ValidateBasic ¶ added in v0.0.11
func (msg *MsgUpdateParam) ValidateBasic() error
ValidateBasic performs a basic validation of the MsgUpdateParam fields. It ensures: 1. The parameter name is supported. 2. The parameter type matches the expected type for a given parameter name. 3. The parameter value is valid (according to its respective validation function).
func (*MsgUpdateParam) XXX_DiscardUnknown ¶ added in v0.0.11
func (m *MsgUpdateParam) XXX_DiscardUnknown()
func (*MsgUpdateParam) XXX_Marshal ¶ added in v0.0.11
func (m *MsgUpdateParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParam) XXX_Merge ¶ added in v0.0.11
func (m *MsgUpdateParam) XXX_Merge(src proto.Message)
func (*MsgUpdateParam) XXX_OneofWrappers ¶ added in v0.0.11
func (*MsgUpdateParam) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*MsgUpdateParam) XXX_Size ¶ added in v0.0.11
func (m *MsgUpdateParam) XXX_Size() int
func (*MsgUpdateParam) XXX_Unmarshal ¶ added in v0.0.11
func (m *MsgUpdateParam) XXX_Unmarshal(b []byte) error
type MsgUpdateParamResponse ¶ added in v0.0.11
type MsgUpdateParamResponse struct {
Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}
func (*MsgUpdateParamResponse) Descriptor ¶ added in v0.0.11
func (*MsgUpdateParamResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamResponse) GetParams ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) GetParams() *Params
func (*MsgUpdateParamResponse) Marshal ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamResponse) MarshalTo ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamResponse) MarshalToSizedBuffer ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamResponse) ProtoMessage ¶ added in v0.0.11
func (*MsgUpdateParamResponse) ProtoMessage()
func (*MsgUpdateParamResponse) Reset ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) Reset()
func (*MsgUpdateParamResponse) Size ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) Size() (n int)
func (*MsgUpdateParamResponse) String ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) String() string
func (*MsgUpdateParamResponse) Unmarshal ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamResponse) XXX_DiscardUnknown ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamResponse) XXX_Marshal ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamResponse) XXX_Merge ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamResponse) XXX_Size ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) XXX_Size() int
func (*MsgUpdateParamResponse) XXX_Unmarshal ¶ added in v0.0.11
func (m *MsgUpdateParamResponse) XXX_Unmarshal(b []byte) error
type MsgUpdateParam_AsUint64 ¶ added in v0.0.11
type MsgUpdateParam_AsUint64 struct {
AsUint64 uint64 `protobuf:"varint,3,opt,name=as_uint64,json=asUint64,proto3,oneof" json:"as_uint64"`
}
func (*MsgUpdateParam_AsUint64) MarshalTo ¶ added in v0.0.11
func (m *MsgUpdateParam_AsUint64) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParam_AsUint64) MarshalToSizedBuffer ¶ added in v0.0.11
func (m *MsgUpdateParam_AsUint64) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParam_AsUint64) Size ¶ added in v0.0.11
func (m *MsgUpdateParam_AsUint64) Size() (n int)
type MsgUpdateParams ¶ added in v0.0.3
type MsgUpdateParams struct { // authority is the address that controls the module (defaults to x/gov unless overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // params defines the x/session parameters to update. // NOTE: All parameters must be supplied. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
MsgUpdateParams is the Msg/UpdateParams request type.
func (*MsgUpdateParams) Descriptor ¶ added in v0.0.3
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetAuthority ¶ added in v0.0.3
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetParams ¶ added in v0.0.3
func (m *MsgUpdateParams) GetParams() Params
func (*MsgUpdateParams) Marshal ¶ added in v0.0.3
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalTo ¶ added in v0.0.3
func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶ added in v0.0.3
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶ added in v0.0.3
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶ added in v0.0.3
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶ added in v0.0.3
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶ added in v0.0.3
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) ValidateBasic ¶ added in v0.0.3
func (m *MsgUpdateParams) ValidateBasic() error
ValidateBasic does a sanity check on the provided data.
func (*MsgUpdateParams) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶ added in v0.0.3
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶ added in v0.0.3
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶ added in v0.0.3
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶ added in v0.0.3
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶ added in v0.0.3
type MsgUpdateParamsResponse struct { }
MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.
func (*MsgUpdateParamsResponse) Descriptor ¶ added in v0.0.3
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶ added in v0.0.3
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶ added in v0.0.3
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type Params ¶ added in v0.0.3
type Params struct { // num_suppliers_per_session is the maximun number of suppliers per session // (applicaiton:supplier pair for a given session number). NumSuppliersPerSession uint64 `` /* 155-byte string literal not displayed */ }
Params defines the parameters for the module.
func DefaultParams ¶ added in v0.0.3
func DefaultParams() Params
DefaultParams returns a default set of parameters
func (*Params) Descriptor ¶ added in v0.0.3
func (*Params) GetNumSuppliersPerSession ¶ added in v0.0.11
func (*Params) MarshalToSizedBuffer ¶ added in v0.0.3
func (*Params) ParamSetPairs ¶ added in v0.0.3
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs get the params.ParamSet
func (*Params) ProtoMessage ¶ added in v0.0.3
func (*Params) ProtoMessage()
func (Params) ValidateBasic ¶ added in v0.0.3
ValidateBasic does a sanity check on the provided params.
func (*Params) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶ added in v0.0.3
func (*Params) XXX_Unmarshal ¶ added in v0.0.3
type QueryClient ¶ added in v0.0.3
type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Queries the session given app_address, service and block_height. GetSession(ctx context.Context, in *QueryGetSessionRequest, opts ...grpc.CallOption) (*QueryGetSessionResponse, 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 ¶ added in v0.0.3
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryGetSessionRequest ¶ added in v0.0.3
type QueryGetSessionRequest struct { ApplicationAddress string `protobuf:"bytes,1,opt,name=application_address,json=applicationAddress,proto3" json:"application_address,omitempty"` ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` BlockHeight int64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` }
func NewQueryGetSessionRequest ¶ added in v0.0.3
func NewQueryGetSessionRequest(appAddress, serviceId string, blockHeight int64) *QueryGetSessionRequest
NOTE: Please note that `QueryGetSessionRequest` is not a `sdk.Msg`, and is therefore not a message/request that will be signable or invoke a state transition. However, following a similar `ValidateBasic` pattern allows us to localize & reuse validation logic.
func (*QueryGetSessionRequest) Descriptor ¶ added in v0.0.3
func (*QueryGetSessionRequest) Descriptor() ([]byte, []int)
func (*QueryGetSessionRequest) GetApplicationAddress ¶ added in v0.0.3
func (m *QueryGetSessionRequest) GetApplicationAddress() string
func (*QueryGetSessionRequest) GetBlockHeight ¶ added in v0.0.3
func (m *QueryGetSessionRequest) GetBlockHeight() int64
func (*QueryGetSessionRequest) GetServiceId ¶ added in v0.0.8
func (m *QueryGetSessionRequest) GetServiceId() string
func (*QueryGetSessionRequest) Marshal ¶ added in v0.0.3
func (m *QueryGetSessionRequest) Marshal() (dAtA []byte, err error)
func (*QueryGetSessionRequest) MarshalTo ¶ added in v0.0.3
func (m *QueryGetSessionRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryGetSessionRequest) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *QueryGetSessionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGetSessionRequest) ProtoMessage ¶ added in v0.0.3
func (*QueryGetSessionRequest) ProtoMessage()
func (*QueryGetSessionRequest) Reset ¶ added in v0.0.3
func (m *QueryGetSessionRequest) Reset()
func (*QueryGetSessionRequest) Size ¶ added in v0.0.3
func (m *QueryGetSessionRequest) Size() (n int)
func (*QueryGetSessionRequest) String ¶ added in v0.0.3
func (m *QueryGetSessionRequest) String() string
func (*QueryGetSessionRequest) Unmarshal ¶ added in v0.0.3
func (m *QueryGetSessionRequest) Unmarshal(dAtA []byte) error
func (*QueryGetSessionRequest) ValidateBasic ¶ added in v0.0.3
func (query *QueryGetSessionRequest) ValidateBasic() error
func (*QueryGetSessionRequest) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *QueryGetSessionRequest) XXX_DiscardUnknown()
func (*QueryGetSessionRequest) XXX_Marshal ¶ added in v0.0.3
func (m *QueryGetSessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGetSessionRequest) XXX_Merge ¶ added in v0.0.3
func (m *QueryGetSessionRequest) XXX_Merge(src proto.Message)
func (*QueryGetSessionRequest) XXX_Size ¶ added in v0.0.3
func (m *QueryGetSessionRequest) XXX_Size() int
func (*QueryGetSessionRequest) XXX_Unmarshal ¶ added in v0.0.3
func (m *QueryGetSessionRequest) XXX_Unmarshal(b []byte) error
type QueryGetSessionResponse ¶ added in v0.0.3
type QueryGetSessionResponse struct {
Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
}
func (*QueryGetSessionResponse) Descriptor ¶ added in v0.0.3
func (*QueryGetSessionResponse) Descriptor() ([]byte, []int)
func (*QueryGetSessionResponse) GetSession ¶ added in v0.0.3
func (m *QueryGetSessionResponse) GetSession() *Session
func (*QueryGetSessionResponse) Marshal ¶ added in v0.0.3
func (m *QueryGetSessionResponse) Marshal() (dAtA []byte, err error)
func (*QueryGetSessionResponse) MarshalTo ¶ added in v0.0.3
func (m *QueryGetSessionResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryGetSessionResponse) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *QueryGetSessionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryGetSessionResponse) ProtoMessage ¶ added in v0.0.3
func (*QueryGetSessionResponse) ProtoMessage()
func (*QueryGetSessionResponse) Reset ¶ added in v0.0.3
func (m *QueryGetSessionResponse) Reset()
func (*QueryGetSessionResponse) Size ¶ added in v0.0.3
func (m *QueryGetSessionResponse) Size() (n int)
func (*QueryGetSessionResponse) String ¶ added in v0.0.3
func (m *QueryGetSessionResponse) String() string
func (*QueryGetSessionResponse) Unmarshal ¶ added in v0.0.3
func (m *QueryGetSessionResponse) Unmarshal(dAtA []byte) error
func (*QueryGetSessionResponse) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *QueryGetSessionResponse) XXX_DiscardUnknown()
func (*QueryGetSessionResponse) XXX_Marshal ¶ added in v0.0.3
func (m *QueryGetSessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryGetSessionResponse) XXX_Merge ¶ added in v0.0.3
func (m *QueryGetSessionResponse) XXX_Merge(src proto.Message)
func (*QueryGetSessionResponse) XXX_Size ¶ added in v0.0.3
func (m *QueryGetSessionResponse) XXX_Size() int
func (*QueryGetSessionResponse) XXX_Unmarshal ¶ added in v0.0.3
func (m *QueryGetSessionResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶ added in v0.0.3
type QueryParamsRequest struct { }
QueryParamsRequest is request type for the Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶ added in v0.0.3
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶ added in v0.0.3
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶ added in v0.0.3
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶ added in v0.0.3
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶ added in v0.0.3
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶ added in v0.0.3
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶ added in v0.0.3
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶ added in v0.0.3
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶ added in v0.0.3
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶ added in v0.0.3
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶ added in v0.0.3
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶ added in v0.0.3
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶ added in v0.0.3
type QueryParamsResponse struct { // params holds all the parameters of this module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is response type for the Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶ added in v0.0.3
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶ added in v0.0.3
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶ added in v0.0.3
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶ added in v0.0.3
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶ added in v0.0.3
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶ added in v0.0.3
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶ added in v0.0.3
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶ added in v0.0.3
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶ added in v0.0.3
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶ added in v0.0.3
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶ added in v0.0.3
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶ added in v0.0.3
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶ added in v0.0.3
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶ added in v0.0.3
type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Queries the session given app_address, service and block_height. GetSession(context.Context, *QueryGetSessionRequest) (*QueryGetSessionResponse, error) }
QueryServer is the server API for Query service.
type Session ¶ added in v0.0.3
type Session struct { Header *SessionHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` SessionNumber int64 `protobuf:"varint,3,opt,name=session_number,json=sessionNumber,proto3" json:"session_number,omitempty"` NumBlocksPerSession int64 `protobuf:"varint,4,opt,name=num_blocks_per_session,json=numBlocksPerSession,proto3" json:"num_blocks_per_session,omitempty"` Application *types.Application `protobuf:"bytes,5,opt,name=application,proto3" json:"application,omitempty"` Suppliers []*types1.Supplier `protobuf:"bytes,6,rep,name=suppliers,proto3" json:"suppliers,omitempty"` }
Session is a fully hydrated session object that contains all the information for the Session and its parcipants.
func (*Session) Descriptor ¶ added in v0.0.3
func (*Session) GetApplication ¶ added in v0.0.3
func (m *Session) GetApplication() *types.Application
func (*Session) GetHeader ¶ added in v0.0.3
func (m *Session) GetHeader() *SessionHeader
func (*Session) GetNumBlocksPerSession ¶ added in v0.0.3
func (*Session) GetSessionId ¶ added in v0.0.3
func (*Session) GetSessionNumber ¶ added in v0.0.3
func (*Session) GetSuppliers ¶ added in v0.0.3
func (*Session) MarshalToSizedBuffer ¶ added in v0.0.3
func (*Session) ProtoMessage ¶ added in v0.0.3
func (*Session) ProtoMessage()
func (*Session) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *Session) XXX_DiscardUnknown()
func (*Session) XXX_Marshal ¶ added in v0.0.3
func (*Session) XXX_Unmarshal ¶ added in v0.0.3
type SessionHeader ¶ added in v0.0.3
type SessionHeader struct { ApplicationAddress string `protobuf:"bytes,1,opt,name=application_address,json=applicationAddress,proto3" json:"application_address,omitempty"` ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` // NOTE: session_id can be derived from the above values using on-chain but is included in the header for convenience SessionId string `protobuf:"bytes,3,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` SessionStartBlockHeight int64 `` /* 135-byte string literal not displayed */ // Note that`session_end_block_height` is a derivative of (`start` + `num_blocks_per_session`) // as goverened by on-chain params at the time of the session start. // It is stored as an additional field to simplofy business logic in case // the number of blocks_per_session changes during the session. SessionEndBlockHeight int64 `` /* 129-byte string literal not displayed */ }
SessionHeader is a lightweight header for a session that can be passed around. It is the minimal amount of data required to hydrate & retrieve all data relevant to the session.
func (*SessionHeader) Descriptor ¶ added in v0.0.3
func (*SessionHeader) Descriptor() ([]byte, []int)
func (*SessionHeader) GetApplicationAddress ¶ added in v0.0.3
func (m *SessionHeader) GetApplicationAddress() string
func (*SessionHeader) GetServiceId ¶ added in v0.0.8
func (m *SessionHeader) GetServiceId() string
func (*SessionHeader) GetSessionEndBlockHeight ¶ added in v0.0.3
func (m *SessionHeader) GetSessionEndBlockHeight() int64
func (*SessionHeader) GetSessionId ¶ added in v0.0.3
func (m *SessionHeader) GetSessionId() string
func (*SessionHeader) GetSessionStartBlockHeight ¶ added in v0.0.3
func (m *SessionHeader) GetSessionStartBlockHeight() int64
func (*SessionHeader) Marshal ¶ added in v0.0.3
func (m *SessionHeader) Marshal() (dAtA []byte, err error)
func (*SessionHeader) MarshalTo ¶ added in v0.0.3
func (m *SessionHeader) MarshalTo(dAtA []byte) (int, error)
func (*SessionHeader) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *SessionHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SessionHeader) ProtoMessage ¶ added in v0.0.3
func (*SessionHeader) ProtoMessage()
func (*SessionHeader) Reset ¶ added in v0.0.3
func (m *SessionHeader) Reset()
func (*SessionHeader) Size ¶ added in v0.0.3
func (m *SessionHeader) Size() (n int)
func (*SessionHeader) String ¶ added in v0.0.3
func (m *SessionHeader) String() string
func (*SessionHeader) Unmarshal ¶ added in v0.0.3
func (m *SessionHeader) Unmarshal(dAtA []byte) error
func (*SessionHeader) ValidateBasic ¶ added in v0.0.3
func (sh *SessionHeader) ValidateBasic() error
ValidateBasic performs basic stateless validation of a SessionHeader.
func (*SessionHeader) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *SessionHeader) XXX_DiscardUnknown()
func (*SessionHeader) XXX_Marshal ¶ added in v0.0.3
func (m *SessionHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SessionHeader) XXX_Merge ¶ added in v0.0.3
func (m *SessionHeader) XXX_Merge(src proto.Message)
func (*SessionHeader) XXX_Size ¶ added in v0.0.3
func (m *SessionHeader) XXX_Size() int
func (*SessionHeader) XXX_Unmarshal ¶ added in v0.0.3
func (m *SessionHeader) XXX_Unmarshal(b []byte) error
type SharedKeeper ¶ added in v0.0.3
type SharedKeeper interface {
}SharedKeeper defines the expected interface needed to retrieve shared parameters
type SupplierKeeper ¶
type SupplierKeeper interface {
GetAllSuppliers(ctx context.Context) (suppliers []sharedtypes.Supplier)
}
SupplierKeeper defines the expected interface needed to retrieve suppliers
type UnimplementedMsgServer ¶ added in v0.0.3
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) UpdateParam ¶ added in v0.0.11
func (*UnimplementedMsgServer) UpdateParam(ctx context.Context, req *MsgUpdateParam) (*MsgUpdateParamResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶ added in v0.0.3
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
type UnimplementedQueryServer ¶ added in v0.0.3
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) GetSession ¶ added in v0.0.3
func (*UnimplementedQueryServer) GetSession(ctx context.Context, req *QueryGetSessionRequest) (*QueryGetSessionResponse, error)
func (*UnimplementedQueryServer) Params ¶ added in v0.0.3
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)