postsv1

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var File_posts_posts_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use PostDto.ProtoReflect.Descriptor instead.

func (*PostDto) GetAuthorId

func (x *PostDto) GetAuthorId() string

func (*PostDto) GetContent

func (x *PostDto) GetContent() string

func (*PostDto) GetCreatedAt

func (x *PostDto) GetCreatedAt() *timestamppb.Timestamp

func (*PostDto) GetId

func (x *PostDto) GetId() string

func (*PostDto) GetImageUrl

func (x *PostDto) GetImageUrl() string

func (*PostDto) GetTitle

func (x *PostDto) GetTitle() string

func (*PostDto) GetUpdatedAt

func (x *PostDto) GetUpdatedAt() *timestamppb.Timestamp

func (*PostDto) ProtoMessage

func (*PostDto) ProtoMessage()

func (*PostDto) ProtoReflect

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

func (*PostDto) Reset

func (x *PostDto) Reset()

func (*PostDto) String

func (x *PostDto) String() string

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) DeletePost

func (UnimplementedPostsServer) GetPost

func (UnimplementedPostsServer) GetPosts

func (UnimplementedPostsServer) PatchPost

func (UnimplementedPostsServer) PutPost

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.

Jump to

Keyboard shortcuts

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