api

package
v0.0.0-...-4c29529 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnumTyp_name = map[int32]string{
		0: "m",
		1: "n",
	}
	EnumTyp_value = map[string]int32{
		"m": 0,
		"n": 1,
	}
)

Enum value maps for EnumTyp.

View Source
var (
	Nest_NestEnum_name = map[int32]string{
		0: "i",
		1: "j",
	}
	Nest_NestEnum_value = map[string]int32{
		"i": 0,
		"j": 1,
	}
)

Enum value maps for Nest_NestEnum.

Functions

func RegisterDemoAPIServer

func RegisterDemoAPIServer(s *grpc.Server, srv DemoAPIServer)

Types

type Add2Reply

type Add2Reply struct {
	Sum int32  `protobuf:"varint,1,opt,name=sum,proto3" json:"sum,omitempty"`
	Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

func (*Add2Reply) Descriptor deprecated

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

Deprecated: Use Add2Reply.ProtoReflect.Descriptor instead.

func (*Add2Reply) GetSum

func (x *Add2Reply) GetSum() int32

func (*Add2Reply) GetUid

func (x *Add2Reply) GetUid() string

func (*Add2Reply) ProtoMessage

func (*Add2Reply) ProtoMessage()

func (*Add2Reply) ProtoReflect

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

func (*Add2Reply) Reset

func (x *Add2Reply) Reset()

func (*Add2Reply) String

func (x *Add2Reply) String() string

type Add2Request

type Add2Request struct {
	A      int32  `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
	B      int32  `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"`
	UserId string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"`
	// contains filtered or unexported fields
}

func (*Add2Request) Descriptor deprecated

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

Deprecated: Use Add2Request.ProtoReflect.Descriptor instead.

func (*Add2Request) GetA

func (x *Add2Request) GetA() int32

func (*Add2Request) GetB

func (x *Add2Request) GetB() int32

func (*Add2Request) GetUserId

func (x *Add2Request) GetUserId() string

func (*Add2Request) ProtoMessage

func (*Add2Request) ProtoMessage()

func (*Add2Request) ProtoReflect

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

func (*Add2Request) Reset

func (x *Add2Request) Reset()

func (*Add2Request) String

func (x *Add2Request) String() string

type AddReply

type AddReply struct {
	Sum int32   `protobuf:"varint,1,opt,name=sum,proto3" json:"sum,omitempty"`
	E   EnumTyp `protobuf:"varint,2,opt,name=e,proto3,enum=service.demo.EnumTyp" json:"e,omitempty"`
	F   *Nest   `protobuf:"bytes,3,opt,name=f,proto3" json:"f,omitempty"`
	// contains filtered or unexported fields
}

func (*AddReply) Descriptor deprecated

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

Deprecated: Use AddReply.ProtoReflect.Descriptor instead.

func (*AddReply) GetE

func (x *AddReply) GetE() EnumTyp

func (*AddReply) GetF

func (x *AddReply) GetF() *Nest

func (*AddReply) GetSum

func (x *AddReply) GetSum() int32

func (*AddReply) ProtoMessage

func (*AddReply) ProtoMessage()

func (*AddReply) ProtoReflect

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

func (*AddReply) Reset

func (x *AddReply) Reset()

func (*AddReply) String

func (x *AddReply) String() string

type AddRequest

type AddRequest struct {
	A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
	B int32 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRequest) Descriptor deprecated

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

Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.

func (*AddRequest) GetA

func (x *AddRequest) GetA() int32

func (*AddRequest) GetB

func (x *AddRequest) GetB() int32

func (*AddRequest) ProtoMessage

func (*AddRequest) ProtoMessage()

func (*AddRequest) ProtoReflect

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

func (*AddRequest) Reset

func (x *AddRequest) Reset()

func (*AddRequest) String

func (x *AddRequest) String() string

type DemoAPIClient

type DemoAPIClient interface {
	Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddReply, error)
	Add2(ctx context.Context, in *Add2Request, opts ...grpc.CallOption) (*Add2Reply, error)
	Sub(ctx context.Context, in *SubReq, opts ...grpc.CallOption) (*SubResp, error)
	Sub2(ctx context.Context, in *SubReq2, opts ...grpc.CallOption) (*SubResp2, error)
	RequestBind(ctx context.Context, in *RequestBindReq, opts ...grpc.CallOption) (*RequestBindResp, error)
}

DemoAPIClient is the client API for DemoAPI service.

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

func NewDemoAPIClient

func NewDemoAPIClient(cc grpc.ClientConnInterface) DemoAPIClient

