v1

package
v0.0.0-...-23ca088 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_product_app_v1_v1_proto protoreflect.FileDescriptor

Functions

func RegisterBlogServiceHTTPServer

func RegisterBlogServiceHTTPServer(r gin.IRouter, srv BlogServiceHTTPServer)

Types

type Article

type Article struct {
	Title   string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// @inject_tag: form:"author_id" uri:"author_id"
	AuthorId int32 `protobuf:"varint,3,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty" form:"author_id" uri:"author_id"`
	// contains filtered or unexported fields
}

func (*Article) Descriptor deprecated

func (*Article) Descriptor() ([]byte, []int)

Deprecated: Use Article.ProtoReflect.Descriptor instead.

func (*Article) GetAuthorId

func (x *Article) GetAuthorId() int32

func (*Article) GetContent

func (x *Article) GetContent() string

func (*Article) GetTitle

func (x *Article) GetTitle() string

func (*Article) ProtoMessage

func (*Article) ProtoMessage()

func (*Article) ProtoReflect

func (x *Article) ProtoReflect() protoreflect.Message

func (*Article) Reset

func (x *Article) Reset()

func (*Article) String

func (x *Article) String() string

type BlogService

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

func (*BlogService) CreateArticle_0

func (s *BlogService) CreateArticle_0(ctx *gin.Context)

func (*BlogService) GetArticles_0

func (s *BlogService) GetArticles_0(ctx *gin.Context)

func (*BlogService) GetArticles_1

func (s *BlogService) GetArticles_1(ctx *gin.Context)

func (*BlogService) RegisterService

func (s *BlogService) RegisterService()

type BlogServiceHTTPServer

type BlogServiceHTTPServer interface {
	CreateArticle(context.Context, *Article) (*Article, error)

	GetArticles(context.Context, *GetArticlesReq) (*GetArticlesResp, error)
}

type GetArticlesReq

type GetArticlesReq struct {

	// @inject_tag: form:"title"
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" form:"title"`
	// @inject_tag: form:"page"
	Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty" form:"page"`
	// @inject_tag: form:"page_size"
	PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty" form:"page_size"`
	// 作者名
	// @inject_tag: form:"author_id" uri:"author_id"
	AuthorId int32 `protobuf:"varint,4,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty" form:"author_id" uri:"author_id"`
	// contains filtered or unexported fields
}

func (*GetArticlesReq) Descriptor deprecated

func (*GetArticlesReq) Descriptor() ([]byte, []int)

Deprecated: Use GetArticlesReq.ProtoReflect.Descriptor instead.

func (*GetArticlesReq) GetAuthorId

func (x *GetArticlesReq) GetAuthorId() int32

func (*GetArticlesReq) GetPage

func (x *GetArticlesReq) GetPage() int32

func (*GetArticlesReq) GetPageSize

func (x *GetArticlesReq) GetPageSize() int32

func (*GetArticlesReq) GetTitle

func (x *GetArticlesReq) GetTitle() string

func (*GetArticlesReq) ProtoMessage

func (*GetArticlesReq) ProtoMessage()

func (*GetArticlesReq) ProtoReflect

func (x *GetArticlesReq) ProtoReflect() protoreflect.Message

func (*GetArticlesReq) Reset

func (x *GetArticlesReq) Reset()

func (*GetArticlesReq) String

func (x *GetArticlesReq) String() string

type GetArticlesResp

type GetArticlesResp struct {
	Total    int64      `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Articles []*Article `protobuf:"bytes,2,rep,name=articles,proto3" json:"articles,omitempty"`
	// contains filtered or unexported fields
}

func (*GetArticlesResp) Descriptor deprecated

func (*GetArticlesResp) Descriptor() ([]byte, []int)

Deprecated: Use GetArticlesResp.ProtoReflect.Descriptor instead.

func (*GetArticlesResp) GetArticles

func (x *GetArticlesResp) GetArticles() []*Article

func (*GetArticlesResp) GetTotal

func (x *GetArticlesResp) GetTotal() int64

func (*GetArticlesResp) ProtoMessage

func (*GetArticlesResp) ProtoMessage()

func (*GetArticlesResp) ProtoReflect

func (x *GetArticlesResp) ProtoReflect() protoreflect.Message

func (*GetArticlesResp) Reset

func (x *GetArticlesResp) Reset()

func (*GetArticlesResp) String

func (x *GetArticlesResp) String() string

Jump to

Keyboard shortcuts

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