Documentation
¶
Index ¶
- Variables
- func RegisterPostsServer(s *grpc.Server, srv PostsServer)
- type DeleteReply
- func (*DeleteReply) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteReply) GetResponse() string
- func (x *DeleteReply) GetStatus() DeleteReply_ReplyType
- func (*DeleteReply) ProtoMessage()
- func (x *DeleteReply) ProtoReflect() protoreflect.Message
- func (x *DeleteReply) Reset()
- func (x *DeleteReply) String() string
- type DeleteReply_ReplyType
- func (DeleteReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
- func (x DeleteReply_ReplyType) Enum() *DeleteReply_ReplyType
- func (DeleteReply_ReplyType) EnumDescriptor() ([]byte, []int)deprecated
- func (x DeleteReply_ReplyType) Number() protoreflect.EnumNumber
- func (x DeleteReply_ReplyType) String() string
- func (DeleteReply_ReplyType) Type() protoreflect.EnumType
- type DeleteRequest
- type ListReply
- type ListRequest
- type Post
- func (*Post) Descriptor() ([]byte, []int)deprecated
- func (x *Post) GetBody() string
- func (m *Post) GetCreatedAt() isPost_CreatedAt
- func (x *Post) GetDescription() string
- func (x *Post) GetHeader() string
- func (x *Post) GetId() string
- func (x *Post) GetSlug() string
- func (x *Post) GetTime() string
- func (x *Post) GetTitle() string
- func (x *Post) GetToken() string
- func (*Post) ProtoMessage()
- func (x *Post) ProtoReflect() protoreflect.Message
- func (x *Post) Reset()
- func (x *Post) String() string
- type Post_Time
- type PostsClient
- type PostsServer
- type StoreReply
- func (*StoreReply) Descriptor() ([]byte, []int)deprecated
- func (x *StoreReply) GetResponse() string
- func (x *StoreReply) GetStatus() StoreReply_ReplyType
- func (*StoreReply) ProtoMessage()
- func (x *StoreReply) ProtoReflect() protoreflect.Message
- func (x *StoreReply) Reset()
- func (x *StoreReply) String() string
- 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
- type UnimplementedPostsServer
- func (*UnimplementedPostsServer) Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
- func (*UnimplementedPostsServer) List(context.Context, *ListRequest) (*ListReply, error)
- func (*UnimplementedPostsServer) Store(context.Context, *StoreRequest) (*StoreReply, error)
- func (*UnimplementedPostsServer) Update(context.Context, *UpdateRequest) (*UpdateReply, error)
- type UpdateReply
- func (*UpdateReply) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateReply) GetResponse() string
- func (x *UpdateReply) GetStatus() UpdateReply_ReplyType
- func (*UpdateReply) ProtoMessage()
- func (x *UpdateReply) ProtoReflect() protoreflect.Message
- func (x *UpdateReply) Reset()
- func (x *UpdateReply) String() string
- 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
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 ( DeleteReply_ReplyType_name = map[int32]string{ 0: "Success", 1: "Fail", } DeleteReply_ReplyType_value = map[string]int32{ "Success": 0, "Fail": 1, } )
Enum value maps for DeleteReply_ReplyType.
var File_posts_proto protoreflect.FileDescriptor
Functions ¶
func RegisterPostsServer ¶
func RegisterPostsServer(s *grpc.Server, srv PostsServer)
Types ¶
type DeleteReply ¶
type DeleteReply struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Status DeleteReply_ReplyType `protobuf:"varint,2,opt,name=status,proto3,enum=pb.DeleteReply_ReplyType" json:"status,omitempty"` // contains filtered or unexported fields }
func (*DeleteReply) Descriptor
deprecated
func (*DeleteReply) Descriptor() ([]byte, []int)
Deprecated: Use DeleteReply.ProtoReflect.Descriptor instead.
func (*DeleteReply) GetResponse ¶
func (x *DeleteReply) GetResponse() string
func (*DeleteReply) GetStatus ¶
func (x *DeleteReply) GetStatus() DeleteReply_ReplyType
func (*DeleteReply) ProtoMessage ¶
func (*DeleteReply) ProtoMessage()
func (*DeleteReply) ProtoReflect ¶
func (x *DeleteReply) ProtoReflect() protoreflect.Message
func (*DeleteReply) Reset ¶
func (x *DeleteReply) Reset()
func (*DeleteReply) String ¶
func (x *DeleteReply) String() string
type DeleteReply_ReplyType ¶
type DeleteReply_ReplyType int32
const ( DeleteReply_Success DeleteReply_ReplyType = 0 DeleteReply_Fail DeleteReply_ReplyType = 1 )
func (DeleteReply_ReplyType) Descriptor ¶
func (DeleteReply_ReplyType) Descriptor() protoreflect.EnumDescriptor
func (DeleteReply_ReplyType) Enum ¶
func (x DeleteReply_ReplyType) Enum() *DeleteReply_ReplyType
func (DeleteReply_ReplyType) EnumDescriptor
deprecated
func (DeleteReply_ReplyType) EnumDescriptor() ([]byte, []int)
Deprecated: Use DeleteReply_ReplyType.Descriptor instead.
func (DeleteReply_ReplyType) Number ¶
func (x DeleteReply_ReplyType) Number() protoreflect.EnumNumber
func (DeleteReply_ReplyType) String ¶
func (x DeleteReply_ReplyType) String() string
func (DeleteReply_ReplyType) Type ¶
func (DeleteReply_ReplyType) Type() protoreflect.EnumType
type DeleteRequest ¶
type DeleteRequest struct { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetPost ¶
func (x *DeleteRequest) GetPost() *Post
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type ListReply ¶
type ListReply struct { Post []*Post `protobuf:"bytes,1,rep,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*ListReply) Descriptor
deprecated
func (*ListReply) ProtoMessage ¶
func (*ListReply) ProtoMessage()
func (*ListReply) ProtoReflect ¶
func (x *ListReply) ProtoReflect() protoreflect.Message
type ListRequest ¶
type ListRequest struct { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetPost ¶
func (x *ListRequest) GetPost() *Post
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 Post ¶
type Post struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Slug string `protobuf:"bytes,4,opt,name=slug,proto3" json:"slug,omitempty"` Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` Header string `protobuf:"bytes,7,opt,name=header,proto3" json:"header,omitempty"` // Types that are assignable to CreatedAt: // *Post_Time CreatedAt isPost_CreatedAt `protobuf_oneof:"createdAt"` // contains filtered or unexported fields }
func (*Post) Descriptor
deprecated
func (*Post) GetCreatedAt ¶
func (m *Post) GetCreatedAt() isPost_CreatedAt
func (*Post) GetDescription ¶
func (*Post) ProtoMessage ¶
func (*Post) ProtoMessage()
func (*Post) ProtoReflect ¶
func (x *Post) ProtoReflect() protoreflect.Message
type Post_Time ¶
type Post_Time struct {
Time string `protobuf:"bytes,8,opt,name=time,proto3,oneof"`
}
type PostsClient ¶
type PostsClient 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) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteReply, error) }
PostsClient is the client API for Posts service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPostsClient ¶
func NewPostsClient(cc grpc.ClientConnInterface) PostsClient
type PostsServer ¶
type PostsServer interface { Store(context.Context, *StoreRequest) (*StoreReply, error) Update(context.Context, *UpdateRequest) (*UpdateReply, error) List(context.Context, *ListRequest) (*ListReply, error) Delete(context.Context, *DeleteRequest) (*DeleteReply, error) }
PostsServer is the server API for Posts service.
type StoreReply ¶
type StoreReply struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Status StoreReply_ReplyType `protobuf:"varint,2,opt,name=status,proto3,enum=pb.StoreReply_ReplyType" 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) GetResponse ¶
func (x *StoreReply) GetResponse() string
func (*StoreReply) GetStatus ¶
func (x *StoreReply) GetStatus() StoreReply_ReplyType
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 { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*StoreRequest) Descriptor
deprecated
func (*StoreRequest) Descriptor() ([]byte, []int)
Deprecated: Use StoreRequest.ProtoReflect.Descriptor instead.
func (*StoreRequest) GetPost ¶
func (x *StoreRequest) GetPost() *Post
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 UnimplementedPostsServer ¶
type UnimplementedPostsServer struct { }
UnimplementedPostsServer can be embedded to have forward compatible implementations.
func (*UnimplementedPostsServer) Delete ¶
func (*UnimplementedPostsServer) Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
func (*UnimplementedPostsServer) List ¶
func (*UnimplementedPostsServer) List(context.Context, *ListRequest) (*ListReply, error)
func (*UnimplementedPostsServer) Store ¶
func (*UnimplementedPostsServer) Store(context.Context, *StoreRequest) (*StoreReply, error)
func (*UnimplementedPostsServer) Update ¶
func (*UnimplementedPostsServer) Update(context.Context, *UpdateRequest) (*UpdateReply, error)
type UpdateReply ¶
type UpdateReply struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Status UpdateReply_ReplyType `protobuf:"varint,2,opt,name=status,proto3,enum=pb.UpdateReply_ReplyType" 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) GetResponse ¶
func (x *UpdateReply) GetResponse() string
func (*UpdateReply) GetStatus ¶
func (x *UpdateReply) GetStatus() UpdateReply_ReplyType
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 { Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetPost ¶
func (x *UpdateRequest) GetPost() *Post
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