Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPostsServer(s grpc.ServiceRegistrar, srv PostsServer)
- type CreatePostDto
- func (*CreatePostDto) Descriptor() ([]byte, []int)deprecated
- func (x *CreatePostDto) GetAuthorId() string
- func (x *CreatePostDto) GetContent() string
- func (x *CreatePostDto) GetImageUrl() string
- func (x *CreatePostDto) GetTitle() string
- func (*CreatePostDto) ProtoMessage()
- func (x *CreatePostDto) ProtoReflect() protoreflect.Message
- func (x *CreatePostDto) Reset()
- func (x *CreatePostDto) String() string
- type DeleteRequestDto
- type DeleteResponseDto
- func (*DeleteResponseDto) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteResponseDto) GetDeleted() bool
- func (x *DeleteResponseDto) GetId() string
- func (*DeleteResponseDto) ProtoMessage()
- func (x *DeleteResponseDto) ProtoReflect() protoreflect.Message
- func (x *DeleteResponseDto) Reset()
- func (x *DeleteResponseDto) String() string
- type GetPostDto
- type GetPostsDto
- func (*GetPostsDto) Descriptor() ([]byte, []int)deprecated
- func (x *GetPostsDto) GetFilter() string
- func (x *GetPostsDto) GetSkip() int32
- func (x *GetPostsDto) GetTake() int32
- func (*GetPostsDto) ProtoMessage()
- func (x *GetPostsDto) ProtoReflect() protoreflect.Message
- func (x *GetPostsDto) Reset()
- func (x *GetPostsDto) String() string
- type PatchRequestDto
- func (*PatchRequestDto) Descriptor() ([]byte, []int)deprecated
- func (x *PatchRequestDto) GetContent() string
- func (x *PatchRequestDto) GetId() string
- func (x *PatchRequestDto) GetImageUrl() string
- func (x *PatchRequestDto) GetTitle() string
- func (*PatchRequestDto) ProtoMessage()
- func (x *PatchRequestDto) ProtoReflect() protoreflect.Message
- func (x *PatchRequestDto) Reset()
- func (x *PatchRequestDto) String() string
- type PostDto
- func (*PostDto) Descriptor() ([]byte, []int)deprecated
- func (x *PostDto) GetAuthorId() string
- func (x *PostDto) GetContent() string
- func (x *PostDto) GetCreatedAt() *timestamppb.Timestamp
- func (x *PostDto) GetId() string
- func (x *PostDto) GetImageUrl() string
- func (x *PostDto) GetTitle() string
- func (x *PostDto) GetUpdatedAt() *timestamppb.Timestamp
- func (*PostDto) ProtoMessage()
- func (x *PostDto) ProtoReflect() protoreflect.Message
- func (x *PostDto) Reset()
- func (x *PostDto) String() string
- type PostsClient
- type PostsResponseDto
- type PostsServer
- type PutRequestDto
- func (*PutRequestDto) Descriptor() ([]byte, []int)deprecated
- func (x *PutRequestDto) GetAuthorId() string
- func (x *PutRequestDto) GetContent() string
- func (x *PutRequestDto) GetId() string
- func (x *PutRequestDto) GetImageUrl() string
- func (x *PutRequestDto) GetTitle() string
- func (*PutRequestDto) ProtoMessage()
- func (x *PutRequestDto) ProtoReflect() protoreflect.Message
- func (x *PutRequestDto) Reset()
- func (x *PutRequestDto) String() string
- type UnimplementedPostsServer
- func (UnimplementedPostsServer) CreatePost(context.Context, *CreatePostDto) (*PostDto, error)
- func (UnimplementedPostsServer) DeletePost(context.Context, *DeleteRequestDto) (*DeleteResponseDto, error)
- func (UnimplementedPostsServer) GetPost(context.Context, *GetPostDto) (*PostDto, error)
- func (UnimplementedPostsServer) GetPosts(context.Context, *GetPostsDto) (*PostsResponseDto, error)
- func (UnimplementedPostsServer) PatchPost(context.Context, *PatchRequestDto) (*PostDto, error)
- func (UnimplementedPostsServer) PutPost(context.Context, *PutRequestDto) (*PostDto, error)
- type UnsafePostsServer
Constants ¶
const ( Posts_GetPost_FullMethodName = "/posts.Posts/GetPost" Posts_CreatePost_FullMethodName = "/posts.Posts/CreatePost" Posts_GetPosts_FullMethodName = "/posts.Posts/GetPosts" Posts_PatchPost_FullMethodName = "/posts.Posts/PatchPost" Posts_PutPost_FullMethodName = "/posts.Posts/PutPost" Posts_DeletePost_FullMethodName = "/posts.Posts/DeletePost" )
Variables ¶
var File_posts_posts_proto protoreflect.FileDescriptor
var Posts_ServiceDesc = grpc.ServiceDesc{ ServiceName: "posts.Posts", HandlerType: (*PostsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetPost", Handler: _Posts_GetPost_Handler, }, { MethodName: "CreatePost", Handler: _Posts_CreatePost_Handler, }, { MethodName: "GetPosts", Handler: _Posts_GetPosts_Handler, }, { MethodName: "PatchPost", Handler: _Posts_PatchPost_Handler, }, { MethodName: "PutPost", Handler: _Posts_PutPost_Handler, }, { MethodName: "DeletePost", Handler: _Posts_DeletePost_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "posts/posts.proto", }
Posts_ServiceDesc is the grpc.ServiceDesc for Posts service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPostsServer ¶
func RegisterPostsServer(s grpc.ServiceRegistrar, srv PostsServer)
Types ¶
type CreatePostDto ¶
type CreatePostDto struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` AuthorId string `protobuf:"bytes,3,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` ImageUrl string `protobuf:"bytes,4,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` // contains filtered or unexported fields }
func (*CreatePostDto) Descriptor
deprecated
func (*CreatePostDto) Descriptor() ([]byte, []int)
Deprecated: Use CreatePostDto.ProtoReflect.Descriptor instead.
func (*CreatePostDto) GetAuthorId ¶
func (x *CreatePostDto) GetAuthorId() string
func (*CreatePostDto) GetContent ¶
func (x *CreatePostDto) GetContent() string
func (*CreatePostDto) GetImageUrl ¶
func (x *CreatePostDto) GetImageUrl() string
func (*CreatePostDto) GetTitle ¶
func (x *CreatePostDto) GetTitle() string
func (*CreatePostDto) ProtoMessage ¶
func (*CreatePostDto) ProtoMessage()
func (*CreatePostDto) ProtoReflect ¶
func (x *CreatePostDto) ProtoReflect() protoreflect.Message
func (*CreatePostDto) Reset ¶
func (x *CreatePostDto) Reset()
func (*CreatePostDto) String ¶
func (x *CreatePostDto) String() string
type DeleteRequestDto ¶
type DeleteRequestDto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequestDto) Descriptor
deprecated
func (*DeleteRequestDto) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequestDto.ProtoReflect.Descriptor instead.
func (*DeleteRequestDto) GetId ¶
func (x *DeleteRequestDto) GetId() string
func (*DeleteRequestDto) ProtoMessage ¶
func (*DeleteRequestDto) ProtoMessage()
func (*DeleteRequestDto) ProtoReflect ¶
func (x *DeleteRequestDto) ProtoReflect() protoreflect.Message
func (*DeleteRequestDto) Reset ¶
func (x *DeleteRequestDto) Reset()
func (*DeleteRequestDto) String ¶
func (x *DeleteRequestDto) String() string
type DeleteResponseDto ¶
type DeleteResponseDto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"` // contains filtered or unexported fields }
func (*DeleteResponseDto) Descriptor
deprecated
func (*DeleteResponseDto) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponseDto.ProtoReflect.Descriptor instead.
func (*DeleteResponseDto) GetDeleted ¶
func (x *DeleteResponseDto) GetDeleted() bool
func (*DeleteResponseDto) GetId ¶
func (x *DeleteResponseDto) GetId() string
func (*DeleteResponseDto) ProtoMessage ¶
func (*DeleteResponseDto) ProtoMessage()
func (*DeleteResponseDto) ProtoReflect ¶
func (x *DeleteResponseDto) ProtoReflect() protoreflect.Message
func (*DeleteResponseDto) Reset ¶
func (x *DeleteResponseDto) Reset()
func (*DeleteResponseDto) String ¶
func (x *DeleteResponseDto) String() string
type GetPostDto ¶
type GetPostDto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetPostDto) Descriptor
deprecated
func (*GetPostDto) Descriptor() ([]byte, []int)
Deprecated: Use GetPostDto.ProtoReflect.Descriptor instead.
func (*GetPostDto) GetId ¶
func (x *GetPostDto) GetId() string
func (*GetPostDto) ProtoMessage ¶
func (*GetPostDto) ProtoMessage()
func (*GetPostDto) ProtoReflect ¶
func (x *GetPostDto) ProtoReflect() protoreflect.Message
func (*GetPostDto) Reset ¶
func (x *GetPostDto) Reset()
func (*GetPostDto) String ¶
func (x *GetPostDto) String() string
type GetPostsDto ¶
type GetPostsDto struct { Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` Take int32 `protobuf:"varint,2,opt,name=take,proto3" json:"take,omitempty"` Skip int32 `protobuf:"varint,3,opt,name=skip,proto3" json:"skip,omitempty"` // contains filtered or unexported fields }
func (*GetPostsDto) Descriptor
deprecated
func (*GetPostsDto) Descriptor() ([]byte, []int)
Deprecated: Use GetPostsDto.ProtoReflect.Descriptor instead.
func (*GetPostsDto) GetFilter ¶
func (x *GetPostsDto) GetFilter() string
func (*GetPostsDto) GetSkip ¶
func (x *GetPostsDto) GetSkip() int32
func (*GetPostsDto) GetTake ¶
func (x *GetPostsDto) GetTake() int32
func (*GetPostsDto) ProtoMessage ¶
func (*GetPostsDto) ProtoMessage()
func (*GetPostsDto) ProtoReflect ¶
func (x *GetPostsDto) ProtoReflect() protoreflect.Message
func (*GetPostsDto) Reset ¶
func (x *GetPostsDto) Reset()
func (*GetPostsDto) String ¶
func (x *GetPostsDto) String() string
type PatchRequestDto ¶
type PatchRequestDto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,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"` ImageUrl string `protobuf:"bytes,4,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` // contains filtered or unexported fields }
func (*PatchRequestDto) Descriptor
deprecated
func (*PatchRequestDto) Descriptor() ([]byte, []int)
Deprecated: Use PatchRequestDto.ProtoReflect.Descriptor instead.
func (*PatchRequestDto) GetContent ¶
func (x *PatchRequestDto) GetContent() string
func (*PatchRequestDto) GetId ¶
func (x *PatchRequestDto) GetId() string
func (*PatchRequestDto) GetImageUrl ¶
func (x *PatchRequestDto) GetImageUrl() string
func (*PatchRequestDto) GetTitle ¶
func (x *PatchRequestDto) GetTitle() string
func (*PatchRequestDto) ProtoMessage ¶
func (*PatchRequestDto) ProtoMessage()
func (*PatchRequestDto) ProtoReflect ¶
func (x *PatchRequestDto) ProtoReflect() protoreflect.Message
func (*PatchRequestDto) Reset ¶
func (x *PatchRequestDto) Reset()
func (*PatchRequestDto) String ¶
func (x *PatchRequestDto) String() string
type PostDto ¶
type PostDto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,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"` AuthorId string `protobuf:"bytes,4,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` ImageUrl string `protobuf:"bytes,5,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=createdAt,proto3" json:"createdAt,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` // contains filtered or unexported fields }
func (*PostDto) Descriptor
deprecated
func (*PostDto) GetAuthorId ¶
func (*PostDto) GetContent ¶
func (*PostDto) GetCreatedAt ¶
func (x *PostDto) GetCreatedAt() *timestamppb.Timestamp
func (*PostDto) GetImageUrl ¶
func (*PostDto) GetUpdatedAt ¶
func (x *PostDto) GetUpdatedAt() *timestamppb.Timestamp
func (*PostDto) ProtoMessage ¶
func (*PostDto) ProtoMessage()
func (*PostDto) ProtoReflect ¶
func (x *PostDto) ProtoReflect() protoreflect.Message
type PostsClient ¶
type PostsClient interface { GetPost(ctx context.Context, in *GetPostDto, opts ...grpc.CallOption) (*PostDto, error) CreatePost(ctx context.Context, in *CreatePostDto, opts ...grpc.CallOption) (*PostDto, error) GetPosts(ctx context.Context, in *GetPostsDto, opts ...grpc.CallOption) (*PostsResponseDto, error) PatchPost(ctx context.Context, in *PatchRequestDto, opts ...grpc.CallOption) (*PostDto, error) PutPost(ctx context.Context, in *PutRequestDto, opts ...grpc.CallOption) (*PostDto, error) DeletePost(ctx context.Context, in *DeleteRequestDto, opts ...grpc.CallOption) (*DeleteResponseDto, error) }
PostsClient is the client API for Posts service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPostsClient ¶
func NewPostsClient(cc grpc.ClientConnInterface) PostsClient
type PostsResponseDto ¶
type PostsResponseDto struct { Posts []*PostDto `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` // contains filtered or unexported fields }
func (*PostsResponseDto) Descriptor
deprecated
func (*PostsResponseDto) Descriptor() ([]byte, []int)
Deprecated: Use PostsResponseDto.ProtoReflect.Descriptor instead.
func (*PostsResponseDto) GetPosts ¶
func (x *PostsResponseDto) GetPosts() []*PostDto
func (*PostsResponseDto) ProtoMessage ¶
func (*PostsResponseDto) ProtoMessage()
func (*PostsResponseDto) ProtoReflect ¶
func (x *PostsResponseDto) ProtoReflect() protoreflect.Message
func (*PostsResponseDto) Reset ¶
func (x *PostsResponseDto) Reset()
func (*PostsResponseDto) String ¶
func (x *PostsResponseDto) String() string
type PostsServer ¶
type PostsServer interface { GetPost(context.Context, *GetPostDto) (*PostDto, error) CreatePost(context.Context, *CreatePostDto) (*PostDto, error) GetPosts(context.Context, *GetPostsDto) (*PostsResponseDto, error) PatchPost(context.Context, *PatchRequestDto) (*PostDto, error) PutPost(context.Context, *PutRequestDto) (*PostDto, error) DeletePost(context.Context, *DeleteRequestDto) (*DeleteResponseDto, error) // contains filtered or unexported methods }
PostsServer is the server API for Posts service. All implementations must embed UnimplementedPostsServer for forward compatibility.
type PutRequestDto ¶
type PutRequestDto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,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"` AuthorId string `protobuf:"bytes,4,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` ImageUrl string `protobuf:"bytes,5,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` // contains filtered or unexported fields }
func (*PutRequestDto) Descriptor
deprecated
func (*PutRequestDto) Descriptor() ([]byte, []int)
Deprecated: Use PutRequestDto.ProtoReflect.Descriptor instead.
func (*PutRequestDto) GetAuthorId ¶
func (x *PutRequestDto) GetAuthorId() string
func (*PutRequestDto) GetContent ¶
func (x *PutRequestDto) GetContent() string
func (*PutRequestDto) GetId ¶
func (x *PutRequestDto) GetId() string
func (*PutRequestDto) GetImageUrl ¶
func (x *PutRequestDto) GetImageUrl() string
func (*PutRequestDto) GetTitle ¶
func (x *PutRequestDto) GetTitle() string
func (*PutRequestDto) ProtoMessage ¶
func (*PutRequestDto) ProtoMessage()
func (*PutRequestDto) ProtoReflect ¶
func (x *PutRequestDto) ProtoReflect() protoreflect.Message
func (*PutRequestDto) Reset ¶
func (x *PutRequestDto) Reset()
func (*PutRequestDto) String ¶
func (x *PutRequestDto) String() string
type UnimplementedPostsServer ¶
type UnimplementedPostsServer struct{}
UnimplementedPostsServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPostsServer) CreatePost ¶
func (UnimplementedPostsServer) CreatePost(context.Context, *CreatePostDto) (*PostDto, error)
func (UnimplementedPostsServer) DeletePost ¶
func (UnimplementedPostsServer) DeletePost(context.Context, *DeleteRequestDto) (*DeleteResponseDto, error)
func (UnimplementedPostsServer) GetPost ¶
func (UnimplementedPostsServer) GetPost(context.Context, *GetPostDto) (*PostDto, error)
func (UnimplementedPostsServer) GetPosts ¶
func (UnimplementedPostsServer) GetPosts(context.Context, *GetPostsDto) (*PostsResponseDto, error)
func (UnimplementedPostsServer) PatchPost ¶
func (UnimplementedPostsServer) PatchPost(context.Context, *PatchRequestDto) (*PostDto, error)
func (UnimplementedPostsServer) PutPost ¶
func (UnimplementedPostsServer) PutPost(context.Context, *PutRequestDto) (*PostDto, error)
type UnsafePostsServer ¶
type UnsafePostsServer interface {
// contains filtered or unexported methods
}
UnsafePostsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PostsServer will result in compilation errors.