types

package
v0.0.0-...-3f2bb17 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ModuleName  = "blog"
	StoreKey    = ModuleName
	RouterKey   = ModuleName
	MemStoreKey = "mem_blog"

	// GovModuleName duplicates the gov module's name to avoid a dependency with x/gov.
	GovModuleName = "gov"
)

Module basics

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 is the prefix for module parameters
	ParamsKey = []byte("Params/")

	// PostKey is the prefix for individual post entries
	PostKey = []byte("Post/value/")

	// PostCountKey is the prefix for the post counter
	PostCountKey = []byte("Post/count/")
)

Collection prefixes / counters

View Source
var (
	ErrInvalidLengthModule        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModule          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupModule = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPost        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPost          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPost = 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 (
	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 (
	ErrInvalidSigner = errors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message")
)

x/blog module sentinel errors

View Source
var Msg_serviceDesc = _Msg_serviceDesc
View Source
var Query_serviceDesc = _Query_serviceDesc

Functions

func RegisterInterfaces

func RegisterInterfaces(registrar codectypes.InterfaceRegistry)

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 AuthKeeper

type AuthKeeper interface {
	AddressCodec() address.Codec
	GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation

}

AuthKeeper defines the expected interface for the Auth module.

type BankKeeper

type BankKeeper interface {
	SpendableCoins(context.Context, sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface for the Bank module.

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module.
	Params    Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	PostList  []Post `protobuf:"bytes,2,rep,name=post_list,json=postList,proto3" json:"post_list"`
	PostCount uint64 `protobuf:"varint,3,opt,name=post_count,json=postCount,proto3" json:"post_count,omitempty"`
}

GenesisState defines the blog module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPostCount

func (m *GenesisState) GetPostCount() uint64

func (*GenesisState) GetPostList

func (m *GenesisState) GetPostList() []Post

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 (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 Module

type Module struct {
	// authority defines the custom module authority.
	// If not set, defaults to the governance module.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
}

Module is the config object for the module.

func (*Module) Descriptor

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

func (*Module) GetAuthority

func (m *Module) GetAuthority() string

func (*Module) Marshal

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

func (*Module) MarshalTo

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

func (*Module) MarshalToSizedBuffer

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

func (*Module) ProtoMessage

func (*Module) ProtoMessage()

func (*Module) Reset

func (m *Module) Reset()

func (*Module) Size

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

func (*Module) String

func (m *Module) String() string

func (*Module) Unmarshal

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

func (*Module) XXX_DiscardUnknown

func (m *Module) XXX_DiscardUnknown()

func (*Module) XXX_Marshal

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

func (*Module) XXX_Merge

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

func (*Module) XXX_Size

func (m *Module) XXX_Size() int

func (*Module) XXX_Unmarshal

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

type MsgClient

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)
	// CreatePost defines the CreatePost RPC.
	CreatePost(ctx context.Context, in *MsgCreatePost, opts ...grpc.CallOption) (*MsgCreatePostResponse, 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 MsgCreatePost

type MsgCreatePost struct {
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Title   string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
}

MsgCreatePost defines the MsgCreatePost message.

func (*MsgCreatePost) Descriptor

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

func (*MsgCreatePost) GetContent

func (m *MsgCreatePost) GetContent() string

func (*MsgCreatePost) GetCreator

func (m *MsgCreatePost) GetCreator() string

func (*MsgCreatePost) GetTitle

func (m *MsgCreatePost) GetTitle() string

func (*MsgCreatePost) Marshal

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

func (*MsgCreatePost) MarshalTo

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

func (*MsgCreatePost) MarshalToSizedBuffer

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

func (*MsgCreatePost) ProtoMessage

func (*MsgCreatePost) ProtoMessage()

func (*MsgCreatePost) Reset

func (m *MsgCreatePost) Reset()

func (*MsgCreatePost) Size

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

func (*MsgCreatePost) String

func (m *MsgCreatePost) String() string

func (*MsgCreatePost) Unmarshal

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

func (*MsgCreatePost) XXX_DiscardUnknown

func (m *MsgCreatePost) XXX_DiscardUnknown()

func (*MsgCreatePost) XXX_Marshal

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

func (*MsgCreatePost) XXX_Merge

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

func (*MsgCreatePost) XXX_Size

func (m *MsgCreatePost) XXX_Size() int

func (*MsgCreatePost) XXX_Unmarshal

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

type MsgCreatePostResponse

type MsgCreatePostResponse struct {
}

MsgCreatePostResponse defines the MsgCreatePostResponse message.

func (*MsgCreatePostResponse) Descriptor

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

func (*MsgCreatePostResponse) Marshal

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

func (*MsgCreatePostResponse) MarshalTo

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

func (*MsgCreatePostResponse) MarshalToSizedBuffer

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

func (*MsgCreatePostResponse) ProtoMessage

func (*MsgCreatePostResponse) ProtoMessage()

func (*MsgCreatePostResponse) Reset

func (m *MsgCreatePostResponse) Reset()

func (*MsgCreatePostResponse) Size

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

func (*MsgCreatePostResponse) String

func (m *MsgCreatePostResponse) String() string

func (*MsgCreatePostResponse) Unmarshal

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

func (*MsgCreatePostResponse) XXX_DiscardUnknown

func (m *MsgCreatePostResponse) XXX_DiscardUnknown()

func (*MsgCreatePostResponse) XXX_Marshal

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

func (*MsgCreatePostResponse) XXX_Merge

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

func (*MsgCreatePostResponse) XXX_Size

func (m *MsgCreatePostResponse) XXX_Size() int

func (*MsgCreatePostResponse) XXX_Unmarshal

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

type MsgServer

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)
	// CreatePost defines the CreatePost RPC.
	CreatePost(context.Context, *MsgCreatePost) (*MsgCreatePostResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

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"`
	// 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

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type ParamSubspace

type ParamSubspace interface {
	Get(context.Context, []byte, interface{})
	Set(context.Context, []byte, interface{})
}

ParamSubspace defines the expected Subspace interface for parameters.

type Params

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns default module parameters.

func (*Params) Descriptor

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

func (*Params) Equal

func (this *Params) Equal(that interface{}) 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) 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 performs basic validation of module 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 Post

type Post struct {
	Id      uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title   string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Body    string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
}

Post defines the Post message.

func (*Post) Descriptor

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

func (*Post) GetBody

func (m *Post) GetBody() string

func (*Post) GetCreator

func (m *Post) GetCreator() string

func (*Post) GetId

func (m *Post) GetId() uint64

func (*Post) GetTitle

func (m *Post) GetTitle() string

func (*Post) Marshal

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

func (*Post) MarshalTo

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

func (*Post) MarshalToSizedBuffer

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

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) Reset

func (m *Post) Reset()

func (*Post) Size

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

func (*Post) String

func (m *Post) String() string

func (*Post) Unmarshal

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

func (*Post) XXX_DiscardUnknown

func (m *Post) XXX_DiscardUnknown()

func (*Post) XXX_Marshal

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

func (*Post) XXX_Merge

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

func (*Post) XXX_Size

func (m *Post) XXX_Size() int

func (*Post) XXX_Unmarshal

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

type QueryAllPostRequest

type QueryAllPostRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAllPostRequest defines the QueryAllPostRequest message.

func (*QueryAllPostRequest) Descriptor

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

func (*QueryAllPostRequest) GetPagination

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

func (*QueryAllPostRequest) Marshal

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

func (*QueryAllPostRequest) MarshalTo

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

func (*QueryAllPostRequest) MarshalToSizedBuffer

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

func (*QueryAllPostRequest) ProtoMessage

func (*QueryAllPostRequest) ProtoMessage()

func (*QueryAllPostRequest) Reset

func (m *QueryAllPostRequest) Reset()

func (*QueryAllPostRequest) Size

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

func (*QueryAllPostRequest) String

func (m *QueryAllPostRequest) String() string

func (*QueryAllPostRequest) Unmarshal

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

func (*QueryAllPostRequest) XXX_DiscardUnknown

func (m *QueryAllPostRequest) XXX_DiscardUnknown()

func (*QueryAllPostRequest) XXX_Marshal

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

func (*QueryAllPostRequest) XXX_Merge

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

func (*QueryAllPostRequest) XXX_Size

func (m *QueryAllPostRequest) XXX_Size() int

func (*QueryAllPostRequest) XXX_Unmarshal

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

type QueryAllPostResponse

type QueryAllPostResponse struct {
	Post       []Post              `protobuf:"bytes,1,rep,name=post,proto3" json:"post"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAllPostResponse defines the QueryAllPostResponse message.

func (*QueryAllPostResponse) Descriptor

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

func (*QueryAllPostResponse) GetPagination

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

func (*QueryAllPostResponse) GetPost

func (m *QueryAllPostResponse) GetPost() []Post

func (*QueryAllPostResponse) Marshal

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

func (*QueryAllPostResponse) MarshalTo

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

func (*QueryAllPostResponse) MarshalToSizedBuffer

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

func (*QueryAllPostResponse) ProtoMessage

func (*QueryAllPostResponse) ProtoMessage()

func (*QueryAllPostResponse) Reset

func (m *QueryAllPostResponse) Reset()

func (*QueryAllPostResponse) Size

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

func (*QueryAllPostResponse) String

func (m *QueryAllPostResponse) String() string

func (*QueryAllPostResponse) Unmarshal

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

func (*QueryAllPostResponse) XXX_DiscardUnknown

func (m *QueryAllPostResponse) XXX_DiscardUnknown()

func (*QueryAllPostResponse) XXX_Marshal

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

func (*QueryAllPostResponse) XXX_Merge

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

func (*QueryAllPostResponse) XXX_Size

func (m *QueryAllPostResponse) XXX_Size() int

func (*QueryAllPostResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// GetPost queries a single Post by id.
	GetPost(ctx context.Context, in *QueryGetPostRequest, opts ...grpc.CallOption) (*QueryGetPostResponse, error)
	// ListPost queries a paginated list of Post items.
	ListPost(ctx context.Context, in *QueryAllPostRequest, opts ...grpc.CallOption) (*QueryAllPostResponse, 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 QueryGetPostRequest

type QueryGetPostRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

QueryGetPostRequest defines the QueryGetPostRequest message.

func (*QueryGetPostRequest) Descriptor

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

func (*QueryGetPostRequest) GetId

func (m *QueryGetPostRequest) GetId() uint64

func (*QueryGetPostRequest) Marshal

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

func (*QueryGetPostRequest) MarshalTo

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

func (*QueryGetPostRequest) MarshalToSizedBuffer

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

func (*QueryGetPostRequest) ProtoMessage

func (*QueryGetPostRequest) ProtoMessage()

func (*QueryGetPostRequest) Reset

func (m *QueryGetPostRequest) Reset()

func (*QueryGetPostRequest) Size

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

func (*QueryGetPostRequest) String

func (m *QueryGetPostRequest) String() string

func (*QueryGetPostRequest) Unmarshal

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

func (*QueryGetPostRequest) XXX_DiscardUnknown

func (m *QueryGetPostRequest) XXX_DiscardUnknown()

func (*QueryGetPostRequest) XXX_Marshal

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

func (*QueryGetPostRequest) XXX_Merge

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

func (*QueryGetPostRequest) XXX_Size

func (m *QueryGetPostRequest) XXX_Size() int

func (*QueryGetPostRequest) XXX_Unmarshal

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

type QueryGetPostResponse

type QueryGetPostResponse struct {
	Post Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post"`
}

QueryGetPostResponse defines the QueryGetPostResponse message.

func (*QueryGetPostResponse) Descriptor

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

func (*QueryGetPostResponse) GetPost

func (m *QueryGetPostResponse) GetPost() Post

func (*QueryGetPostResponse) Marshal

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

func (*QueryGetPostResponse) MarshalTo

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

func (*QueryGetPostResponse) MarshalToSizedBuffer

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

func (*QueryGetPostResponse) ProtoMessage

func (*QueryGetPostResponse) ProtoMessage()

func (*QueryGetPostResponse) Reset

func (m *QueryGetPostResponse) Reset()

func (*QueryGetPostResponse) Size

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

func (*QueryGetPostResponse) String

func (m *QueryGetPostResponse) String() string

func (*QueryGetPostResponse) Unmarshal

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

func (*QueryGetPostResponse) XXX_DiscardUnknown

func (m *QueryGetPostResponse) XXX_DiscardUnknown()

func (*QueryGetPostResponse) XXX_Marshal

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

func (*QueryGetPostResponse) XXX_Merge

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

func (*QueryGetPostResponse) XXX_Size

func (m *QueryGetPostResponse) XXX_Size() int

func (*QueryGetPostResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is 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 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

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 {
	// Parameters queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// GetPost queries a single Post by id.
	GetPost(context.Context, *QueryGetPostRequest) (*QueryGetPostResponse, error)
	// ListPost queries a paginated list of Post items.
	ListPost(context.Context, *QueryAllPostRequest) (*QueryAllPostResponse, 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) CreatePost

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) GetPost

func (*UnimplementedQueryServer) ListPost

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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