v1

package
v0.0.0-...-7f86f56 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

gRPC handler structure.

func NewHandler

func NewHandler(service *service.Service) *Handler

Creating a new gRPC handler.

func (*Handler) GetPosts

func (h *Handler) GetPosts(ctx context.Context, input *v1.GetPostsRequest) (*v1.GetPostsResponse, error)

Getting posts handler.

func (*Handler) RegisterHandlers

func (h *Handler) RegisterHandlers(srv *grpc.Server)

Registering gRPC handlers.

type PostHandler

type PostHandler struct {
	v1.UnimplementedPostServiceServer
	// contains filtered or unexported fields
}

Sample gRPC server handler.

func NewPostHandler

func NewPostHandler(service service.Post) *PostHandler

Creating a new post gRPC handler.

func (*PostHandler) CreatePost

func (h *PostHandler) CreatePost(ctx context.Context, input *v1.CreatePostRequest) (*v1.CreatePostResponse, error)

Creating a new post handler.

func (*PostHandler) DeletePost

func (h *PostHandler) DeletePost(ctx context.Context, input *v1.DeletePostRequest) (*v1.DeletePostResponse, error)

Deleting a post handler.

func (*PostHandler) GetPost

func (h *PostHandler) GetPost(ctx context.Context, input *v1.GetPostRequest) (*v1.GetPostResponse, error)

Getting a post handler.

func (*PostHandler) GetTotalPostsCount

Getting total posts count.

func (*PostHandler) UpdatePost

func (h *PostHandler) UpdatePost(ctx context.Context, input *v1.UpdatePostRequest) (*v1.UpdatePostResponse, error)

Updating a post handler.

Jump to

Keyboard shortcuts

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