simplest

package
v0.0.0-...-ca2abdf Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HelloWorldServer_ServiceDesc = server.ServiceDesc{
	ServiceName: "demo.simplest.HelloWorld",
	HandlerType: ((*HelloWorldService)(nil)),
	Methods: []server.Method{
		{
			Name: "/demo/Hello",
			Func: HelloWorldService_Hello_Handler,
		},
		{
			Name: "/demo.simplest.HelloWorld/Hello",
			Func: HelloWorldService_Hello_Handler,
		},
	},
}

HelloWorldServer_ServiceDesc descriptor for server.RegisterService.

View Source
var NewHelloWorldClientProxy = func(opts ...client.Option) HelloWorldClientProxy {
	return &HelloWorldClientProxyImpl{client: client.DefaultClient, opts: opts}
}

Functions

func HelloWorldService_Hello_Handler

func HelloWorldService_Hello_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)

func RegisterHelloWorldService

func RegisterHelloWorldService(s server.Service, svr HelloWorldService)

RegisterHelloWorldService registers service.

Types

type HelloRequest

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

HelloRequest is hello request.

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetGreeting

func (x *HelloRequest) GetGreeting() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

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

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type HelloResponse

type HelloResponse struct {
	ErrCode   int32   `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code"`
	ErrMsg    string  `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
	Response  string  `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
	Timestamp float64 `protobuf:"fixed64,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

HelloResponse is hello response.

func (*HelloResponse) Descriptor deprecated

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

Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.

func (*HelloResponse) GetErrCode

func (x *HelloResponse) GetErrCode() int32

func (*HelloResponse) GetErrMsg

func (x *HelloResponse) GetErrMsg() string

func (*HelloResponse) GetResponse

func (x *HelloResponse) GetResponse() string

func (*HelloResponse) GetTimestamp

func (x *HelloResponse) GetTimestamp() float64

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) ProtoReflect

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

func (*HelloResponse) Reset

func (x *HelloResponse) Reset()

func (*HelloResponse) String

func (x *HelloResponse) String() string

type HelloWorldClientProxy

type HelloWorldClientProxy interface {
	// Hello Hello says hello.
	Hello(ctx context.Context, req *HelloRequest, opts ...client.Option) (rsp *HelloResponse, err error) // @alias=/demo/Hello
}

HelloWorldClientProxy defines service client proxy

type HelloWorldClientProxyImpl

type HelloWorldClientProxyImpl struct {
	// contains filtered or unexported fields
}

func (*HelloWorldClientProxyImpl) Hello

type HelloWorldService

type HelloWorldService interface {
	// Hello Hello says hello.
	Hello(ctx context.Context, req *HelloRequest) (*HelloResponse, error) // @alias=/demo/Hello
}

HelloWorldService defines service.

type UnimplementedHelloWorld

type UnimplementedHelloWorld struct{}

func (*UnimplementedHelloWorld) Hello

Hello Hello says hello.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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