examples

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnumValueMaps = map[string]map[string]int32{
	"Section": map[string]int32{
		"cooking":      0,
		"painting":     1,
		"snowboarding": 3,
		"woodworking":  2,
	},
}
View Source
var Section_name = map[int32]string{
	0: "cooking",
	1: "painting",
	2: "woodworking",
	3: "snowboarding",
}
View Source
var Section_value = map[string]int32{
	"cooking":      0,
	"painting":     1,
	"woodworking":  2,
	"snowboarding": 3,
}

Functions

func RegisterBlogQueryServiceServer

func RegisterBlogQueryServiceServer(s *grpc.Server, srv BlogQueryServiceServer)

func RegisterInsertServiceServer

func RegisterInsertServiceServer(s *grpc.Server, srv InsertServiceServer)

Types

type Author

type Author struct {
	AuthorId               uint32   `protobuf:"varint,1,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"`
	AuthorUsername         string   `protobuf:"bytes,2,opt,name=author_username,json=authorUsername,proto3" json:"author_username,omitempty"`
	AuthorPassword         string   `protobuf:"bytes,3,opt,name=author_password,json=authorPassword,proto3" json:"author_password,omitempty"`
	AuthorEmail            string   `protobuf:"bytes,4,opt,name=author_email,json=authorEmail,proto3" json:"author_email,omitempty"`
	AuthorBio              string   `protobuf:"bytes,5,opt,name=author_bio,json=authorBio,proto3" json:"author_bio,omitempty"`
	AuthorFavouriteSection Section  `` /* 152-byte string literal not displayed */
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

func (*Author) Descriptor

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

func (*Author) GetAuthorBio

func (m *Author) GetAuthorBio() string

func (*Author) GetAuthorEmail

func (m *Author) GetAuthorEmail() string

func (*Author) GetAuthorFavouriteSection

func (m *Author) GetAuthorFavouriteSection() Section

func (*Author) GetAuthorId

func (m *Author) GetAuthorId() uint32

func (*Author) GetAuthorPassword

func (m *Author) GetAuthorPassword() string

func (*Author) GetAuthorUsername

func (m *Author) GetAuthorUsername() string

func (*Author) ProtoMessage

func (*Author) ProtoMessage()

func (*Author) Reset

func (m *Author) Reset()

func (*Author) String

func (m *Author) String() string

func (*Author) XXX_DiscardUnknown

func (m *Author) XXX_DiscardUnknown()

func (*Author) XXX_Marshal

func (m *Author) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Author) XXX_Merge

func (m *Author) XXX_Merge(src proto.Message)

func (*Author) XXX_Size

func (m *Author) XXX_Size() int

func (*Author) XXX_Unmarshal

func (m *Author) XXX_Unmarshal(b []byte) error

type BlogIdsRequest

