Documentation ¶
Index ¶
- Variables
- func NewServer(logger log.Logger, conf *config.Config, userClient userv1.UserServiceClient, ...) v1.BlogServiceServer
- type Server
- func (s Server) CreateComment(ctx context.Context, req *v1.CreateCommentRequest) (*v1.CreateCommentResponse, error)
- func (s Server) CreatePost(ctx context.Context, req *v1.CreatePostRequest) (*v1.CreatePostResponse, error)
- func (s Server) DeleteComment(ctx context.Context, req *v1.DeleteCommentRequest) (*v1.DeleteCommentResponse, error)
- func (s Server) DeletePost(ctx context.Context, req *v1.DeletePostRequest) (*v1.DeletePostResponse, error)
- func (s Server) GetPost(ctx context.Context, req *v1.GetPostRequest) (*v1.GetPostResponse, error)
- func (s Server) ListCommentsByPostID(ctx context.Context, req *v1.ListCommentsByPostIDRequest) (*v1.ListCommentsByPostIDResponse, error)
- func (s Server) ListPosts(ctx context.Context, req *v1.ListPostsRequest) (*v1.ListPostsResponse, error)
- func (s Server) SignIn(ctx context.Context, req *v1.SignInRequest) (*v1.SignInResponse, error)
- func (s Server) SignUp(ctx context.Context, req *v1.SignUpRequest) (*v1.SignUpResponse, error)
- func (s Server) UpdateComment(ctx context.Context, req *v1.UpdateCommentRequest) (*v1.UpdateCommentResponse, error)
- func (s Server) UpdatePost(ctx context.Context, req *v1.UpdatePostRequest) (*v1.UpdatePostResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthMethods = map[string]bool{ prefix + "SignUp": false, prefix + "SignIn": false, prefix + "CreatePost": true, prefix + "UpdatePost": true, prefix + "GetPost": false, prefix + "ListPosts": false, prefix + "DeletePost": true, prefix + "CreateComment": true, prefix + "UpdateComment": true, prefix + "DeleteComment": true, prefix + "ListCommentsByPostID": false, }
Functions ¶
func NewServer ¶
func NewServer(logger log.Logger, conf *config.Config, userClient userv1.UserServiceClient, postClient postv1.PostServiceClient, commentClient commentv1.CommentServiceClient, authClient authv1.AuthServiceClient, ) v1.BlogServiceServer
Types ¶
type Server ¶
type Server struct { v1.UnimplementedBlogServiceServer // contains filtered or unexported fields }
func (Server) CreateComment ¶
func (s Server) CreateComment(ctx context.Context, req *v1.CreateCommentRequest) (*v1.CreateCommentResponse, error)
func (Server) CreatePost ¶
func (s Server) CreatePost(ctx context.Context, req *v1.CreatePostRequest) (*v1.CreatePostResponse, error)
func (Server) DeleteComment ¶
func (s Server) DeleteComment(ctx context.Context, req *v1.DeleteCommentRequest) (*v1.DeleteCommentResponse, error)
func (Server) DeletePost ¶
func (s Server) DeletePost(ctx context.Context, req *v1.DeletePostRequest) (*v1.DeletePostResponse, error)
func (Server) GetPost ¶
func (s Server) GetPost(ctx context.Context, req *v1.GetPostRequest) (*v1.GetPostResponse, error)
func (Server) ListCommentsByPostID ¶
func (s Server) ListCommentsByPostID(ctx context.Context, req *v1.ListCommentsByPostIDRequest) (*v1.ListCommentsByPostIDResponse, error)
func (Server) ListPosts ¶
func (s Server) ListPosts(ctx context.Context, req *v1.ListPostsRequest) (*v1.ListPostsResponse, error)
func (Server) SignIn ¶
func (s Server) SignIn(ctx context.Context, req *v1.SignInRequest) (*v1.SignInResponse, error)
func (Server) SignUp ¶
func (s Server) SignUp(ctx context.Context, req *v1.SignUpRequest) (*v1.SignUpResponse, error)
func (Server) UpdateComment ¶
func (s Server) UpdateComment(ctx context.Context, req *v1.UpdateCommentRequest) (*v1.UpdateCommentResponse, error)
func (Server) UpdatePost ¶
func (s Server) UpdatePost(ctx context.Context, req *v1.UpdatePostRequest) (*v1.UpdatePostResponse, error)
Click to show internal directories.
Click to hide internal directories.