posts

package
v0.0.0-...-4ef61cc Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_posts_posts_proto protoreflect.FileDescriptor
View Source
var PostCrudService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "posts.PostCrudService",
	HandlerType: (*PostCrudServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPost",
			Handler:    _PostCrudService_GetPost_Handler,
		},
		{
			MethodName: "CreatePost",
			Handler:    _PostCrudService_CreatePost_Handler,
		},
		{
			MethodName: "UpdatePost",
			Handler:    _PostCrudService_UpdatePost_Handler,
		},
		{
			MethodName: "DeletePost",
			Handler:    _PostCrudService_DeletePost_Handler,
		},
		{
			MethodName: "ListPosts",
			Handler:    _PostCrudService_ListPosts_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/posts/posts.proto",
}

PostCrudService_ServiceDesc is the grpc.ServiceDesc for PostCrudService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPostCrudServiceServer

func RegisterPostCrudServiceServer(s grpc.ServiceRegistrar, srv PostCrudServiceServer)

Types

type CreatePostRequest

type CreatePostRequest struct {
	Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePostRequest) Descriptor deprecated

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

Deprecated: Use CreatePostRequest.ProtoReflect.Descriptor instead.

func (*CreatePostRequest) GetPost

func (x *CreatePostRequest) GetPost() *Post

func (*CreatePostRequest) ProtoMessage

func (*CreatePostRequest) ProtoMessage()

func (*CreatePostRequest) ProtoReflect

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

func (*CreatePostRequest) Reset

func (x *CreatePostRequest) Reset()

func (*CreatePostRequest) String

func (x *CreatePostRequest) String() string

type CreatePostResponse

type CreatePostResponse struct {
	Success bool  `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Post    *Post `protobuf:"bytes,2,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePostResponse) Descriptor deprecated

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

Deprecated: Use CreatePostResponse.ProtoReflect.Descriptor instead.

func (*CreatePostResponse) GetPost

func (x *CreatePostResponse) GetPost() *Post

func (*CreatePostResponse) GetSuccess

func (x *CreatePostResponse) GetSuccess() bool

func (*CreatePostResponse) ProtoMessage

func (*CreatePostResponse) ProtoMessage()

func (*CreatePostResponse) ProtoReflect

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

func (*CreatePostResponse) Reset

func (x *CreatePostResponse) Reset()

func (*CreatePostResponse) String

func (x *CreatePostResponse) String() string

type DeletePostRequest

type DeletePostRequest struct {
	Id *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePostRequest) Descriptor deprecated

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

Deprecated: Use DeletePostRequest.ProtoReflect.Descriptor instead.

func (*DeletePostRequest) GetId

func (*DeletePostRequest) ProtoMessage

func (*DeletePostRequest) ProtoMessage()

func (*DeletePostRequest) ProtoReflect

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

func (*DeletePostRequest) Reset

func (x *DeletePostRequest) Reset()

func (*DeletePostRequest) String

func (x *DeletePostRequest) String() string

type DeletePostResponse

type DeletePostResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePostResponse) Descriptor deprecated

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

Deprecated: Use DeletePostResponse.ProtoReflect.Descriptor instead.

func (*DeletePostResponse) GetSuccess

func (x *DeletePostResponse) GetSuccess() bool

func (*DeletePostResponse) ProtoMessage

func (*DeletePostResponse) ProtoMessage()

func (*DeletePostResponse) ProtoReflect

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

func (*DeletePostResponse) Reset

func (x *DeletePostResponse) Reset()

func (*DeletePostResponse) String

func (x *DeletePostResponse) String() string

type GetPostRequest

type GetPostRequest struct {
	Id *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPostRequest) Descriptor deprecated

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

Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead.

func (*GetPostRequest) GetId

func (x *GetPostRequest) GetId() *wrapperspb.Int32Value

func (*GetPostRequest) ProtoMessage

func (*GetPostRequest) ProtoMessage()

func (*GetPostRequest) ProtoReflect

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

func (*GetPostRequest) Reset

func (x *GetPostRequest) Reset()

func (*GetPostRequest) String

func (x *GetPostRequest) String() string

type GetPostResponse

