|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
// Code generated by protoc-gen-go-http. DO NOT EDIT.
|
|
|
|
|
// versions:
|
|
|
|
|
// protoc-gen-go-http v2.0.0-rc3
|
|
|
|
|
// protoc-gen-go-http v2.0.0-rc5
|
|
|
|
|
|
|
|
|
|
package v1 |
|
|
|
|
|
|
|
|
@ -156,8 +156,10 @@ func NewBlogServiceHTTPClient(client *http.Client) BlogServiceHTTPClient { |
|
|
|
|
|
|
|
|
|
func (c *BlogServiceHTTPClientImpl) CreateArticle(ctx context.Context, in *CreateArticleRequest, opts ...http.CallOption) (*CreateArticleReply, error) { |
|
|
|
|
var out CreateArticleReply |
|
|
|
|
path := binding.EncodeURL("/v1/article/", in, false) |
|
|
|
|
pattern := "/v1/article/" |
|
|
|
|
path := binding.EncodeURL(pattern, in, false) |
|
|
|
|
opts = append(opts, http.Operation("/blog.api.v1.BlogService/CreateArticle")) |
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
@ -167,8 +169,10 @@ func (c *BlogServiceHTTPClientImpl) CreateArticle(ctx context.Context, in *Creat |
|
|
|
|
|
|
|
|
|
func (c *BlogServiceHTTPClientImpl) DeleteArticle(ctx context.Context, in *DeleteArticleRequest, opts ...http.CallOption) (*DeleteArticleReply, error) { |
|
|
|
|
var out DeleteArticleReply |
|
|
|
|
path := binding.EncodeURL("/v1/article/{id}", in, false) |
|
|
|
|
pattern := "/v1/article/{id}" |
|
|
|
|
path := binding.EncodeURL(pattern, in, false) |
|
|
|
|
opts = append(opts, http.Operation("/blog.api.v1.BlogService/DeleteArticle")) |
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
|
err := c.cc.Invoke(ctx, "DELETE", path, nil, &out, opts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
@ -178,8 +182,10 @@ func (c *BlogServiceHTTPClientImpl) DeleteArticle(ctx context.Context, in *Delet |
|
|
|
|
|
|
|
|
|
func (c *BlogServiceHTTPClientImpl) GetArticle(ctx context.Context, in *GetArticleRequest, opts ...http.CallOption) (*GetArticleReply, error) { |
|
|
|
|
var out GetArticleReply |
|
|
|
|
path := binding.EncodeURL("/v1/article/{id}", in, true) |
|
|
|
|
pattern := "/v1/article/{id}" |
|
|
|
|
path := binding.EncodeURL(pattern, in, true) |
|
|
|
|
opts = append(opts, http.Operation("/blog.api.v1.BlogService/GetArticle")) |
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
|
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
@ -189,8 +195,10 @@ func (c *BlogServiceHTTPClientImpl) GetArticle(ctx context.Context, in *GetArtic |
|
|
|
|
|
|
|
|
|
func (c *BlogServiceHTTPClientImpl) ListArticle(ctx context.Context, in *ListArticleRequest, opts ...http.CallOption) (*ListArticleReply, error) { |
|
|
|
|
var out ListArticleReply |
|
|
|
|
path := binding.EncodeURL("/v1/article/", in, true) |
|
|
|
|
pattern := "/v1/article/" |
|
|
|
|
path := binding.EncodeURL(pattern, in, true) |
|
|
|
|
opts = append(opts, http.Operation("/blog.api.v1.BlogService/ListArticle")) |
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
|
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
@ -200,8 +208,10 @@ func (c *BlogServiceHTTPClientImpl) ListArticle(ctx context.Context, in *ListArt |
|
|
|
|
|
|
|
|
|
func (c *BlogServiceHTTPClientImpl) UpdateArticle(ctx context.Context, in *UpdateArticleRequest, opts ...http.CallOption) (*UpdateArticleReply, error) { |
|
|
|
|
var out UpdateArticleReply |
|
|
|
|
path := binding.EncodeURL("/v1/article/{id}", in, false) |
|
|
|
|
pattern := "/v1/article/{id}" |
|
|
|
|
path := binding.EncodeURL(pattern, in, false) |
|
|
|
|
opts = append(opts, http.Operation("/blog.api.v1.BlogService/UpdateArticle")) |
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
|
err := c.cc.Invoke(ctx, "PUT", path, in, &out, opts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|