type DemoAPIServer

DemoAPIServer is the server API for DemoAPI service.

type EnumTyp

type EnumTyp int32
const (
	EnumTyp_m EnumTyp = 0
	EnumTyp_n EnumTyp = 1
)

func (EnumTyp) Descriptor

func (EnumTyp) Descriptor() protoreflect.EnumDescriptor

func (EnumTyp) Enum

func (x EnumTyp) Enum() *EnumTyp

func (EnumTyp) EnumDescriptor deprecated

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

Deprecated: Use EnumTyp.Descriptor instead.

func (EnumTyp) Number

func (x EnumTyp) Number() protoreflect.EnumNumber

func (EnumTyp) String

func (x EnumTyp) String() string

func (EnumTyp) Type

func (EnumTyp) Type() protoreflect.EnumType

type Nest

type Nest struct {
	A int64         `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
	B *Nest         `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"`
	D *Nest_NestMsg `protobuf:"bytes,3,opt,name=d,proto3" json:"d,omitempty"`
	E Nest_NestEnum `protobuf:"varint,4,opt,name=e,proto3,enum=service.demo.Nest_NestEnum" json:"e,omitempty"`
	// contains filtered or unexported fields
}

func (*Nest) Descriptor deprecated

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

Deprecated: Use Nest.ProtoReflect.Descriptor instead.

func (*Nest) GetA

func (x *Nest) GetA() int64

func (*Nest) GetB

func (x *Nest) GetB() *Nest

func (*Nest) GetD

func (x *Nest) GetD() *Nest_NestMsg

func (*Nest) GetE

func (x *Nest) GetE() Nest_NestEnum

func (*Nest) ProtoMessage

func (*Nest) ProtoMessage()

func (*Nest) ProtoReflect

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

func (*Nest) Reset

func (x *Nest) Reset()

func (*Nest) String

func (x *Nest) String() string

type Nest_NestEnum

type Nest_NestEnum int32
const (
	Nest_i Nest_NestEnum = 0
	Nest_j Nest_NestEnum = 1
)

func (Nest_NestEnum) Descriptor

func (Nest_NestEnum) Enum

func (x Nest_NestEnum) Enum() *Nest_NestEnum

func (Nest_NestEnum) EnumDescriptor deprecated

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

Deprecated: Use Nest_NestEnum.Descriptor instead.

func (Nest_NestEnum) Number

func (Nest_NestEnum) String

func (x Nest_NestEnum) String() string

func (Nest_NestEnum) Type

type Nest_NestMsg

type Nest_NestMsg struct {
	C *Nest `protobuf:"bytes,1,opt,name=c,proto3" json:"c,omitempty"`
	// contains filtered or unexported fields
}

func (*Nest_NestMsg) Descriptor deprecated

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

Deprecated: Use Nest_NestMsg.ProtoReflect.Descriptor instead.

func (*Nest_NestMsg) GetC

func (x *Nest_NestMsg) GetC() *Nest

func (*Nest_NestMsg) ProtoMessage

func (*Nest_NestMsg) ProtoMessage()

func (*Nest_NestMsg) ProtoReflect

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

func (*Nest_NestMsg) Reset

func (x *Nest_NestMsg) Reset()

func (*Nest_NestMsg) String

func (x *Nest_NestMsg) String() string

type RequestBindReq

type RequestBindReq struct {
	FromForm   string `protobuf:"bytes,1,opt,name=from_form,json=fromForm,proto3" json:"from_form,omitempty"`
	FromCtx    string `protobuf:"bytes,2,opt,name=from_ctx,json=fromCtx,proto3" json:"from_ctx,omitempty"`
	FromQuery  string `protobuf:"bytes,3,opt,name=from_query,json=fromQuery,proto3" json:"from_query,omitempty"`
	FromHeader string `protobuf:"bytes,4,opt,name=from_header,json=fromHeader,proto3" json:"from_header,omitempty"`
	FromParams string `protobuf:"bytes,5,opt,name=from_params,json=fromParams,proto3" json:"from_params,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestBindReq) Descriptor deprecated

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

Deprecated: Use RequestBindReq.ProtoReflect.Descriptor instead.

func (*RequestBindReq) GetFromCtx

func (x *RequestBindReq) GetFromCtx() string

func (*RequestBindReq) GetFromForm

func (x *RequestBindReq) GetFromForm() string

func (*RequestBindReq) GetFromHeader

func (x *RequestBindReq) GetFromHeader() string

func (*RequestBindReq) GetFromParams

func (x *RequestBindReq) GetFromParams() string

func (*RequestBindReq) GetFromQuery

func (x *RequestBindReq) GetFromQuery() string

func (*RequestBindReq) ProtoMessage

func (*RequestBindReq) ProtoMessage()

func (*RequestBindReq) ProtoReflect

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

func (*RequestBindReq) Reset

func (x *RequestBindReq) Reset()

func (*RequestBindReq) String

func (x *RequestBindReq) String() string

type RequestBindResp

type RequestBindResp struct {
	Form   string `protobuf:"bytes,1,opt,name=form,proto3" json:"form,omitempty"`
	Ctx    string `protobuf:"bytes,2,opt,name=ctx,proto3" json:"ctx,omitempty"`
	Query  string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
	Header string `protobuf:"bytes,4,opt,name=header,proto3" json:"header,omitempty"`
	Params string `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestBindResp) Descriptor deprecated

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

