blog_grpc

package module
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

README

blog_grpc

project about blog grpc

Documentation

Index

Constants

View Source
const (
	Blog_ArticleDetail_FullMethodName = "/blog_grpc.blog/ArticleDetail"
)
View Source
const ServiceName = "blog"

Variables

View Source
var Blog_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blog_grpc.blog",
	HandlerType: (*BlogServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ArticleDetail",
			Handler:    _Blog_ArticleDetail_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "blog.proto",
}

Blog_ServiceDesc is the grpc.ServiceDesc for Blog service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterBlogServer

func RegisterBlogServer(s grpc.ServiceRegistrar, srv BlogServer)

func Start

func Start(port *int, srv BlogServer) error

Types

type ArticleDetailReply

type ArticleDetailReply struct {
	Title        string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Thumb        string `protobuf:"bytes,2,opt,name=Thumb,proto3" json:"Thumb,omitempty"`
	Slug         string `protobuf:"bytes,3,opt,name=Slug,proto3" json:"Slug,omitempty"`
	Excerpt      string `protobuf:"bytes,4,opt,name=Excerpt,proto3" json:"Excerpt,omitempty"`
	Content      string `protobuf:"bytes,5,opt,name=Content,proto3" json:"Content,omitempty"`
	DisplayTime  string `protobuf:"bytes,6,opt,name=DisplayTime,proto3" json:"DisplayTime,omitempty"`
	Next         string `protobuf:"bytes,7,opt,name=Next,proto3" json:"Next,omitempty"`
	Previous     string `protobuf:"bytes,8,opt,name=Previous,proto3" json:"Previous,omitempty"`
	CategoryName string `protobuf:"bytes,9,opt,name=CategoryName,proto3" json:"CategoryName,omitempty"`
	CategoryLink string `protobuf:"bytes,10,opt,name=CategoryLink,proto3" json:"CategoryLink,omitempty"`
	// contains filtered or unexported fields
}

func (*ArticleDetailReply) Descriptor deprecated

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

Deprecated: Use ArticleDetailReply.ProtoReflect.Descriptor instead.

func (x *ArticleDetailReply) GetCategoryLink() string

func (*ArticleDetailReply) GetCategoryName

func (x *ArticleDetailReply) GetCategoryName() string

func (*ArticleDetailReply) GetContent

func (x *ArticleDetailReply) GetContent() string

func (*ArticleDetailReply) GetDisplayTime

func (x *ArticleDetailReply) GetDisplayTime() string

func (*ArticleDetailReply) GetExcerpt

func (x *ArticleDetailReply) GetExcerpt() string

func (*ArticleDetailReply) GetNext

func (x *ArticleDetailReply) GetNext() string

func (*ArticleDetailReply) GetPrevious

func (x *ArticleDetailReply) GetPrevious() string

func (*ArticleDetailReply) GetSlug

func (x *ArticleDetailReply) GetSlug() string

func (*ArticleDetailReply) GetThumb

func (x *ArticleDetailReply) GetThumb() string

func (*ArticleDetailReply) GetTitle

func (x *ArticleDetailReply) GetTitle() string

func (*ArticleDetailReply) ProtoMessage

func (*ArticleDetailReply) ProtoMessage()

func (*ArticleDetailReply) ProtoReflect

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

func (*ArticleDetailReply) Reset

func (x *ArticleDetailReply) Reset()

func (*ArticleDetailReply) String

func (x *ArticleDetailReply) String() string

type ArticleDetailReqeust

type ArticleDetailReqeust struct {
	Slug string `protobuf:"bytes,1,opt,name=slug,proto3" json:"slug,omitempty"`
	// contains filtered or unexported fields
}

func (*ArticleDetailReqeust) Descriptor deprecated

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

Deprecated: Use ArticleDetailReqeust.ProtoReflect.Descriptor instead.

func (*ArticleDetailReqeust) GetSlug

func (x *ArticleDetailReqeust) GetSlug() string

func (*ArticleDetailReqeust) ProtoMessage

func (*ArticleDetailReqeust) ProtoMessage()

func (*ArticleDetailReqeust) ProtoReflect

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

func (*ArticleDetailReqeust) Reset

func (x *ArticleDetailReqeust) Reset()

func (*ArticleDetailReqeust) String

func (x *ArticleDetailReqeust) String() string

type BlogClient

type BlogClient interface {
	ArticleDetail(ctx context.Context, in *ArticleDetailReqeust, opts ...grpc.CallOption) (*ArticleDetailReply, error)
}

BlogClient is the client API for Blog service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func Client added in v1.1.2

func Client() (BlogClient, error)

func NewBlogClient

func NewBlogClient(cc grpc.ClientConnInterface) BlogClient

type BlogServer

type BlogServer interface {
	ArticleDetail(context.Context, *ArticleDetailReqeust) (*ArticleDetailReply, error)
}

BlogServer is the server API for Blog service. All implementations should embed UnimplementedBlogServer for forward compatibility

type UnimplementedBlogServer

type UnimplementedBlogServer struct {
}

UnimplementedBlogServer should be embedded to have forward compatible implementations.

func (UnimplementedBlogServer) ArticleDetail

type UnsafeBlogServer

type UnsafeBlogServer interface {
	// contains filtered or unexported methods
}

UnsafeBlogServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BlogServer will result in compilation errors.

Jump to

Keyboard shortcuts

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