type GetPostResponse struct {
	Success bool  `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Post    *Post `protobuf:"bytes,2,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPostResponse) Descriptor deprecated

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

Deprecated: Use GetPostResponse.ProtoReflect.Descriptor instead.

func (*GetPostResponse) GetPost

func (x *GetPostResponse) GetPost() *Post

func (*GetPostResponse) GetSuccess

func (x *GetPostResponse) GetSuccess() bool

func (*GetPostResponse) ProtoMessage

func (*GetPostResponse) ProtoMessage()

func (*GetPostResponse) ProtoReflect

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

func (*GetPostResponse) Reset

func (x *GetPostResponse) Reset()

func (*GetPostResponse) String

func (x *GetPostResponse) String() string

type ListPostsResponse

type ListPostsResponse struct {
	Success bool       `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Posts   *PostsList `protobuf:"bytes,2,opt,name=posts,proto3" json:"posts,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPostsResponse) Descriptor deprecated

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

Deprecated: Use ListPostsResponse.ProtoReflect.Descriptor instead.

func (*ListPostsResponse) GetPosts

func (x *ListPostsResponse) GetPosts() *PostsList

func (*ListPostsResponse) GetSuccess

func (x *ListPostsResponse) GetSuccess() bool

func (*ListPostsResponse) ProtoMessage

func (*ListPostsResponse) ProtoMessage()

func (*ListPostsResponse) ProtoReflect

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

func (*ListPostsResponse) Reset

func (x *ListPostsResponse) Reset()

func (*ListPostsResponse) String

func (x *ListPostsResponse) String() string

type Post

type Post struct {
	Id          *wrapperspb.Int32Value  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Title       *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Description *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Likes       *wrapperspb.Int32Value  `protobuf:"bytes,4,opt,name=likes,proto3" json:"likes,omitempty"`
	// contains filtered or unexported fields
}

func (*Post) Descriptor deprecated

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

Deprecated: Use Post.ProtoReflect.Descriptor instead.

func (*Post) GetDescription

func (x *Post) GetDescription() *wrapperspb.StringValue

func (*Post) GetId

func (x *Post) GetId() *wrapperspb.Int32Value

func (*Post) GetLikes

func (x *Post) GetLikes() *wrapperspb.Int32Value

func (*Post) GetTitle

func (x *Post) GetTitle() *wrapperspb.StringValue

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) ProtoReflect

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

func (*Post) Reset

func (x *Post) Reset()

func (*Post) String

func (x *Post) String() string

type PostCrudServiceClient

type PostCrudServiceClient interface {
	GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*GetPostResponse, error)
	CreatePost(ctx context.Context, in *CreatePostRequest, opts ...grpc.CallOption) (*CreatePostResponse, error)
	UpdatePost(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*UpdatePostResponse, error)
	DeletePost(ctx context.Context, in *DeletePostRequest, opts ...grpc.CallOption) (*DeletePostResponse, error)
	ListPosts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListPostsResponse, error)
}

PostCrudServiceClient is the client API for PostCrudService 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.

type PostCrudServiceServer

type PostCrudServiceServer interface {
	GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
	CreatePost(context.Context, *CreatePostRequest) (*CreatePostResponse, error)
	UpdatePost(context.Context, *UpdatePostRequest) (*UpdatePostResponse, error)
	DeletePost(context.Context, *DeletePostRequest) (*DeletePostResponse, error)
	ListPosts(context.Context, *emptypb.Empty) (*ListPostsResponse, error)
	// contains filtered or unexported methods
}

PostCrudServiceServer is the server API for PostCrudService service. All implementations must embed UnimplementedPostCrudServiceServer for forward compatibility

type PostsList

type PostsList struct {
	Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"`
	// contains filtered or unexported fields
}

func (*PostsList) Descriptor deprecated

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

Deprecated: Use PostsList.ProtoReflect.Descriptor instead.

func (*PostsList) GetPosts

func (x *PostsList) GetPosts() []*Post

func (*PostsList) ProtoMessage

func (*PostsList) ProtoMessage()

func (*PostsList) ProtoReflect

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

func (*PostsList) Reset

func (x *PostsList) Reset()

func (*PostsList) String

func (x *PostsList) String() string

type UnimplementedPostCrudServiceServer

type UnimplementedPostCrudServiceServer struct {
}

UnimplementedPostCrudServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPostCrudServiceServer) CreatePost

func (UnimplementedPostCrudServiceServer) DeletePost

func (UnimplementedPostCrudServiceServer) GetPost

func (UnimplementedPostCrudServiceServer) ListPosts

func (UnimplementedPostCrudServiceServer) UpdatePost

type UnsafePostCrudServiceServer

type UnsafePostCrudServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePostCrudServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PostCrudServiceServer will result in compilation errors.

type UpdatePostRequest

type UpdatePostRequest struct {
	Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePostRequest) Descriptor deprecated

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

Deprecated: Use UpdatePostRequest.ProtoReflect.Descriptor instead.

func (*UpdatePostRequest) GetPost

func (x *UpdatePostRequest) GetPost() *Post

func (*UpdatePostRequest) ProtoMessage

func (*UpdatePostRequest) ProtoMessage()

func (*UpdatePostRequest) ProtoReflect

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

func (*UpdatePostRequest) Reset

func (x *UpdatePostRequest) Reset()

func (*UpdatePostRequest) String

func (x *UpdatePostRequest) String() string

type UpdatePostResponse

type UpdatePostResponse struct {
	Success bool  `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Post    *Post `protobuf:"bytes,2,opt,name=post,proto3" json:"post,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatePostResponse) Descriptor deprecated

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

Deprecated: Use UpdatePostResponse.ProtoReflect.Descriptor instead.

func (*UpdatePostResponse) GetPost

func (x *UpdatePostResponse) GetPost() *Post

func (*UpdatePostResponse) GetSuccess

func (x *UpdatePostResponse) GetSuccess() bool

func (*UpdatePostResponse) ProtoMessage

func (*UpdatePostResponse) ProtoMessage()

func (*UpdatePostResponse) ProtoReflect

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

func (*UpdatePostResponse) Reset

func (x *UpdatePostResponse) Reset()

func (*UpdatePostResponse) String

func (x *UpdatePostResponse) String() string

Jump to

Keyboard shortcuts

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