protobuf

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-go. DO NOT EDIT. source: pb.proto

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterApiServerServer

func RegisterApiServerServer(s *grpc.Server, srv ApiServerServer)

Types

type ApiServerClient

type ApiServerClient interface {
	// 接口
	HelloWorld(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

ApiServerClient is the client API for ApiServer service.

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

func NewApiServerClient

func NewApiServerClient(cc *grpc.ClientConn) ApiServerClient

type ApiServerServer

type ApiServerServer interface {
	// 接口
	HelloWorld(context.Context, *Request) (*Response, error)
}

ApiServerServer is the server API for ApiServer service.

type Request

type Request struct {
	// UserName 用户昵称
	UserName             string   `protobuf:"bytes,1,opt,name=userName,proto3" json:"userName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

请求

func (*Request) Descriptor

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

func (*Request) GetUserName

func (m *Request) GetUserName() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

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

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

type Response

type Response struct {
	// 状态码
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// 状态码说明
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// Data 返回数据
	Data                 string   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

响应

func (*Response) Descriptor

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

func (*Response) GetCode

func (m *Response) GetCode() int32

func (*Response) GetData

func (m *Response) GetData() string

func (*Response) GetMsg

func (m *Response) GetMsg() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

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

func (*Response) XXX_Merge

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

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

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

type UnimplementedApiServerServer

type UnimplementedApiServerServer struct {
}

UnimplementedApiServerServer can be embedded to have forward compatible implementations.

func (*UnimplementedApiServerServer) HelloWorld

Jump to

Keyboard shortcuts

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