v1

package
v0.0.0-...-324de33 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMsg        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsg          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMsg = 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 (
	ErrInvalidLengthState        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowState          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupState = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers interfaces with the interface registry.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers legacy amino codec.

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)

Types

type Admin

type Admin struct {
	// address is the address of the admin account.
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

Admin defines the table and properties of the admin.

func (*Admin) Descriptor

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

func (*Admin) GetAddress

func (m *Admin) GetAddress() []byte

func (*Admin) Marshal

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

func (*Admin) MarshalTo

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

func (*Admin) MarshalToSizedBuffer

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

func (*Admin) ProtoMessage

func (*Admin) ProtoMessage()

func (*Admin) Reset

func (m *Admin) Reset()

func (*Admin) Size

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

func (*Admin) String

func (m *Admin) String() string

func (*Admin) Unmarshal

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

func (*Admin) Validate

func (m *Admin) Validate() error

Validate validates Admin.

func (*Admin) XXX_DiscardUnknown

func (m *Admin) XXX_DiscardUnknown()

func (*Admin) XXX_Marshal

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

func (*Admin) XXX_Merge

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

func (*Admin) XXX_Size

func (m *Admin) XXX_Size() int

func (*Admin) XXX_Unmarshal

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

type EventUpdateAdmin

type EventUpdateAdmin struct {
	// admin is the address of the admin account.
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
	// new_admin is the address of the new admin account.
	NewAdmin string `protobuf:"bytes,2,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"`
}

EventUpdateAdmin is an event emitted when the admin is updated.

func (*EventUpdateAdmin) Descriptor

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

func (*EventUpdateAdmin) GetAdmin

func (m *EventUpdateAdmin) GetAdmin() string

func (*EventUpdateAdmin) GetNewAdmin

func (m *EventUpdateAdmin) GetNewAdmin() string

func (*EventUpdateAdmin) Marshal

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

func (*EventUpdateAdmin) MarshalTo

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

func (*EventUpdateAdmin) MarshalToSizedBuffer

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

func (*EventUpdateAdmin) ProtoMessage

func (*EventUpdateAdmin) ProtoMessage()

func (*EventUpdateAdmin) Reset

func (m *EventUpdateAdmin) Reset()

func (*EventUpdateAdmin) Size

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

func (*EventUpdateAdmin) String

func (m *EventUpdateAdmin) String() string

func (*EventUpdateAdmin) Unmarshal

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

func (*EventUpdateAdmin) XXX_DiscardUnknown

func (m *EventUpdateAdmin) XXX_DiscardUnknown()

func (*EventUpdateAdmin) XXX_Marshal

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

func (*EventUpdateAdmin) XXX_Merge

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

func (*EventUpdateAdmin) XXX_Size

func (m *EventUpdateAdmin) XXX_Size() int

func (*EventUpdateAdmin) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// UpdateAdmin updates the admin account.
	UpdateAdmin(ctx context.Context, in *MsgUpdateAdmin, opts ...grpc.CallOption) (*MsgUpdateAdminResponse, 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 MsgServer

type MsgServer interface {
	// UpdateAdmin updates the admin account.
	UpdateAdmin(context.Context, *MsgUpdateAdmin) (*MsgUpdateAdminResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateAdmin

type MsgUpdateAdmin struct {
	// admin is the address of the admin account.
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
	// new_admin is the address of the new admin account.
	NewAdmin string `protobuf:"bytes,2,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"`
}

MsgUpdateAdmin is the Msg/UpdateAdmin request type.

func (*MsgUpdateAdmin) Descriptor

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

func (*MsgUpdateAdmin) GetAdmin

func (m *MsgUpdateAdmin) GetAdmin() string

func (*MsgUpdateAdmin) GetNewAdmin

func (m *MsgUpdateAdmin) GetNewAdmin() string

func (MsgUpdateAdmin) GetSigners

func (m MsgUpdateAdmin) GetSigners() []sdk.AccAddress

GetSigners returns the expected signers for MsgUpdateAdmin.

func (*MsgUpdateAdmin) Marshal

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

func (*MsgUpdateAdmin) MarshalTo

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

func (*MsgUpdateAdmin) MarshalToSizedBuffer

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

func (*MsgUpdateAdmin) ProtoMessage

func (*MsgUpdateAdmin) ProtoMessage()

func (*MsgUpdateAdmin) Reset

func (m *MsgUpdateAdmin) Reset()

func (MsgUpdateAdmin) Route

func (m MsgUpdateAdmin) Route() string

Route implements the LegacyMsg interface.

func (*MsgUpdateAdmin) Size

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

func (*MsgUpdateAdmin) String

func (m *MsgUpdateAdmin) String() string

func (MsgUpdateAdmin) Type

func (m MsgUpdateAdmin) Type() string

Type implements the LegacyMsg interface.

func (*MsgUpdateAdmin) Unmarshal

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

func (MsgUpdateAdmin) ValidateBasic

func (m MsgUpdateAdmin) ValidateBasic() error

ValidateBasic performs stateless validation on MsgUpdateAdmin.

func (*MsgUpdateAdmin) XXX_DiscardUnknown

func (m *MsgUpdateAdmin) XXX_DiscardUnknown()

func (*MsgUpdateAdmin) XXX_Marshal

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

func (*MsgUpdateAdmin) XXX_Merge

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

func (*MsgUpdateAdmin) XXX_Size

func (m *MsgUpdateAdmin) XXX_Size() int

func (*MsgUpdateAdmin) XXX_Unmarshal

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

type MsgUpdateAdminResponse

type MsgUpdateAdminResponse struct {
	// admin is the address of the admin account.
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
	// new_admin is the address of the new admin account.
	NewAdmin string `protobuf:"bytes,2,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty"`
}

MsgUpdateAdminResponse is the Msg/UpdateAdmin response type.

func (*MsgUpdateAdminResponse) Descriptor

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

func (*MsgUpdateAdminResponse) GetAdmin

func (m *MsgUpdateAdminResponse) GetAdmin() string

func (*MsgUpdateAdminResponse) GetNewAdmin

func (m *MsgUpdateAdminResponse) GetNewAdmin() string

func (*MsgUpdateAdminResponse) Marshal

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

func (*MsgUpdateAdminResponse) MarshalTo

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

func (*MsgUpdateAdminResponse) MarshalToSizedBuffer

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

func (*MsgUpdateAdminResponse) ProtoMessage

func (*MsgUpdateAdminResponse) ProtoMessage()

func (*MsgUpdateAdminResponse) Reset

func (m *MsgUpdateAdminResponse) Reset()

func (*MsgUpdateAdminResponse) Size

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

func (*MsgUpdateAdminResponse) String

func (m *MsgUpdateAdminResponse) String() string

func (*MsgUpdateAdminResponse) Unmarshal

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

func (*MsgUpdateAdminResponse) XXX_DiscardUnknown

func (m *MsgUpdateAdminResponse) XXX_DiscardUnknown()

func (*MsgUpdateAdminResponse) XXX_Marshal

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

func (*MsgUpdateAdminResponse) XXX_Merge

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

func (*MsgUpdateAdminResponse) XXX_Size

func (m *MsgUpdateAdminResponse) XXX_Size() int

func (*MsgUpdateAdminResponse) XXX_Unmarshal

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

type QueryAdminRequest

type QueryAdminRequest struct {
}

QueryAdminRequest is the Query/Admin request type.

func (*QueryAdminRequest) Descriptor

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

func (*QueryAdminRequest) Marshal

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

func (*QueryAdminRequest) MarshalTo

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

func (*QueryAdminRequest) MarshalToSizedBuffer

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

func (*QueryAdminRequest) ProtoMessage

func (*QueryAdminRequest) ProtoMessage()

func (*QueryAdminRequest) Reset

func (m *QueryAdminRequest) Reset()

func (*QueryAdminRequest) Size

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

func (*QueryAdminRequest) String

func (m *QueryAdminRequest) String() string

func (*QueryAdminRequest) Unmarshal

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

func (*QueryAdminRequest) XXX_DiscardUnknown

func (m *QueryAdminRequest) XXX_DiscardUnknown()

func (*QueryAdminRequest) XXX_Marshal

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

func (*QueryAdminRequest) XXX_Merge

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

func (*QueryAdminRequest) XXX_Size

func (m *QueryAdminRequest) XXX_Size() int

func (*QueryAdminRequest) XXX_Unmarshal

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

type QueryAdminResponse

type QueryAdminResponse struct {
	// admin is the address of the admin account.
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
}

QueryAdminResponse is the Query/Admin response type.

func (*QueryAdminResponse) Descriptor

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

func (*QueryAdminResponse) GetAdmin

func (m *QueryAdminResponse) GetAdmin() string

func (*QueryAdminResponse) Marshal

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

func (*QueryAdminResponse) MarshalTo

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

func (*QueryAdminResponse) MarshalToSizedBuffer

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

func (*QueryAdminResponse) ProtoMessage

func (*QueryAdminResponse) ProtoMessage()

func (*QueryAdminResponse) Reset

func (m *QueryAdminResponse) Reset()

func (*QueryAdminResponse) Size

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

func (*QueryAdminResponse) String

func (m *QueryAdminResponse) String() string

func (*QueryAdminResponse) Unmarshal

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

func (*QueryAdminResponse) XXX_DiscardUnknown

func (m *QueryAdminResponse) XXX_DiscardUnknown()

func (*QueryAdminResponse) XXX_Marshal

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

func (*QueryAdminResponse) XXX_Merge

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

func (*QueryAdminResponse) XXX_Size

func (m *QueryAdminResponse) XXX_Size() int

func (*QueryAdminResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Admin queries the admin account.
	Admin(ctx context.Context, in *QueryAdminRequest, opts ...grpc.CallOption) (*QueryAdminResponse, 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 {
	// Admin queries the admin account.
	Admin(context.Context, *QueryAdminRequest) (*QueryAdminResponse, 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) UpdateAdmin

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Admin

Jump to

Keyboard shortcuts

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