comments

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_micro_services_blog_comments_proto_comments_proto protoreflect.FileDescriptor

Functions

func NewCommentsEndpoints

func NewCommentsEndpoints() []*api.Endpoint

func RegisterCommentsHandler

func RegisterCommentsHandler(s server.Server, hdlr CommentsHandler, opts ...server.HandlerOption) error

Types

type CommentsHandler

type CommentsHandler interface {
	Save(context.Context, *Request, *Response) error
}

type CommentsService

type CommentsService interface {
	Save(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
}

func NewCommentsService

func NewCommentsService(name string, c client.Client) CommentsService

type Request

type Request struct {

	// post to comment on
	PostId string `protobuf:"bytes,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	// message to leave
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetMessage added in v0.11.0

func (x *Request) GetMessage() string

func (*Request) GetPostId added in v0.11.0

func (x *Request) GetPostId() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect added in v0.11.0

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect added in v0.11.0

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

Jump to

Keyboard shortcuts

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