Documentation
¶
Index ¶
- Variables
- func RegisterCommentsServer(s *grpc.Server, srv CommentsServer)
- type Comment
- func (*Comment) Descriptor() ([]byte, []int)deprecated
- func (x *Comment) GetBody() string
- func (x *Comment) GetEmail() string
- func (x *Comment) GetName() string
- func (x *Comment) GetPostID() string
- func (x *Comment) GetTitle() string
- func (x *Comment) GetUserID() string
- func (m *Comment) GetUseremail() isComment_Useremail
- func (m *Comment) GetUsername() isComment_Username
- func (*Comment) ProtoMessage()
- func (x *Comment) ProtoReflect() protoreflect.Message
- func (x *Comment) Reset()
- func (x *Comment) String() string
- type Comment_Email
- type Comment_Name
- type CommentsClient
- type CommentsServer
- type ListReply
- type ListReply_ReplyType
- func (ListReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
- func (x ListReply_ReplyType) Enum() *ListReply_ReplyType
- func (ListReply_ReplyType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ListReply_ReplyType) Number() protoreflect.EnumNumber
- func (x ListReply_ReplyType) String() string
- func (ListReply_ReplyType) Type() protoreflect.EnumType
- type ListRequest
- type StoreReply
- type StoreReply_ReplyType
- func (StoreReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
- func (x StoreReply_ReplyType) Enum() *StoreReply_ReplyType
- func (StoreReply_ReplyType) EnumDescriptor() ([]byte, []int)deprecated
- func (x StoreReply_ReplyType) Number() protoreflect.EnumNumber
- func (x StoreReply_ReplyType) String() string
- func (StoreReply_ReplyType) Type() protoreflect.EnumType
- type StoreRequest
- func (*StoreRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StoreRequest) GetBody() string
- func (x *StoreRequest) GetPostID() string
- func (x *StoreRequest) GetTitle() string
- func (x *StoreRequest) GetUserID() string
- func (*StoreRequest) ProtoMessage()
- func (x *StoreRequest) ProtoReflect() protoreflect.Message
- func (x *StoreRequest) Reset()
- func (x *StoreRequest) String() string
- type UnimplementedCommentsServer
- type UpdateReply
- type UpdateReply_ReplyType
- func (UpdateReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
- func (x UpdateReply_ReplyType) Enum() *UpdateReply_ReplyType
- func (UpdateReply_ReplyType) EnumDescriptor() ([]byte, []int)deprecated
- func (x UpdateReply_ReplyType) Number() protoreflect.EnumNumber
- func (x UpdateReply_ReplyType) String() string
- func (UpdateReply_ReplyType) Type() protoreflect.EnumType
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetBody() string
- func (x *UpdateRequest) GetId() string
- func (x *UpdateRequest) GetPostID() string
- func (x *UpdateRequest) GetTitle() string
- func (x *UpdateRequest) GetUserID() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var ( StoreReply_ReplyType_name = map[int32]string{ 0: "Success", 1: "Fail", } StoreReply_ReplyType_value = map[string]int32{ "Success": 0, "Fail": 1, } )
Enum value maps for StoreReply_ReplyType.
var ( UpdateReply_ReplyType_name = map[int32]string{ 0: "Success", 1: "Fail", } UpdateReply_ReplyType_value = map[string]int32{ "Success": 0, "Fail": 1, } )
Enum value maps for UpdateReply_ReplyType.
var ( ListReply_ReplyType_name = map[int32]string{ 0: "Success", 1: "Fail", } ListReply_ReplyType_value = map[string]int32{ "Success": 0, "Fail": 1, } )
Enum value maps for ListReply_ReplyType.
var File_comments_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCommentsServer ¶
func RegisterCommentsServer(s *grpc.Server, srv CommentsServer)
Types ¶
type Comment ¶
type Comment struct { PostID string `protobuf:"bytes,1,opt,name=postID,proto3" json:"postID,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // Types that are assignable to Username: // *Comment_Name Username isComment_Username `protobuf_oneof:"username"` // Types that are assignable to Useremail: // *Comment_Email Useremail isComment_Useremail `protobuf_oneof:"useremail"` // contains filtered or unexported fields }
func (*Comment) Descriptor
deprecated
func (*Comment) GetUseremail ¶
func (m *Comment) GetUseremail() isComment_Useremail
func (*Comment) GetUsername ¶
func (m *Comment) GetUsername() isComment_Username
func (*Comment) ProtoMessage ¶
func (*Comment) ProtoMessage()
func (*Comment) ProtoReflect ¶
func (x *Comment) ProtoReflect() protoreflect.Message
type Comment_Email ¶
type Comment_Email struct {
Email string `protobuf:"bytes,6,opt,name=email,proto3,oneof"`
}
type Comment_Name ¶
type Comment_Name struct {
Name string `protobuf:"bytes,5,opt,name=name,proto3,oneof"`
}
type CommentsClient ¶
type CommentsClient interface { Store(ctx context.Context, in *StoreRequest, opts ...grpc.CallOption) (*StoreReply, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateReply, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error) }
CommentsClient is the client API for Comments service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCommentsClient ¶
func NewCommentsClient(cc grpc.ClientConnInterface) CommentsClient
type CommentsServer ¶
type CommentsServer interface { Store(context.Context, *StoreRequest) (*StoreReply, error) Update(context.Context, *UpdateRequest) (*UpdateReply, error) List(context.Context, *ListRequest) (*ListReply, error) }
CommentsServer is the server API for Comments service.
type ListReply ¶
type ListReply struct { Comments []*Comment `protobuf:"bytes,1,rep,name=comments,proto3" json:"comments,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*ListReply) Descriptor
deprecated
func (*ListReply) GetComments ¶
func (*ListReply) ProtoMessage ¶
func (*ListReply) ProtoMessage()
func (*ListReply) ProtoReflect ¶
func (x *ListReply) ProtoReflect() protoreflect.Message
type ListReply_ReplyType ¶
type ListReply_ReplyType int32
const ( ListReply_Success ListReply_ReplyType = 0 ListReply_Fail ListReply_ReplyType = 1 )
func (ListReply_ReplyType) Descriptor ¶
func (ListReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
func (ListReply_ReplyType) Enum ¶
func (x ListReply_ReplyType) Enum() *ListReply_ReplyType
func (ListReply_ReplyType) EnumDescriptor
deprecated
func (ListReply_ReplyType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ListReply_ReplyType.Descriptor instead.
func (ListReply_ReplyType) Number ¶
func (x ListReply_ReplyType) Number() protoreflect.EnumNumber
func (ListReply_ReplyType) String ¶
func (x ListReply_ReplyType) String() string
func (ListReply_ReplyType) Type ¶
func (ListReply_ReplyType) Type() protoreflect.EnumType
type ListRequest ¶
type ListRequest struct { PostID string `protobuf:"bytes,1,opt,name=postID,proto3" json:"postID,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetPostID ¶
func (x *ListRequest) GetPostID() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type StoreReply ¶
type StoreReply struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*StoreReply) Descriptor
deprecated
func (*StoreReply) Descriptor() ([]byte, []int)
Deprecated: Use StoreReply.ProtoReflect.Descriptor instead.
func (*StoreReply) GetId ¶
func (x *StoreReply) GetId() string
func (*StoreReply) GetStatus ¶
func (x *StoreReply) GetStatus() string
func (*StoreReply) ProtoMessage ¶
func (*StoreReply) ProtoMessage()
func (*StoreReply) ProtoReflect ¶
func (x *StoreReply) ProtoReflect() protoreflect.Message
func (*StoreReply) Reset ¶
func (x *StoreReply) Reset()
func (*StoreReply) String ¶
func (x *StoreReply) String() string
type StoreReply_ReplyType ¶
type StoreReply_ReplyType int32
const ( StoreReply_Success StoreReply_ReplyType = 0 StoreReply_Fail StoreReply_ReplyType = 1 )
func (StoreReply_ReplyType) Descriptor ¶
func (StoreReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
func (StoreReply_ReplyType) Enum ¶
func (x StoreReply_ReplyType) Enum() *StoreReply_ReplyType
func (StoreReply_ReplyType) EnumDescriptor
deprecated
func (StoreReply_ReplyType) EnumDescriptor() ([]byte, []int)
Deprecated: Use StoreReply_ReplyType.Descriptor instead.
func (StoreReply_ReplyType) Number ¶
func (x StoreReply_ReplyType) Number() protoreflect.EnumNumber
func (StoreReply_ReplyType) String ¶
func (x StoreReply_ReplyType) String() string
func (StoreReply_ReplyType) Type ¶
func (StoreReply_ReplyType) Type() protoreflect.EnumType
type StoreRequest ¶
type StoreRequest struct { PostID string `protobuf:"bytes,1,opt,name=postID,proto3" json:"postID,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*StoreRequest) Descriptor
deprecated
func (*StoreRequest) Descriptor() ([]byte, []int)
Deprecated: Use StoreRequest.ProtoReflect.Descriptor instead.
func (*StoreRequest) GetBody ¶
func (x *StoreRequest) GetBody() string
func (*StoreRequest) GetPostID ¶
func (x *StoreRequest) GetPostID() string
func (*StoreRequest) GetTitle ¶
func (x *StoreRequest) GetTitle() string
func (*StoreRequest) GetUserID ¶
func (x *StoreRequest) GetUserID() string
func (*StoreRequest) ProtoMessage ¶
func (*StoreRequest) ProtoMessage()
func (*StoreRequest) ProtoReflect ¶
func (x *StoreRequest) ProtoReflect() protoreflect.Message
func (*StoreRequest) Reset ¶
func (x *StoreRequest) Reset()
func (*StoreRequest) String ¶
func (x *StoreRequest) String() string
type UnimplementedCommentsServer ¶
type UnimplementedCommentsServer struct { }
UnimplementedCommentsServer can be embedded to have forward compatible implementations.
func (*UnimplementedCommentsServer) List ¶
func (*UnimplementedCommentsServer) List(context.Context, *ListRequest) (*ListReply, error)
func (*UnimplementedCommentsServer) Store ¶
func (*UnimplementedCommentsServer) Store(context.Context, *StoreRequest) (*StoreReply, error)
func (*UnimplementedCommentsServer) Update ¶
func (*UnimplementedCommentsServer) Update(context.Context, *UpdateRequest) (*UpdateReply, error)
type UpdateReply ¶
type UpdateReply struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*UpdateReply) Descriptor
deprecated
func (*UpdateReply) Descriptor() ([]byte, []int)
Deprecated: Use UpdateReply.ProtoReflect.Descriptor instead.
func (*UpdateReply) GetId ¶
func (x *UpdateReply) GetId() string
func (*UpdateReply) GetStatus ¶
func (x *UpdateReply) GetStatus() string
func (*UpdateReply) ProtoMessage ¶
func (*UpdateReply) ProtoMessage()
func (*UpdateReply) ProtoReflect ¶
func (x *UpdateReply) ProtoReflect() protoreflect.Message
func (*UpdateReply) Reset ¶
func (x *UpdateReply) Reset()
func (*UpdateReply) String ¶
func (x *UpdateReply) String() string
type UpdateReply_ReplyType ¶
type UpdateReply_ReplyType int32
const ( UpdateReply_Success UpdateReply_ReplyType = 0 UpdateReply_Fail UpdateReply_ReplyType = 1 )
func (UpdateReply_ReplyType) Descriptor ¶
func (UpdateReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
func (UpdateReply_ReplyType) Enum ¶
func (x UpdateReply_ReplyType) Enum() *UpdateReply_ReplyType
func (UpdateReply_ReplyType) EnumDescriptor
deprecated
func (UpdateReply_ReplyType) EnumDescriptor() ([]byte, []int)
Deprecated: Use UpdateReply_ReplyType.Descriptor instead.
func (UpdateReply_ReplyType) Number ¶
func (x UpdateReply_ReplyType) Number() protoreflect.EnumNumber
func (UpdateReply_ReplyType) String ¶
func (x UpdateReply_ReplyType) String() string
func (UpdateReply_ReplyType) Type ¶
func (UpdateReply_ReplyType) Type() protoreflect.EnumType
type UpdateRequest ¶
type UpdateRequest struct { PostID string `protobuf:"bytes,1,opt,name=postID,proto3" json:"postID,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetBody ¶
func (x *UpdateRequest) GetBody() string
func (*UpdateRequest) GetId ¶
func (x *UpdateRequest) GetId() string
func (*UpdateRequest) GetPostID ¶
func (x *UpdateRequest) GetPostID() string
func (*UpdateRequest) GetTitle ¶
func (x *UpdateRequest) GetTitle() string
func (*UpdateRequest) GetUserID ¶
func (x *UpdateRequest) GetUserID() string
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string