types

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeRegisterAsset   = "register_asset"
	EventTypeDeregisterAsset = "deregister_asset"

	AttributeKeyDenom    = "denom"
	AttributeKeyTicker   = "ticker"
	AttributeKeyExponent = "exponent"
)
View Source
const (
	ModuleName = "assets"
	StoreKey   = ModuleName
)
View Source
const (
	// MaxTickerLength is the maximum length of an asset ticker
	MaxTickerLength = 10
)

Variables

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ParamsKey = collections.NewPrefix(0x01)

	AssetKeyPrefix       = collections.NewPrefix(0x11)
	TickerIndexKeyPrefix = collections.NewPrefix(0x12)
)
View Source
var (
	ErrInvalidLengthMessages        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessages          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthModels        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModels          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupModels = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateTicker

func ValidateTicker(ticker string) error

ValidateTicker validates the ticker

Types

type Asset

type Asset struct {
	// Denom is the denomination of the asset.
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	// Ticker is the ticker of the asset.
	Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"`
	// Exponent represents power of 10 exponent that one must
	// raise the denom to in order to equal the given ticker.
	// 1 ticker = 10^exponent denom
	Exponent uint32 `protobuf:"varint,3,opt,name=exponent,proto3" json:"exponent,omitempty"`
}

Asset represents an asset that can be registered on the chain.

func NewAsset

func NewAsset(denom, ticker string, exponent uint32) Asset

NewAsset returns a new Asset instance

func (*Asset) Descriptor

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

func (*Asset) Marshal

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

func (*Asset) MarshalTo

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

func (*Asset) MarshalToSizedBuffer

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

func (*Asset) ProtoMessage

func (*Asset) ProtoMessage()

func (*Asset) Reset

func (m *Asset) Reset()

func (*Asset) Size

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

func (*Asset) String

func (m *Asset) String() string

func (*Asset) Unmarshal

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

func (*Asset) Validate

func (asset *Asset) Validate() error

Validate validates the Asset instance

func (*Asset) XXX_DiscardUnknown

func (m *Asset) XXX_DiscardUnknown()

func (*Asset) XXX_Marshal

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

func (*Asset) XXX_Merge

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

func (*Asset) XXX_Size

func (m *Asset) XXX_Size() int

func (*Asset) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// Assets defines the registered assets.
	Assets []Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets"`
}

GenesisState defines the module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns a default GenesisState

func NewGenesisState

func NewGenesisState(assets []Asset) *GenesisState

NewGenesisState returns a new GenesisState instance

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAssets

func (m *GenesisState) GetAssets() []Asset

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (*GenesisState) Validate

func (data *GenesisState) Validate() error

Validate validates the GenesisState and returns an error if it is invalid.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// RegisterAsset defines the operation for registering an asset.
	RegisterAsset(ctx context.Context, in *MsgRegisterAsset, opts ...grpc.CallOption) (*MsgRegisterAssetResponse, error)
	// DeregisterAsset defines the operation for de-registering an asset with
	// its denomination.
	DeregisterAsset(ctx context.Context, in *MsgDeregisterAsset, opts ...grpc.CallOption) (*MsgDeregisterAssetResponse, error)
}

MsgClient is the client API for Msg service.

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

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgDeregisterAsset

type MsgDeregisterAsset 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"`
	// Denom represents the denomination of the token associated with the asset.
	Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
}

MsgDeregisterAsset defines the message structure for the DeregisterAsset gRPC service method. It allows the authority to de-register an asset with the token denomination.

func NewMsgDeregisterAsset

func NewMsgDeregisterAsset(authority, denom string) *MsgDeregisterAsset

NewMsgDeregisterAsset creates a new MsgDeregisterAsset instance

func (*MsgDeregisterAsset) Descriptor

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

func (*MsgDeregisterAsset) GetAuthority

func (m *MsgDeregisterAsset) GetAuthority() string

func (*MsgDeregisterAsset) GetDenom

func (m *MsgDeregisterAsset) GetDenom() string

func (*MsgDeregisterAsset) Marshal

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

func (*MsgDeregisterAsset) MarshalTo

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

func (*MsgDeregisterAsset) MarshalToSizedBuffer

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

func (*MsgDeregisterAsset) ProtoMessage

func (*MsgDeregisterAsset) ProtoMessage()

func (*MsgDeregisterAsset) Reset

func (m *MsgDeregisterAsset) Reset()

