greeter

package
v0.0.0-...-f2f1574 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_greeter_proto protoreflect.FileDescriptor

Functions

func NewGreeterEndpoints

func NewGreeterEndpoints() []*api.Endpoint

func RegisterGreeterHandler

func RegisterGreeterHandler(s server.Server, hdlr GreeterHandler, opts ...server.HandlerOption) error

Types

type ComRsp

type ComRsp struct {
	Code int64  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ComRsp) Descriptor deprecated

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

Deprecated: Use ComRsp.ProtoReflect.Descriptor instead.

func (*ComRsp) GetCode

func (x *ComRsp) GetCode() int64

func (*ComRsp) GetData

func (x *ComRsp) GetData() string

func (*ComRsp) GetMsg

func (x *ComRsp) GetMsg() string

func (*ComRsp) ProtoMessage

func (*ComRsp) ProtoMessage()

func (*ComRsp) ProtoReflect

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

func (*ComRsp) Reset

func (x *ComRsp) Reset()

func (*ComRsp) String

func (x *ComRsp) String() string

type GreeterHandler

type GreeterHandler interface {
	Hello(context.Context, *Request, *Response) error
	Set(context.Context, *SetRequest, *ComRsp) error
}

type GreeterService

type GreeterService interface {
	Hello(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
	Set(ctx context.Context, in *SetRequest, opts ...client.CallOption) (*ComRsp, error)
}

func NewGreeterService

func NewGreeterService(name string, c client.Client) GreeterService

type Request

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

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetName

func (x *Request) GetName() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Greeting string `protobuf:"bytes,2,opt,name=greeting,proto3" json:"greeting,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetGreeting

func (x *Response) GetGreeting() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type SetRequest

type SetRequest struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*SetRequest) Descriptor deprecated

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

Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.

func (*SetRequest) GetKey

func (x *SetRequest) GetKey() string

func (*SetRequest) GetValue

func (x *SetRequest) GetValue() string

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) ProtoReflect

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

func (*SetRequest) Reset

func (x *SetRequest) Reset()

func (*SetRequest) String

func (x *SetRequest) String() string

Jump to

Keyboard shortcuts

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