types

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 20 Imported by: 94

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// SubModuleName defines the interchain accounts controller module name
	SubModuleName = "icacontroller"

	// StoreKey is the store key string for the interchain accounts controller module
	StoreKey = SubModuleName
)
View Source
const (
	// DefaultControllerEnabled is the default value for the controller param (set to true)
	DefaultControllerEnabled = true
)

Variables

View Source
var (
	ErrInvalidLengthController        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowController          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupController = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrControllerSubModuleDisabled = sdkerrors.Register(SubModuleName, 2, "controller submodule is disabled")
)

ICA Controller sentinel errors

View Source
var KeyControllerEnabled = []byte("ControllerEnabled")

KeyControllerEnabled is the store key for ControllerEnabled Params

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable type declaration for parameters

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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type Params

type Params struct {
	// controller_enabled enables or disables the controller submodule.
	ControllerEnabled bool `` /* 139-byte string literal not displayed */
}

Params defines the set of on-chain interchain accounts parameters. The following parameters may be used to disable the controller submodule.

func DefaultParams

func DefaultParams() Params

DefaultParams is the default parameter configuration for the controller submodule

func NewParams

func NewParams(enableController bool) Params

NewParams creates a new parameter configuration for the controller submodule

func (*Params) Descriptor

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

func (*Params) GetControllerEnabled

func (m *Params) GetControllerEnabled() bool

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs implements params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates all controller submodule parameters

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// InterchainAccount returns the interchain account address for a given owner address on a given connection
	InterchainAccount(ctx context.Context, in *QueryInterchainAccountRequest, opts ...grpc.CallOption) (*QueryInterchainAccountResponse, error)
	// Params queries all parameters of the ICA controller submodule.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 QueryInterchainAccountRequest added in v3.3.0

type QueryInterchainAccountRequest struct {
	Owner        string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
}

QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method.

func (*QueryInterchainAccountRequest) Descriptor added in v3.3.0

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

func (*QueryInterchainAccountRequest) GetConnectionId added in v3.3.0

func (m *QueryInterchainAccountRequest) GetConnectionId() string

func (*QueryInterchainAccountRequest) GetOwner added in v3.3.0

func (m *QueryInterchainAccountRequest) GetOwner() string

func (*QueryInterchainAccountRequest) Marshal added in v3.3.0

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

func (*QueryInterchainAccountRequest) MarshalTo added in v3.3.0

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

func (*QueryInterchainAccountRequest) MarshalToSizedBuffer added in v3.3.0

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

func (*QueryInterchainAccountRequest) ProtoMessage added in v3.3.0

func (*QueryInterchainAccountRequest) ProtoMessage()

func (*QueryInterchainAccountRequest) Reset added in v3.3.0

func (m *QueryInterchainAccountRequest) Reset()

func (*QueryInterchainAccountRequest) Size added in v3.3.0

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

func (*QueryInterchainAccountRequest) String added in v3.3.0

func (*QueryInterchainAccountRequest) Unmarshal added in v3.3.0

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

func (*QueryInterchainAccountRequest) XXX_DiscardUnknown added in v3.3.0

func (m *QueryInterchainAccountRequest) XXX_DiscardUnknown()

func (*QueryInterchainAccountRequest) XXX_Marshal added in v3.3.0

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

func (*QueryInterchainAccountRequest) XXX_Merge added in v3.3.0

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

func (*QueryInterchainAccountRequest) XXX_Size added in v3.3.0

func (m *QueryInterchainAccountRequest) XXX_Size() int

func (*QueryInterchainAccountRequest) XXX_Unmarshal added in v3.3.0

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

type QueryInterchainAccountResponse added in v3.3.0

type QueryInterchainAccountResponse struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method.

func (*QueryInterchainAccountResponse) Descriptor added in v3.3.0

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

func (*QueryInterchainAccountResponse) GetAddress added in v3.3.0

func (m *QueryInterchainAccountResponse) GetAddress() string

func (*QueryInterchainAccountResponse) Marshal added in v3.3.0

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

func (*QueryInterchainAccountResponse) MarshalTo added in v3.3.0

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

func (*QueryInterchainAccountResponse) MarshalToSizedBuffer added in v3.3.0

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

func (*QueryInterchainAccountResponse) ProtoMessage added in v3.3.0

func (*QueryInterchainAccountResponse) ProtoMessage()

func (*QueryInterchainAccountResponse) Reset added in v3.3.0

func (m *QueryInterchainAccountResponse) Reset()

func (*QueryInterchainAccountResponse) Size added in v3.3.0

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

func (*QueryInterchainAccountResponse) String added in v3.3.0

func (*QueryInterchainAccountResponse) Unmarshal added in v3.3.0

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

func (*QueryInterchainAccountResponse) XXX_DiscardUnknown added in v3.3.0

func (m *QueryInterchainAccountResponse) XXX_DiscardUnknown()

func (*QueryInterchainAccountResponse) XXX_Marshal added in v3.3.0

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

func (*QueryInterchainAccountResponse) XXX_Merge added in v3.3.0

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

func (*QueryInterchainAccountResponse) XXX_Size added in v3.3.0

func (m *QueryInterchainAccountResponse) XXX_Size() int

func (*QueryInterchainAccountResponse) XXX_Unmarshal added in v3.3.0

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	// params defines the parameters of the module.
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() *Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// InterchainAccount returns the interchain account address for a given owner address on a given connection
	InterchainAccount(context.Context, *QueryInterchainAccountRequest) (*QueryInterchainAccountResponse, error)
	// Params queries all parameters of the ICA controller submodule.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, 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) InterchainAccount added in v3.3.0

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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