func (*MsgDeregisterAsset) Size

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

func (*MsgDeregisterAsset) String

func (m *MsgDeregisterAsset) String() string

func (*MsgDeregisterAsset) Unmarshal

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

func (*MsgDeregisterAsset) Validate

func (msg *MsgDeregisterAsset) Validate() error

Validate validates the MsgDeregisterAsset instance

func (*MsgDeregisterAsset) XXX_DiscardUnknown

func (m *MsgDeregisterAsset) XXX_DiscardUnknown()

func (*MsgDeregisterAsset) XXX_Marshal

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

func (*MsgDeregisterAsset) XXX_Merge

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

func (*MsgDeregisterAsset) XXX_Size

func (m *MsgDeregisterAsset) XXX_Size() int

func (*MsgDeregisterAsset) XXX_Unmarshal

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

type MsgDeregisterAssetResponse

type MsgDeregisterAssetResponse struct {
}

MsgRegisterAssetResponse is the return value of MsgDeregisterAsset.

func (*MsgDeregisterAssetResponse) Descriptor

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

func (*MsgDeregisterAssetResponse) Marshal

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

func (*MsgDeregisterAssetResponse) MarshalTo

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

func (*MsgDeregisterAssetResponse) MarshalToSizedBuffer

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

func (*MsgDeregisterAssetResponse) ProtoMessage

func (*MsgDeregisterAssetResponse) ProtoMessage()

func (*MsgDeregisterAssetResponse) Reset

func (m *MsgDeregisterAssetResponse) Reset()

func (*MsgDeregisterAssetResponse) Size

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

func (*MsgDeregisterAssetResponse) String

func (m *MsgDeregisterAssetResponse) String() string

func (*MsgDeregisterAssetResponse) Unmarshal

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

func (*MsgDeregisterAssetResponse) XXX_DiscardUnknown

func (m *MsgDeregisterAssetResponse) XXX_DiscardUnknown()

func (*MsgDeregisterAssetResponse) XXX_Marshal

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

func (*MsgDeregisterAssetResponse) XXX_Merge

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

func (*MsgDeregisterAssetResponse) XXX_Size

func (m *MsgDeregisterAssetResponse) XXX_Size() int

func (*MsgDeregisterAssetResponse) XXX_Unmarshal

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

type MsgRegisterAsset