type BlogIdsRequest struct {
	Ids                  []uint32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
	Titles               []string `protobuf:"bytes,2,rep,name=titles,proto3" json:"titles,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BlogIdsRequest) Descriptor

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

func (*BlogIdsRequest) GetIds

func (m *BlogIdsRequest) GetIds() []uint32

func (*BlogIdsRequest) GetTitles

func (m *BlogIdsRequest) GetTitles() []string

func (*BlogIdsRequest) ProtoMessage

func (*BlogIdsRequest) ProtoMessage()

func (*BlogIdsRequest) Reset

func (m *BlogIdsRequest) Reset()

func (*BlogIdsRequest) String

func (m *BlogIdsRequest) String() string

func (*BlogIdsRequest) XXX_DiscardUnknown

func (m *BlogIdsRequest) XXX_DiscardUnknown()

func (*BlogIdsRequest) XXX_Marshal

func (m *BlogIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlogIdsRequest) XXX_Merge

func (m *BlogIdsRequest) XXX_Merge(src proto.Message)

func (*BlogIdsRequest) XXX_Size

func (m *BlogIdsRequest) XXX_Size() int

func (*BlogIdsRequest) XXX_Unmarshal

func (m *BlogIdsRequest) XXX_Unmarshal(b []byte) error

type BlogQueryServiceClient

type BlogQueryServiceClient interface {
	SelectBlog(ctx context.Context, in *BlogRequest, opts ...grpc.CallOption) (*BlogResponse, error)
	SelectBlogs(ctx context.Context, in *BlogIdsRequest, opts ...grpc.CallOption) (BlogQueryService_SelectBlogsClient, error)
	SelectDetailedBlog(ctx context.Context, in *BlogRequest, opts ...grpc.CallOption) (*DetailedBlogResponse, error)
	SelectDetailedBlogs(ctx context.Context, in *BlogIdsRequest, opts ...grpc.CallOption) (BlogQueryService_SelectDetailedBlogsClient, error)
}

BlogQueryServiceClient is the client API for BlogQueryService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewBlogQueryServiceClient

func NewBlogQueryServiceClient(cc *grpc.ClientConn) BlogQueryServiceClient

type BlogQueryServiceMapServer

type BlogQueryServiceMapServer struct {
	DB *sql.DB

	SelectBlogMapper             *mapper.Mapper
	SelectBlogCallbacks          BlogQueryServiceSelectBlogCallbacks
	SelectBlogsMapper            *mapper.Mapper
	SelectBlogsCallbacks         BlogQueryServiceSelectBlogsCallbacks
	SelectDetailedBlogMapper     *mapper.Mapper
	SelectDetailedBlogCallbacks  BlogQueryServiceSelectDetailedBlogCallbacks
	SelectDetailedBlogsMapper    *mapper.Mapper
	SelectDetailedBlogsCallbacks BlogQueryServiceSelectDetailedBlogsCallbacks
	// contains filtered or unexported fields
}

func (*BlogQueryServiceMapServer) RegisterSelectBlogAfterQueryCallback

func (m *BlogQueryServiceMapServer) RegisterSelectBlogAfterQueryCallback(callbacks ...func(queryString string, req *BlogRequest, resp *BlogResponse) error)

func (*BlogQueryServiceMapServer) RegisterSelectBlogBeforeQueryCallback

func (m *BlogQueryServiceMapServer) RegisterSelectBlogBeforeQueryCallback(callbacks ...func(queryString string, req *BlogRequest) error)

func (*BlogQueryServiceMapServer) RegisterSelectBlogCache

func (m *BlogQueryServiceMapServer) RegisterSelectBlogCache(cache func(queryString string, req *BlogRequest) (*BlogResponse, error))

func (*BlogQueryServiceMapServer) RegisterSelectBlogsAfterQueryCallback

func (m *BlogQueryServiceMapServer) RegisterSelectBlogsAfterQueryCallback(callbacks ...func(queryString string, req *BlogIdsRequest, resp []*BlogResponse) error)

func (*BlogQueryServiceMapServer) RegisterSelectBlogsBeforeQueryCallback

func (m *BlogQueryServiceMapServer) RegisterSelectBlogsBeforeQueryCallback(callbacks ...func(queryString string, req *BlogIdsRequest) error)

func (*BlogQueryServiceMapServer) RegisterSelectBlogsCache

func (m *BlogQueryServiceMapServer) RegisterSelectBlogsCache(cache func(queryString string, req *BlogIdsRequest) ([]*BlogResponse, error))

func (*BlogQueryServiceMapServer) RegisterSelectDetailedBlogAfterQueryCallback

func (m *BlogQueryServiceMapServer) RegisterSelectDetailedBlogAfterQueryCallback(callbacks ...func(queryString string, req *BlogRequest, resp *DetailedBlogResponse) error)

func (*BlogQueryServiceMapServer) RegisterSelectDetailedBlogBeforeQueryCallback

func (m *BlogQueryServiceMapServer) RegisterSelectDetailedBlogBeforeQueryCallback(callbacks ...func(queryString string, req *BlogRequest) error)

func (*BlogQueryServiceMapServer) RegisterSelectDetailedBlogCache

func (m *BlogQueryServiceMapServer) RegisterSelectDetailedBlogCache(cache func(queryString string, req *BlogRequest) (*DetailedBlogResponse, error))

func (*BlogQueryServiceMapServer) RegisterSelectDetailedBlogsAfterQueryCallback

func (m *BlogQueryServiceMapServer) RegisterSelectDetailedBlogsAfterQueryCallback(callbacks ...func(queryString string, req *BlogIdsRequest, resp []*DetailedBlogResponse) error)

func (*BlogQueryServiceMapServer) RegisterSelectDetailedBlogsBeforeQueryCallback

func (m *BlogQueryServiceMapServer) RegisterSelectDetailedBlogsBeforeQueryCallback(callbacks ...func(queryString string, req *BlogIdsRequest) error)

func (*BlogQueryServiceMapServer) RegisterSelectDetailedBlogsCache

func (m *BlogQueryServiceMapServer) RegisterSelectDetailedBlogsCache(cache func(queryString string, req *BlogIdsRequest) ([]*DetailedBlogResponse, error))

func (*BlogQueryServiceMapServer) SelectBlog

func (*BlogQueryServiceMapServer) SelectBlogs

func (*BlogQueryServiceMapServer) SelectDetailedBlog

func (*BlogQueryServiceMapServer) SelectDetailedBlogs

type BlogQueryServiceSelectBlogCallbacks

type BlogQueryServiceSelectBlogCallbacks struct {
	BeforeQueryCallback []func(queryString string, req *BlogRequest) error
	AfterQueryCallback  []func(queryString string, req *BlogRequest, resp *BlogResponse) error
	Cache               func(queryString string, req *BlogRequest) (*BlogResponse, error)
}

type BlogQueryServiceSelectBlogsCallbacks

type BlogQueryServiceSelectBlogsCallbacks struct {
	BeforeQueryCallback []func(queryString string, req *BlogIdsRequest) error
	AfterQueryCallback  []func(queryString string, req *BlogIdsRequest, resp []*BlogResponse) error
	Cache               func(queryString string, req *BlogIdsRequest) ([]*BlogResponse, error)
}

type BlogQueryServiceSelectDetailedBlogCallbacks

type BlogQueryServiceSelectDetailedBlogCallbacks struct {
	BeforeQueryCallback []func(queryString string, req *BlogRequest) error
	AfterQueryCallback  []func(queryString string, req *BlogRequest, resp *DetailedBlogResponse) error
	Cache               func(queryString string, req *BlogRequest) (*DetailedBlogResponse, error)
}

type BlogQueryServiceSelectDetailedBlogsCallbacks

type BlogQueryServiceSelectDetailedBlogsCallbacks struct {
	BeforeQueryCallback []func(queryString string, req *BlogIdsRequest) error
	AfterQueryCallback  []func(queryString string, req *BlogIdsRequest, resp []*DetailedBlogResponse) error
	Cache               func(queryString string, req *BlogIdsRequest) ([]*DetailedBlogResponse, error)
}

type BlogQueryServiceServer

type BlogQueryServiceServer interface {
	SelectBlog(context.Context, *BlogRequest) (*BlogResponse, error)
	SelectBlogs(*BlogIdsRequest, BlogQueryService_SelectBlogsServer) error
	SelectDetailedBlog(context.Context, *BlogRequest) (*DetailedBlogResponse, error)
	SelectDetailedBlogs(*BlogIdsRequest, BlogQueryService_SelectDetailedBlogsServer) error
}

BlogQueryServiceServer is the server API for BlogQueryService service.

type BlogQueryService_SelectBlogsClient

type BlogQueryService_SelectBlogsClient interface {
	Recv() (*BlogResponse, error)
	grpc.ClientStream
}

type BlogQueryService_SelectBlogsServer

type BlogQueryService_SelectBlogsServer interface {
	Send(*BlogResponse) error
	grpc.ServerStream
}

type BlogQueryService_SelectDetailedBlogsClient

type BlogQueryService_SelectDetailedBlogsClient interface {
	Recv() (*DetailedBlogResponse, error)
	grpc.ClientStream
}

type BlogQueryService_SelectDetailedBlogsServer

type BlogQueryService_SelectDetailedBlogsServer interface {
	Send(*DetailedBlogResponse) error
	grpc.ServerStream
}

type BlogRequest

type BlogRequest struct {
	Id                   uint32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	AuthorId             uint32   `protobuf:"varint,2,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BlogRequest) Descriptor

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

func (*BlogRequest) GetAuthorId

func (m *BlogRequest) GetAuthorId() uint32

func (*BlogRequest) GetId

func (m *BlogRequest) GetId() uint32

func (*BlogRequest) ProtoMessage

func (*BlogRequest) ProtoMessage()

func (*BlogRequest) Reset

func (m *BlogRequest) Reset()

func (*BlogRequest) String

func (m *BlogRequest) String() string

func (*BlogRequest) XXX_DiscardUnknown

func (m *BlogRequest) XXX_DiscardUnknown()

func (*BlogRequest) XXX_Marshal

func (m *BlogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlogRequest) XXX_Merge

func (m *BlogRequest) XXX_Merge(src proto.Message)

func (*BlogRequest) XXX_Size

func (m *BlogRequest) XXX_Size() int

func (*BlogRequest) XXX_Unmarshal

func (m *BlogRequest) XXX_Unmarshal(b []byte) error

type BlogResponse

type BlogResponse struct {
	Id                   uint32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title                string   `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	AuthorId             string   `protobuf:"bytes,3,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BlogResponse) Descriptor

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

func (*BlogResponse) GetAuthorId

func (m *BlogResponse) GetAuthorId() string

func (*BlogResponse) GetId

func (m *BlogResponse) GetId() uint32

func (*BlogResponse) GetTitle

func (m *BlogResponse) GetTitle() string

func (*BlogResponse) ProtoMessage

func (*BlogResponse) ProtoMessage()

func (*BlogResponse) Reset

func (m *BlogResponse) Reset()

func (*BlogResponse) String

func (m *BlogResponse) String() string

func (*BlogResponse) XXX_DiscardUnknown

func (m *BlogResponse) XXX_DiscardUnknown()

func (*BlogResponse) XXX_Marshal

func (m *BlogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlogResponse) XXX_Merge

func (m *BlogResponse) XXX_Merge(src proto.Message)

func (*BlogResponse) XXX_Size

func (m *BlogResponse) XXX_Size() int

func (*BlogResponse) XXX_Unmarshal

func (m *BlogResponse) XXX_Unmarshal(b []byte) error

type Comment

type Comment struct {
	CommentId            uint32   `protobuf:"varint,1,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"`
	CommentPostId        uint32   `protobuf:"varint,2,opt,name=comment_post_id,json=commentPostId,proto3" json:"comment_post_id,omitempty"`
	CommentName          string   `protobuf:"bytes,3,opt,name=comment_name,json=commentName,proto3" json:"comment_name,omitempty"`
	CommentText          string   `protobuf:"bytes,4,opt,name=comment_text,json=commentText,proto3" json:"comment_text,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Comment) Descriptor

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

func (*Comment) GetCommentId

func (m *Comment) GetCommentId() uint32

func (*Comment) GetCommentName

func (m *Comment) GetCommentName() string

func (*Comment) GetCommentPostId

func (m *Comment) GetCommentPostId() uint32

func (*Comment) GetCommentText

func (m *Comment) GetCommentText() string

func (*Comment) ProtoMessage

func (*Comment) ProtoMessage()

func (*Comment) Reset

func (m *Comment) Reset()

func (*Comment) String

func (m *Comment) String() string

func (*Comment) XXX_DiscardUnknown

func (m *Comment) XXX_DiscardUnknown()

func (*Comment) XXX_Marshal

func (m *Comment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Comment) XXX_Merge

func (m *Comment) XXX_Merge(src proto.Message)

func (*Comment) XXX_Size

func (m *Comment) XXX_Size() int

func (*Comment) XXX_Unmarshal

func (m *Comment) XXX_Unmarshal(b []byte) error

type DetailedBlogResponse

type DetailedBlogResponse struct {
	BlogId               uint32   `protobuf:"varint,1,opt,name=blog_id,json=blogId,proto3" json:"blog_id,omitempty"`
	BlogTitle            string   `protobuf:"bytes,2,opt,name=blog_title,json=blogTitle,proto3" json:"blog_title,omitempty"`
	Author               *Author  `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"`
	Posts                []*Post  `protobuf:"bytes,4,rep,name=posts,proto3" json:"posts,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DetailedBlogResponse) Descriptor

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

func (*DetailedBlogResponse) GetAuthor

func (m *DetailedBlogResponse) GetAuthor() *Author

func (*DetailedBlogResponse) GetBlogId

func (m *DetailedBlogResponse) GetBlogId() uint32

func (*DetailedBlogResponse) GetBlogTitle

func (m *DetailedBlogResponse) GetBlogTitle() string

func (*DetailedBlogResponse) GetPosts

func (m *DetailedBlogResponse) GetPosts() []*Post

func (*DetailedBlogResponse) ProtoMessage

func (*DetailedBlogResponse) ProtoMessage()

func (*DetailedBlogResponse) Reset

func (m *DetailedBlogResponse) Reset()

func (*DetailedBlogResponse) String

func (m *DetailedBlogResponse) String() string

func (*DetailedBlogResponse) XXX_DiscardUnknown

func (m *DetailedBlogResponse) XXX_DiscardUnknown()

func (*DetailedBlogResponse) XXX_Marshal

func (m *DetailedBlogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DetailedBlogResponse) XXX_Merge

func (m *DetailedBlogResponse) XXX_Merge(src proto.Message)

func (*DetailedBlogResponse) XXX_Size

func (m *DetailedBlogResponse) XXX_Size() int

func (*DetailedBlogResponse) XXX_Unmarshal

func (m *DetailedBlogResponse) XXX_Unmarshal(b []byte) error

type EmptyResponse

type EmptyResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EmptyResponse) Descriptor

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

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) Reset

func (m *EmptyResponse) Reset()

func (*EmptyResponse) String

func (m *EmptyResponse) String() string

func (*EmptyResponse) XXX_DiscardUnknown

func (m *EmptyResponse) XXX_DiscardUnknown()

func (*EmptyResponse) XXX_Marshal

func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmptyResponse) XXX_Merge

func (m *EmptyResponse) XXX_Merge(src proto.Message)

func (*EmptyResponse) XXX_Size

func (m *EmptyResponse) XXX_Size() int

func (*EmptyResponse) XXX_Unmarshal

func (m *EmptyResponse) XXX_Unmarshal(b []byte) error

type InsertAuthorRequest

type InsertAuthorRequest struct {
	Id                   uint32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username             string   `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Password             string   `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Email                string   `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	Bio                  string   `protobuf:"bytes,5,opt,name=bio,proto3" json:"bio,omitempty"`
	FavouriteSection     string   `protobuf:"bytes,6,opt,name=favourite_section,json=favouriteSection,proto3" json:"favourite_section,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*InsertAuthorRequest) Descriptor

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

func (*InsertAuthorRequest) GetBio

func (m *InsertAuthorRequest) GetBio() string

func (*InsertAuthorRequest) GetEmail

func (m *InsertAuthorRequest) GetEmail() string

func (*InsertAuthorRequest) GetFavouriteSection

func (m *InsertAuthorRequest) GetFavouriteSection() string

func (*InsertAuthorRequest) GetId

func (m *InsertAuthorRequest) GetId() uint32

func (*InsertAuthorRequest) GetPassword

func (m *InsertAuthorRequest) GetPassword() string

func (*InsertAuthorRequest) GetUsername

func (m *InsertAuthorRequest) GetUsername() string

func (*InsertAuthorRequest) ProtoMessage

func (*InsertAuthorRequest) ProtoMessage()

func (*InsertAuthorRequest) Reset

func (m *InsertAuthorRequest) Reset()

func (*InsertAuthorRequest) String

func (m *InsertAuthorRequest) String() string

func (*InsertAuthorRequest) XXX_DiscardUnknown

func (m *InsertAuthorRequest) XXX_DiscardUnknown()

func (*InsertAuthorRequest) XXX_Marshal

func (m *InsertAuthorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InsertAuthorRequest) XXX_Merge

func (m *InsertAuthorRequest) XXX_Merge(src proto.Message)

func (*InsertAuthorRequest) XXX_Size

func (m *InsertAuthorRequest) XXX_Size() int

func (*InsertAuthorRequest) XXX_Unmarshal

func (m *InsertAuthorRequest) XXX_Unmarshal(b []byte) error

type InsertServiceClient

type InsertServiceClient interface {
	InsertAuthor(ctx context.Context, in *InsertAuthorRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
}

InsertServiceClient is the client API for InsertService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewInsertServiceClient

func NewInsertServiceClient(cc *grpc.ClientConn) InsertServiceClient

type InsertServiceInsertAuthorCallbacks

type InsertServiceInsertAuthorCallbacks struct {
	BeforeQueryCallback []func(queryString string, req *InsertAuthorRequest) error
	AfterQueryCallback  []func(queryString string, req *InsertAuthorRequest, resp *EmptyResponse) error
	Cache               func(queryString string, req *InsertAuthorRequest) (*EmptyResponse, error)
}

type InsertServiceMapServer

type InsertServiceMapServer struct {
	DB *sql.DB

	InsertAuthorMapper    *mapper.Mapper
	InsertAuthorCallbacks InsertServiceInsertAuthorCallbacks
	// contains filtered or unexported fields
}

func (*InsertServiceMapServer) InsertAuthor

func (*InsertServiceMapServer) RegisterInsertAuthorAfterQueryCallback

func (m *InsertServiceMapServer) RegisterInsertAuthorAfterQueryCallback(callbacks ...func(queryString string, req *InsertAuthorRequest, resp *EmptyResponse) error)

func (*InsertServiceMapServer) RegisterInsertAuthorBeforeQueryCallback

func (m *InsertServiceMapServer) RegisterInsertAuthorBeforeQueryCallback(callbacks ...func(queryString string, req *InsertAuthorRequest) error)

func (*InsertServiceMapServer) RegisterInsertAuthorCache

func (m *InsertServiceMapServer) RegisterInsertAuthorCache(cache func(queryString string, req *InsertAuthorRequest) (*EmptyResponse, error))

type InsertServiceServer

type InsertServiceServer interface {
	InsertAuthor(context.Context, *InsertAuthorRequest) (*EmptyResponse, error)
}

InsertServiceServer is the server API for InsertService service.

type Post

type Post struct {
	PostId               uint32               `protobuf:"varint,1,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
	PostBlogId           uint32               `protobuf:"varint,2,opt,name=post_blog_id,json=postBlogId,proto3" json:"post_blog_id,omitempty"`
	PostAuthorId         uint32               `protobuf:"varint,3,opt,name=post_author_id,json=postAuthorId,proto3" json:"post_author_id,omitempty"`
	PostCreatedOn        *timestamp.Timestamp `protobuf:"bytes,4,opt,name=post_created_on,json=postCreatedOn,proto3" json:"post_created_on,omitempty"`
	PostSection          Section              `protobuf:"varint,5,opt,name=post_section,json=postSection,proto3,enum=examples.Section" json:"post_section,omitempty"`
	PostSubject          string               `protobuf:"bytes,6,opt,name=post_subject,json=postSubject,proto3" json:"post_subject,omitempty"`
	Draft                string               `protobuf:"bytes,7,opt,name=draft,proto3" json:"draft,omitempty"`
	PostBody             string               `protobuf:"bytes,8,opt,name=post_body,json=postBody,proto3" json:"post_body,omitempty"`
	Comments             []*Comment           `protobuf:"bytes,9,rep,name=comments,proto3" json:"comments,omitempty"`
	Tags                 []*Tag               `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Post) Descriptor

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

func (*Post) GetComments

func (m *Post) GetComments() []*Comment

func (*Post) GetDraft

func (m *Post) GetDraft() string

func (*Post) GetPostAuthorId

func (m *Post) GetPostAuthorId() uint32

func (*Post) GetPostBlogId

func (m *Post) GetPostBlogId() uint32

func (*Post) GetPostBody

func (m *Post) GetPostBody() string

func (*Post) GetPostCreatedOn

func (m *Post) GetPostCreatedOn() *timestamp.Timestamp

func (*Post) GetPostId

func (m *Post) GetPostId() uint32

func (*Post) GetPostSection

func (m *Post) GetPostSection() Section

func (*Post) GetPostSubject

func (m *Post) GetPostSubject() string

func (*Post) GetTags

func (m *Post) GetTags() []*Tag

func (*Post) ProtoMessage

func (*Post) ProtoMessage()

func (*Post) Reset

func (m *Post) Reset()

func (*Post) String

func (m *Post) String() string

func (*Post) XXX_DiscardUnknown

func (m *Post) XXX_DiscardUnknown()

func (*Post) XXX_Marshal

func (m *Post) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Post) XXX_Merge

func (m *Post) XXX_Merge(src proto.Message)

func (*Post) XXX_Size

func (m *Post) XXX_Size() int

func (*Post) XXX_Unmarshal

func (m *Post) XXX_Unmarshal(b []byte) error

type Section

type Section int32
const (
	Section_cooking      Section = 0
	Section_painting     Section = 1
	Section_woodworking  Section = 2
	Section_snowboarding Section = 3
)

func (Section) EnumDescriptor

func (Section) EnumDescriptor() ([]byte, []int)

func (Section) String

func (x Section) String() string

type Tag

type Tag struct {
	TagId                uint32   `protobuf:"varint,1,opt,name=tag_id,json=tagId,proto3" json:"tag_id,omitempty"`
	TagName              string   `protobuf:"bytes,2,opt,name=tag_name,json=tagName,proto3" json:"tag_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Tag) Descriptor

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

func (*Tag) GetTagId

func (m *Tag) GetTagId() uint32

func (*Tag) GetTagName

func (m *Tag) GetTagName() string

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) Reset

func (m *Tag) Reset()

func (*Tag) String

func (m *Tag) String() string

func (*Tag) XXX_DiscardUnknown

func (m *Tag) XXX_DiscardUnknown()

func (*Tag) XXX_Marshal

func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Tag) XXX_Merge

func (m *Tag) XXX_Merge(src proto.Message)

func (*Tag) XXX_Size

func (m *Tag) XXX_Size() int

func (*Tag) XXX_Unmarshal

func (m *Tag) XXX_Unmarshal(b []byte) error

type UnimplementedBlogQueryServiceServer

type UnimplementedBlogQueryServiceServer struct {
}

UnimplementedBlogQueryServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedBlogQueryServiceServer) SelectBlog

func (*UnimplementedBlogQueryServiceServer) SelectBlogs

func (*UnimplementedBlogQueryServiceServer) SelectDetailedBlog

func (*UnimplementedBlogQueryServiceServer) SelectDetailedBlogs

type UnimplementedInsertServiceServer

type UnimplementedInsertServiceServer struct {
}

UnimplementedInsertServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedInsertServiceServer) InsertAuthor

Jump to

Keyboard shortcuts

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