v1

package
v0.0.0-...-cc47b7c Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MyService_Call_FullMethodName = "/helloworld.v1.MyService/Call"
)
View Source
const OperationMyServiceCall = "/helloworld.v1.MyService/Call"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "GREETER_UNSPECIFIED",
		1: "USER_NOT_FOUND",
	}
	ErrorReason_value = map[string]int32{
		"GREETER_UNSPECIFIED": 0,
		"USER_NOT_FOUND":      1,
	}
)

Enum value maps for ErrorReason.

View Source
var File_helloworld_v1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_helloworld_v1_greeter_proto protoreflect.FileDescriptor
View Source
var MyService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helloworld.v1.MyService",
	HandlerType: (*MyServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Call",
			Handler:    _MyService_Call_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "helloworld/v1/greeter.proto",
}

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

Functions

func RegisterMyServiceHTTPServer

func RegisterMyServiceHTTPServer(s *http.Server, srv MyServiceHTTPServer)

func RegisterMyServiceServer

func RegisterMyServiceServer(s grpc.ServiceRegistrar, srv MyServiceServer)

Types

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_GREETER_UNSPECIFIED ErrorReason = 0
	ErrorReason_USER_NOT_FOUND      ErrorReason = 1
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type MsgInline

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

func (*MsgInline) Descriptor deprecated

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

Deprecated: Use MsgInline.ProtoReflect.Descriptor instead.

func (*MsgInline) ProtoMessage

func (*MsgInline) ProtoMessage()

func (*MsgInline) ProtoReflect

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

func (*MsgInline) Reset

func (x *MsgInline) Reset()

func (*MsgInline) String

func (x *MsgInline) String() string

type MyServiceClient

type MyServiceClient interface {
	Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

MyServiceClient is the client API for MyService 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 NewMyServiceClient

func NewMyServiceClient(cc grpc.ClientConnInterface) MyServiceClient

type MyServiceHTTPClient

type MyServiceHTTPClient interface {
	Call(ctx context.Context, req *Request, opts ...http.CallOption) (rsp *Response, err error)
}

func NewMyServiceHTTPClient

func NewMyServiceHTTPClient(client *http.Client) MyServiceHTTPClient

type MyServiceHTTPClientImpl

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

func (*MyServiceHTTPClientImpl) Call

type MyServiceHTTPServer

type MyServiceHTTPServer interface {
	Call(context.Context, *Request) (*Response, error)
}

type MyServiceServer

type MyServiceServer interface {
	Call(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

MyServiceServer is the server API for MyService service. All implementations must embed UnimplementedMyServiceServer for forward compatibility

type Request

type Request struct {
	Id  string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Msg []*MsgInline `protobuf:"bytes,2,rep,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetId

func (x *Request) GetId() string

func (*Request) GetMsg

func (x *Request) GetMsg() []*MsgInline

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 {
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

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 UnimplementedMyServiceServer

type UnimplementedMyServiceServer struct {
}

UnimplementedMyServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMyServiceServer) Call

type UnsafeMyServiceServer

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

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

Jump to

Keyboard shortcuts

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