types

package
v0.0.0-...-07004f4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeSetDid = "set_ci_information"

	AttributeKeyCi         = "ci"
	AttributeKeyValue      = "information"
	AttributeValueCategory = ModuleName
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "hnp"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey defines message route key
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName
)
View Source
const (
	QueryDocumentGet = "get"
)

Variables

View Source
var (
	ErrInvalidLengthDid        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDid          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDid = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyDidCI  = []byte{0x11}
	KeyVcCI   = []byte{0x12}
	KeyUserCI = []byte{0x13}
)
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 (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var KeyDid_enable = []byte("Didenable")
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func CIStoreKey

func CIStoreKey(ci []byte, info string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

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 ValidInfo

func ValidInfo(info string) error

Types

type Did

type Did struct {
	Information string `protobuf:"bytes,1,opt,name=information,proto3" json:"information,omitempty" yaml:"information"`
	Ci          string `protobuf:"bytes,2,opt,name=ci,proto3" json:"ci,omitempty" yaml:"ci"`
	Value       string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty" yaml:"value"`
}

func NewDid

func NewDid(info string, ci string, value string) Did

func (*Did) Descriptor

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

func (*Did) GetCi

func (m *Did) GetCi() string

func (*Did) GetInformation

func (m *Did) GetInformation() string

func (*Did) GetValue

func (m *Did) GetValue() string

func (*Did) Marshal

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

func (*Did) MarshalTo

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

func (*Did) MarshalToSizedBuffer

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

func (*Did) ProtoMessage

func (*Did) ProtoMessage()

func (*Did) Reset

func (m *Did) Reset()

func (*Did) Size

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

func (*Did) String

func (m *Did) String() string

func (*Did) Unmarshal

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

func (*Did) XXX_DiscardUnknown

func (m *Did) XXX_DiscardUnknown()

func (*Did) XXX_Marshal

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

func (*Did) XXX_Merge

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

func (*Did) XXX_Size

func (m *Did) XXX_Size() int

func (*Did) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	SetCiInformation(ctx context.Context, in *MsgSetCiInformationRequest, opts ...grpc.CallOption) (*MsgSetCiInformationResponse, 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 {
	SetCiInformation(context.Context, *MsgSetCiInformationRequest) (*MsgSetCiInformationResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSetCiInformationRequest

type MsgSetCiInformationRequest struct {
	Information string `protobuf:"bytes,1,opt,name=information,proto3" json:"information,omitempty" yaml:"information"`
	Ci          string `protobuf:"bytes,2,opt,name=ci,proto3" json:"ci,omitempty" yaml:"ci"`
	Value       string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty" yaml:"value"`
	FromAddress string `protobuf:"bytes,4,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" yaml:"from_address"`
}

func NewMsgSetCiInformationRequest

func NewMsgSetCiInformationRequest(info string, ci string, value string, from string) *MsgSetCiInformationRequest

func (*MsgSetCiInformationRequest) Descriptor

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

func (*MsgSetCiInformationRequest) GetCi

func (*MsgSetCiInformationRequest) GetFromAddress

func (m *MsgSetCiInformationRequest) GetFromAddress() string

func (*MsgSetCiInformationRequest) GetInformation

func (m *MsgSetCiInformationRequest) GetInformation() string

func (MsgSetCiInformationRequest) GetSignBytes

func (msg MsgSetCiInformationRequest) GetSignBytes() []byte

func (MsgSetCiInformationRequest) GetSigners

func (msg MsgSetCiInformationRequest) GetSigners() []sdk.AccAddress

func (*MsgSetCiInformationRequest) GetValue

func (m *MsgSetCiInformationRequest) GetValue() string

func (*MsgSetCiInformationRequest) Marshal

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

func (*MsgSetCiInformationRequest) MarshalTo

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

func (*MsgSetCiInformationRequest) MarshalToSizedBuffer

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

func (*MsgSetCiInformationRequest) ProtoMessage

func (*MsgSetCiInformationRequest) ProtoMessage()

func (*MsgSetCiInformationRequest) Reset

func (m *MsgSetCiInformationRequest) Reset()

func (MsgSetCiInformationRequest) Route

func (msg MsgSetCiInformationRequest) Route() string

func (*MsgSetCiInformationRequest) Size

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

func (*MsgSetCiInformationRequest) String

func (m *MsgSetCiInformationRequest) String() string

func (MsgSetCiInformationRequest) Type

func (*MsgSetCiInformationRequest) Unmarshal

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

func (MsgSetCiInformationRequest) ValidateBasic

func (msg MsgSetCiInformationRequest) ValidateBasic() error

func (*MsgSetCiInformationRequest) XXX_DiscardUnknown

func (m *MsgSetCiInformationRequest) XXX_DiscardUnknown()

func (*MsgSetCiInformationRequest) XXX_Marshal

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

func (*MsgSetCiInformationRequest) XXX_Merge

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

func (*MsgSetCiInformationRequest) XXX_Size

func (m *MsgSetCiInformationRequest) XXX_Size() int

func (*MsgSetCiInformationRequest) XXX_Unmarshal

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

type MsgSetCiInformationResponse

type MsgSetCiInformationResponse struct {
}

func (*MsgSetCiInformationResponse) Descriptor

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

func (*MsgSetCiInformationResponse) Marshal

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

func (*MsgSetCiInformationResponse) MarshalTo

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

func (*MsgSetCiInformationResponse) MarshalToSizedBuffer

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

func (*MsgSetCiInformationResponse) ProtoMessage

func (*MsgSetCiInformationResponse) ProtoMessage()

func (*MsgSetCiInformationResponse) Reset

func (m *MsgSetCiInformationResponse) Reset()

func (*MsgSetCiInformationResponse) Size

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

func (*MsgSetCiInformationResponse) String

func (m *MsgSetCiInformationResponse) String() string

func (*MsgSetCiInformationResponse) Unmarshal

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

func (*MsgSetCiInformationResponse) XXX_DiscardUnknown

func (m *MsgSetCiInformationResponse) XXX_DiscardUnknown()

func (*MsgSetCiInformationResponse) XXX_Marshal

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

func (*MsgSetCiInformationResponse) XXX_Merge

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

func (*MsgSetCiInformationResponse) XXX_Size

func (m *MsgSetCiInformationResponse) XXX_Size() int

func (*MsgSetCiInformationResponse) XXX_Unmarshal

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

type Params

type Params struct {
	DidEnable bool `protobuf:"varint,1,opt,name=did_enable,json=didEnable,proto3" json:"did_enable,omitempty" yaml:"did_enable"`
}

func DefaultParams

func DefaultParams() Params

func NewParams

func NewParams(did_enable bool) Params

func (*Params) Descriptor

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

func (*Params) GetDidEnable

func (m *Params) GetDidEnable() 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

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) 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 {
	GetCiInfomation(ctx context.Context, in *QueryGetCiInfomationRequest, opts ...grpc.CallOption) (*QueryGetCiInfomationReponse, 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 QueryGetCiInfomationReponse

type QueryGetCiInfomationReponse struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

func (*QueryGetCiInfomationReponse) Descriptor

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

func (*QueryGetCiInfomationReponse) GetValue

func (m *QueryGetCiInfomationReponse) GetValue() string

func (*QueryGetCiInfomationReponse) Marshal

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

func (*QueryGetCiInfomationReponse) MarshalTo

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

func (*QueryGetCiInfomationReponse) MarshalToSizedBuffer

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

func (*QueryGetCiInfomationReponse) ProtoMessage

func (*QueryGetCiInfomationReponse) ProtoMessage()

func (*QueryGetCiInfomationReponse) Reset

func (m *QueryGetCiInfomationReponse) Reset()

func (*QueryGetCiInfomationReponse) Size

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

func (*QueryGetCiInfomationReponse) String

func (m *QueryGetCiInfomationReponse) String() string

func (*QueryGetCiInfomationReponse) Unmarshal

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

func (*QueryGetCiInfomationReponse) XXX_DiscardUnknown

func (m *QueryGetCiInfomationReponse) XXX_DiscardUnknown()

func (*QueryGetCiInfomationReponse) XXX_Marshal

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

func (*QueryGetCiInfomationReponse) XXX_Merge

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

func (*QueryGetCiInfomationReponse) XXX_Size

func (m *QueryGetCiInfomationReponse) XXX_Size() int

func (*QueryGetCiInfomationReponse) XXX_Unmarshal

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

type QueryGetCiInfomationRequest

type QueryGetCiInfomationRequest struct {
	Info string `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Ci   string `protobuf:"bytes,2,opt,name=ci,proto3" json:"ci,omitempty"`
}

func NewQueryGetCiInfomationRequest

func NewQueryGetCiInfomationRequest(info string, ci string) *QueryGetCiInfomationRequest

func (*QueryGetCiInfomationRequest) Descriptor

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

func (*QueryGetCiInfomationRequest) GetCi

func (*QueryGetCiInfomationRequest) GetInfo

func (m *QueryGetCiInfomationRequest) GetInfo() string

func (*QueryGetCiInfomationRequest) Marshal

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

func (*QueryGetCiInfomationRequest) MarshalTo

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

func (*QueryGetCiInfomationRequest) MarshalToSizedBuffer

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

func (*QueryGetCiInfomationRequest) ProtoMessage

func (*QueryGetCiInfomationRequest) ProtoMessage()

func (*QueryGetCiInfomationRequest) Reset

func (m *QueryGetCiInfomationRequest) Reset()

func (*QueryGetCiInfomationRequest) Size

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

func (*QueryGetCiInfomationRequest) String

func (m *QueryGetCiInfomationRequest) String() string

func (*QueryGetCiInfomationRequest) Unmarshal

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

func (*QueryGetCiInfomationRequest) XXX_DiscardUnknown

func (m *QueryGetCiInfomationRequest) XXX_DiscardUnknown()

func (*QueryGetCiInfomationRequest) XXX_Marshal

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

func (*QueryGetCiInfomationRequest) XXX_Merge

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

func (*QueryGetCiInfomationRequest) XXX_Size

func (m *QueryGetCiInfomationRequest) XXX_Size() int

func (*QueryGetCiInfomationRequest) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	GetCiInfomation(context.Context, *QueryGetCiInfomationRequest) (*QueryGetCiInfomationReponse, 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) SetCiInformation

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) GetCiInfomation

type Value

type Value struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty" yaml:"value"`
}

func NewValue

func NewValue(value string) Value

func (*Value) Descriptor

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

func (*Value) GetValue

func (m *Value) GetValue() string

func (*Value) Marshal

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

func (*Value) MarshalTo

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

func (*Value) MarshalToSizedBuffer

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

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) Size

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

func (*Value) String

func (m *Value) String() string

func (*Value) Unmarshal

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

func (*Value) XXX_DiscardUnknown

func (m *Value) XXX_DiscardUnknown()

func (*Value) XXX_Marshal

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

func (*Value) XXX_Merge

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

func (*Value) XXX_Size

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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