|
|
@ -1,6 +1,6 @@ |
|
|
|
// Code generated by protoc-gen-go-http. DO NOT EDIT.
|
|
|
|
// Code generated by protoc-gen-go-http. DO NOT EDIT.
|
|
|
|
// versions:
|
|
|
|
// versions:
|
|
|
|
// protoc-gen-go-http v2.0.0-rc3
|
|
|
|
// protoc-gen-go-http v2.0.0-rc5
|
|
|
|
|
|
|
|
|
|
|
|
package v1 |
|
|
|
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) { |
|
|
|
func (c *BlogServiceHTTPClientImpl) CreateArticle(ctx context.Context, in *CreateArticleRequest, opts ...http.CallOption) (*CreateArticleReply, error) { |
|
|
|
var out CreateArticleReply |
|
|
|
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.Operation("/blog.api.v1.BlogService/CreateArticle")) |
|
|
|
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) |
|
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
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) { |
|
|
|
func (c *BlogServiceHTTPClientImpl) DeleteArticle(ctx context.Context, in *DeleteArticleRequest, opts ...http.CallOption) (*DeleteArticleReply, error) { |
|
|
|
var out DeleteArticleReply |
|
|
|
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.Operation("/blog.api.v1.BlogService/DeleteArticle")) |
|
|
|
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
err := c.cc.Invoke(ctx, "DELETE", path, nil, &out, opts...) |
|
|
|
err := c.cc.Invoke(ctx, "DELETE", path, nil, &out, opts...) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
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) { |
|
|
|
func (c *BlogServiceHTTPClientImpl) GetArticle(ctx context.Context, in *GetArticleRequest, opts ...http.CallOption) (*GetArticleReply, error) { |
|
|
|
var out GetArticleReply |
|
|
|
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.Operation("/blog.api.v1.BlogService/GetArticle")) |
|
|
|
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) |
|
|
|
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
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) { |
|
|
|
func (c *BlogServiceHTTPClientImpl) ListArticle(ctx context.Context, in *ListArticleRequest, opts ...http.CallOption) (*ListArticleReply, error) { |
|
|
|
var out ListArticleReply |
|
|
|
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.Operation("/blog.api.v1.BlogService/ListArticle")) |
|
|
|
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) |
|
|
|
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
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) { |
|
|
|
func (c *BlogServiceHTTPClientImpl) UpdateArticle(ctx context.Context, in *UpdateArticleRequest, opts ...http.CallOption) (*UpdateArticleReply, error) { |
|
|
|
var out UpdateArticleReply |
|
|
|
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.Operation("/blog.api.v1.BlogService/UpdateArticle")) |
|
|
|
|
|
|
|
opts = append(opts, http.PathTemplate(pattern)) |
|
|
|
err := c.cc.Invoke(ctx, "PUT", path, in, &out, opts...) |
|
|
|
err := c.cc.Invoke(ctx, "PUT", path, in, &out, opts...) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
return nil, err |
|
|
|