Deprecated: Use RequestBindResp.ProtoReflect.Descriptor instead.

func (*RequestBindResp) GetCtx

func (x *RequestBindResp) GetCtx() string

func (*RequestBindResp) GetForm

func (x *RequestBindResp) GetForm() string

func (*RequestBindResp) GetHeader

func (x *RequestBindResp) GetHeader() string

func (*RequestBindResp) GetParams

func (x *RequestBindResp) GetParams() string

func (*RequestBindResp) GetQuery

func (x *RequestBindResp) GetQuery() string

func (*RequestBindResp) ProtoMessage

func (*RequestBindResp) ProtoMessage()

func (*RequestBindResp) ProtoReflect

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

func (*RequestBindResp) Reset

func (x *RequestBindResp) Reset()

func (*RequestBindResp) String

func (x *RequestBindResp) String() string

type SubReq

type SubReq struct {
	A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
	B int32 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"`
	// contains filtered or unexported fields
}

func (*SubReq) Descriptor deprecated

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

Deprecated: Use SubReq.ProtoReflect.Descriptor instead.

func (*SubReq) GetA

func (x *SubReq) GetA() int32

func (*SubReq) GetB

func (x *SubReq) GetB() int32

func (*SubReq) ProtoMessage

func (*SubReq) ProtoMessage()

func (*SubReq) ProtoReflect

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

func (*SubReq) Reset

func (x *SubReq) Reset()

func (*SubReq) String

func (x *SubReq) String() string

type SubReq2

type SubReq2 struct {
	A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
	B int32 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"`
	// contains filtered or unexported fields
}

func (*SubReq2) Descriptor deprecated

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

Deprecated: Use SubReq2.ProtoReflect.Descriptor instead.

func (*SubReq2) GetA

func (x *SubReq2) GetA() int32

func (*SubReq2) GetB

func (x *SubReq2) GetB() int32

func (*SubReq2) ProtoMessage

func (*SubReq2) ProtoMessage()

func (*SubReq2) ProtoReflect

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

func (*SubReq2) Reset

func (x *SubReq2) Reset()

func (*SubReq2) String

func (x *SubReq2) String() string

type SubResp

type SubResp struct {
	Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*SubResp) Descriptor deprecated

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

Deprecated: Use SubResp.ProtoReflect.Descriptor instead.

func (*SubResp) GetResult

func (x *SubResp) GetResult() int32

func (*SubResp) ProtoMessage

func (*SubResp) ProtoMessage()

func (*SubResp) ProtoReflect

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

func (*SubResp) Reset

func (x *SubResp) Reset()

func (*SubResp) String

func (x *SubResp) String() string

type SubResp2

type SubResp2 struct {
	Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*SubResp2) Descriptor deprecated

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

Deprecated: Use SubResp2.ProtoReflect.Descriptor instead.

func (*SubResp2) GetResult

func (x *SubResp2) GetResult() int32

func (*SubResp2) ProtoMessage

func (*SubResp2) ProtoMessage()

func (*SubResp2) ProtoReflect

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

func (*SubResp2) Reset

func (x *SubResp2) Reset()

func (*SubResp2) String

func (x *SubResp2) String() string

type UnimplementedDemoAPIServer

type UnimplementedDemoAPIServer struct {
}

UnimplementedDemoAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedDemoAPIServer) Add

func (*UnimplementedDemoAPIServer) Add2

func (*UnimplementedDemoAPIServer) RequestBind

func (*UnimplementedDemoAPIServer) Sub

func (*UnimplementedDemoAPIServer) Sub2

Jump to

Keyboard shortcuts

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