type MsgRegisterAsset 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"`
	// Asset represents the asset to be registered.
	Asset Asset `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

MsgRegisterAsset defines the message structure for the RegisterAsset gRPC service method. It allows the authority to register an asset.

func NewMsgRegisterAsset

func NewMsgRegisterAsset(authority string, asset Asset) *MsgRegisterAsset

NewMsgRegisterAsset creates a new MsgRegisterAsset instance

func (*MsgRegisterAsset) Descriptor

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

func (*MsgRegisterAsset) GetAsset

func (m *MsgRegisterAsset) GetAsset() Asset

func (*MsgRegisterAsset) GetAuthority

func (m *MsgRegisterAsset) GetAuthority() string

func (*MsgRegisterAsset) Marshal

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

func (*MsgRegisterAsset) MarshalTo

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

func (*MsgRegisterAsset) MarshalToSizedBuffer

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

func (*MsgRegisterAsset) ProtoMessage

func (*MsgRegisterAsset) ProtoMessage()

func (*MsgRegisterAsset) Reset

func (m *MsgRegisterAsset) Reset()

func (*MsgRegisterAsset) Size

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

func (*MsgRegisterAsset) String

func (m *MsgRegisterAsset) String() string

func (*MsgRegisterAsset) Unmarshal

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

func (*MsgRegisterAsset) Validate

func (msg *MsgRegisterAsset) Validate() error

Validate validates the MsgRegisterAsset instance

func (*MsgRegisterAsset) XXX_DiscardUnknown

func (m *MsgRegisterAsset) XXX_DiscardUnknown()

func (*MsgRegisterAsset) XXX_Marshal

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

func (*MsgRegisterAsset) XXX_Merge

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

func (*MsgRegisterAsset) XXX_Size

func (m *MsgRegisterAsset) XXX_Size() int

func (*MsgRegisterAsset) XXX_Unmarshal

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

type MsgRegisterAssetResponse

type MsgRegisterAssetResponse struct {
}

MsgRegisterAssetResponse is the return value of MsgRegisterAsset.

func (*MsgRegisterAssetResponse) Descriptor

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

func (*MsgRegisterAssetResponse) Marshal

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

func (*MsgRegisterAssetResponse) MarshalTo

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

func (*MsgRegisterAssetResponse) MarshalToSizedBuffer

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

func (*MsgRegisterAssetResponse) ProtoMessage

func (*MsgRegisterAssetResponse) ProtoMessage()

func (*MsgRegisterAssetResponse) Reset

func (m *MsgRegisterAssetResponse) Reset()

func (*MsgRegisterAssetResponse) Size

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

func (*MsgRegisterAssetResponse) String

func (m *MsgRegisterAssetResponse) String() string

func (*MsgRegisterAssetResponse) Unmarshal

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

func (*MsgRegisterAssetResponse) XXX_DiscardUnknown

func (m *MsgRegisterAssetResponse) XXX_DiscardUnknown()

func (*MsgRegisterAssetResponse) XXX_Marshal

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

func (*MsgRegisterAssetResponse) XXX_Merge

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

func (*MsgRegisterAssetResponse) XXX_Size

func (m *MsgRegisterAssetResponse) XXX_Size() int

func (*MsgRegisterAssetResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// RegisterAsset defines the operation for registering an asset.
	RegisterAsset(context.Context, *MsgRegisterAsset) (*MsgRegisterAssetResponse, error)
	// DeregisterAsset defines the operation for de-registering an asset with
	// its denomination.
	DeregisterAsset(context.Context, *MsgDeregisterAsset) (*MsgDeregisterAssetResponse, error)
}

MsgServer is the server API for Msg service.

type QueryAssetRequest

type QueryAssetRequest struct {
	// Denom is the token denomination for which the ticker is to be queried.
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
}

QueryAssetRequest is the request type for the Query/Asset RPC method.

func NewQueryAssetRequest

func NewQueryAssetRequest(denom string) *QueryAssetRequest

NewQueryAssetRequest creates a new instance of QueryAssetRequest

func (*QueryAssetRequest) Descriptor

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

func (*QueryAssetRequest) GetDenom

func (m *QueryAssetRequest) GetDenom() string

func (*QueryAssetRequest) Marshal

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

func (*QueryAssetRequest) MarshalTo

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

func (*QueryAssetRequest) MarshalToSizedBuffer

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

func (*QueryAssetRequest) ProtoMessage

func (*QueryAssetRequest) ProtoMessage()

func (*QueryAssetRequest) Reset

func (m *QueryAssetRequest) Reset()

func (*QueryAssetRequest) Size

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

func (*QueryAssetRequest) String

func (m *QueryAssetRequest) String() string

func (*QueryAssetRequest) Unmarshal

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

func (*QueryAssetRequest) XXX_DiscardUnknown

func (m *QueryAssetRequest) XXX_DiscardUnknown()

func (*QueryAssetRequest) XXX_Marshal

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

func (*QueryAssetRequest) XXX_Merge

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

func (*QueryAssetRequest) XXX_Size

func (m *QueryAssetRequest) XXX_Size() int

func (*QueryAssetRequest) XXX_Unmarshal

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

type QueryAssetResponse

type QueryAssetResponse struct {
	// Asset is the asset associated with the token denomination.
	Asset Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset"`
}

QueryAssetResponse is the response type for the Query/Asset RPC method.

func (*QueryAssetResponse) Descriptor

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

func (*QueryAssetResponse) GetAsset

func (m *QueryAssetResponse) GetAsset() Asset

func (*QueryAssetResponse) Marshal

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

func (*QueryAssetResponse) MarshalTo

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

func (*QueryAssetResponse) MarshalToSizedBuffer

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

func (*QueryAssetResponse) ProtoMessage

func (*QueryAssetResponse) ProtoMessage()

func (*QueryAssetResponse) Reset

func (m *QueryAssetResponse) Reset()

func (*QueryAssetResponse) Size

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

func (*QueryAssetResponse) String

func (m *QueryAssetResponse) String() string

func (*QueryAssetResponse) Unmarshal

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

func (*QueryAssetResponse) XXX_DiscardUnknown

func (m *QueryAssetResponse) XXX_DiscardUnknown()

func (*QueryAssetResponse) XXX_Marshal

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

func (*QueryAssetResponse) XXX_Merge

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

func (*QueryAssetResponse) XXX_Size

func (m *QueryAssetResponse) XXX_Size() int

