Documentation ¶
Index ¶
- Variables
- func MapBizPost2Pb(a *biz.Post, b *pb.Post)
- func MapCreatePbPost2Biz(a *pb.CreatePostRequest, b *biz.Post)
- func MapUpdatePbPost2Biz(a *pb.UpdatePost, b *biz.Post)
- func NewGrpcServerRegister(post *PostService) kitgrpc.ServiceRegister
- func NewHttpServerRegister(resEncoder khttp.EncodeResponseFunc, errEncoder khttp.EncodeErrorFunc, ...) kithttp.ServiceRegister
- type PostService
- func (s *PostService) CreatePost(ctx context.Context, req *pb.CreatePostRequest) (*pb.Post, error)
- func (s *PostService) DeletePost(ctx context.Context, req *pb.DeletePostRequest) (*pb.DeletePostReply, error)
- func (s *PostService) GetPost(ctx context.Context, req *pb.GetPostRequest) (*pb.Post, error)
- func (s *PostService) ListPost(ctx context.Context, req *pb.ListPostRequest) (*pb.ListPostReply, error)
- func (s *PostService) UpdatePost(ctx context.Context, req *pb.UpdatePostRequest) (*pb.Post, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = kitdi.NewSet( NewGrpcServerRegister, NewHttpServerRegister, NewPostService, )
ProviderSet is service providers.
Functions ¶
func MapCreatePbPost2Biz ¶
func MapCreatePbPost2Biz(a *pb.CreatePostRequest, b *biz.Post)
func MapUpdatePbPost2Biz ¶
func MapUpdatePbPost2Biz(a *pb.UpdatePost, b *biz.Post)
func NewGrpcServerRegister ¶
func NewGrpcServerRegister(post *PostService) kitgrpc.ServiceRegister
func NewHttpServerRegister ¶
func NewHttpServerRegister( resEncoder khttp.EncodeResponseFunc, errEncoder khttp.EncodeErrorFunc, post *PostService) kithttp.ServiceRegister
Types ¶
type PostService ¶
type PostService struct { pb.UnimplementedPostServiceServer // contains filtered or unexported fields }
func NewPostService ¶
func NewPostService(repo biz.PostRepo, auth authz.Service) *PostService
func (*PostService) CreatePost ¶
func (s *PostService) CreatePost(ctx context.Context, req *pb.CreatePostRequest) (*pb.Post, error)
func (*PostService) DeletePost ¶
func (s *PostService) DeletePost(ctx context.Context, req *pb.DeletePostRequest) (*pb.DeletePostReply, error)
func (*PostService) GetPost ¶
func (s *PostService) GetPost(ctx context.Context, req *pb.GetPostRequest) (*pb.Post, error)
func (*PostService) ListPost ¶
func (s *PostService) ListPost(ctx context.Context, req *pb.ListPostRequest) (*pb.ListPostReply, error)
func (*PostService) UpdatePost ¶
func (s *PostService) UpdatePost(ctx context.Context, req *pb.UpdatePostRequest) (*pb.Post, error)
Click to show internal directories.
Click to hide internal directories.