func (*QueryAssetResponse) XXX_Unmarshal

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

type QueryAssetsRequest

type QueryAssetsRequest struct {
	// Ticker defines an optional filter parameter to query assets with the given
	// ticker.
	Ticker string `protobuf:"bytes,1,opt,name=ticker,proto3" json:"ticker,omitempty"`
	// Pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAssetsRequest is the request type for the Query/Assets RPC method.

func NewQueryAssetsRequest

func NewQueryAssetsRequest(ticker string, pagination *query.PageRequest) *QueryAssetsRequest

NewQueryAssetsRequest creates a new instance of QueryAssetsRequest

func (*QueryAssetsRequest) Descriptor

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

func (*QueryAssetsRequest) GetPagination

func (m *QueryAssetsRequest) GetPagination() *query.PageRequest

func (*QueryAssetsRequest) GetTicker

func (m *QueryAssetsRequest) GetTicker() string

func (*QueryAssetsRequest) Marshal

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

func (*QueryAssetsRequest) MarshalTo

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

func (*QueryAssetsRequest) MarshalToSizedBuffer

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

func (*QueryAssetsRequest) ProtoMessage

func (*QueryAssetsRequest) ProtoMessage()

func (*QueryAssetsRequest) Reset

func (m *QueryAssetsRequest) Reset()

func (*QueryAssetsRequest) Size

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

func (*QueryAssetsRequest) String

func (m *QueryAssetsRequest) String() string

func (*QueryAssetsRequest) Unmarshal

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

func (*QueryAssetsRequest) XXX_DiscardUnknown

func (m *QueryAssetsRequest) XXX_DiscardUnknown()

func (*QueryAssetsRequest) XXX_Marshal

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

func (*QueryAssetsRequest) XXX_Merge

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

func (*QueryAssetsRequest) XXX_Size

func (m *QueryAssetsRequest) XXX_Size() int

func (*QueryAssetsRequest) XXX_Unmarshal

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

type QueryAssetsResponse

type QueryAssetsResponse struct {
	// Assets represents all the assets registered.
	Assets []Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets"`
	// Pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAssetsResponse is the response type for the Query/Assets RPC method.

func (*QueryAssetsResponse) Descriptor

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

func (*QueryAssetsResponse) GetAssets

func (m *QueryAssetsResponse) GetAssets() []Asset

func (*QueryAssetsResponse) GetPagination

func (m *QueryAssetsResponse) GetPagination() *query.PageResponse

func (*QueryAssetsResponse) Marshal

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

func (*QueryAssetsResponse) MarshalTo

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

func (*QueryAssetsResponse) MarshalToSizedBuffer

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

func (*QueryAssetsResponse) ProtoMessage

func (*QueryAssetsResponse) ProtoMessage()

func (*QueryAssetsResponse) Reset

func (m *QueryAssetsResponse) Reset()

func (*QueryAssetsResponse) Size

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

func (*QueryAssetsResponse) String

func (m *QueryAssetsResponse) String() string

func (*QueryAssetsResponse) Unmarshal

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

func (*QueryAssetsResponse) XXX_DiscardUnknown

func (m *QueryAssetsResponse) XXX_DiscardUnknown()

func (*QueryAssetsResponse) XXX_Marshal

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

func (*QueryAssetsResponse) XXX_Merge

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

func (*QueryAssetsResponse) XXX_Size

func (m *QueryAssetsResponse) XXX_Size() int

func (*QueryAssetsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Assets defined a gRPC query method that returns all assets registered.
	Assets(ctx context.Context, in *QueryAssetsRequest, opts ...grpc.CallOption) (*QueryAssetsResponse, error)
	// Asset defines a gRPC query method that returns the asset associated with
	// the given token denomination.
	Asset(ctx context.Context, in *QueryAssetRequest, opts ...grpc.CallOption) (*QueryAssetResponse, 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 QueryServer

type QueryServer interface {
	// Assets defined a gRPC query method that returns all assets registered.
	Assets(context.Context, *QueryAssetsRequest) (*QueryAssetsResponse, error)
	// Asset defines a gRPC query method that returns the asset associated with
	// the given token denomination.
	Asset(context.Context, *QueryAssetRequest) (*QueryAssetResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) DeregisterAsset

func (*UnimplementedMsgServer) RegisterAsset

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Asset

func (*UnimplementedQueryServer) Assets

Jump to

Keyboard shortcuts

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