Documentation ¶
Overview ¶
Package hellopb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package hellopb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package hellopb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package hellopb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func InitGreeterClient(addr string, alias ...string)
- func InitTestApiClient(addr string, alias ...string)
- func InitTestApiV2Client(addr string, alias ...string)
- func InitTransportClient(addr string, alias ...string)
- func InitUserServiceClient(addr string, alias ...string)
- func RegisterGreeter(srv service.Service, impl GreeterServer)
- func RegisterGreeterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GreeterClient) error
- func RegisterGreeterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GreeterServer) error
- func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
- func RegisterTestApi(srv service.Service, impl TestApiServer)
- func RegisterTestApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTestApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TestApiClient) error
- func RegisterTestApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTestApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TestApiServer) error
- func RegisterTestApiServer(s grpc.ServiceRegistrar, srv TestApiServer)
- func RegisterTestApiV2(srv service.Service, impl TestApiV2Server)
- func RegisterTestApiV2Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTestApiV2HandlerClient(ctx context.Context, mux *runtime.ServeMux, client TestApiV2Client) error
- func RegisterTestApiV2HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTestApiV2HandlerServer(ctx context.Context, mux *runtime.ServeMux, server TestApiV2Server) error
- func RegisterTestApiV2Server(s grpc.ServiceRegistrar, srv TestApiV2Server)
- func RegisterTransport(srv service.Service, impl TransportServer)
- func RegisterTransportHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTransportHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransportClient) error
- func RegisterTransportHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTransportHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransportServer) error
- func RegisterTransportServer(s grpc.ServiceRegistrar, srv TransportServer)
- func RegisterUserService(srv service.Service, impl UserServiceServer)
- func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
- func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type EnumValue
- type GreeterClient
- type GreeterServer
- type HelloReply
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetBoolVal() *wrapperspb.BoolValue
- func (x *HelloRequest) GetBytesVal() *wrapperspb.BytesValue
- func (x *HelloRequest) GetDoubleVal() *wrapperspb.DoubleValue
- func (x *HelloRequest) GetFloatVal() *wrapperspb.FloatValue
- func (x *HelloRequest) GetInt32Val() *wrapperspb.Int32Value
- func (x *HelloRequest) GetInt64Val() *wrapperspb.Int64Value
- func (x *HelloRequest) GetName() string
- func (x *HelloRequest) GetStrVal() *wrapperspb.StringValue
- func (x *HelloRequest) GetUint32Val() *wrapperspb.UInt32Value
- func (x *HelloRequest) GetUint64Val() *wrapperspb.UInt64Value
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type ListUsersRequest
- func (*ListUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListUsersRequest) GetCreatedSince() *timestamppb.Timestamp
- func (x *ListUsersRequest) GetOlderThan() *durationpb.Duration
- func (*ListUsersRequest) ProtoMessage()
- func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
- func (x *ListUsersRequest) Reset()
- func (x *ListUsersRequest) String() string
- type Message
- type PhoneType
- type Proto3Message
- func (*Proto3Message) Descriptor() ([]byte, []int)deprecated
- func (x *Proto3Message) GetBoolValue() bool
- func (x *Proto3Message) GetBytesValue() []byte
- func (x *Proto3Message) GetDetails() []*anypb.Any
- func (x *Proto3Message) GetDoubleValue() float64
- func (x *Proto3Message) GetDurationValue() *durationpb.Duration
- func (x *Proto3Message) GetEnumValue() EnumValue
- func (x *Proto3Message) GetFieldmaskValue() *fieldmaskpb.FieldMask
- func (x *Proto3Message) GetFloatValue() float32
- func (x *Proto3Message) GetInt32Value() int32
- func (x *Proto3Message) GetInt64Value() int64
- func (x *Proto3Message) GetMapValue() map[string]string
- func (x *Proto3Message) GetMapValue10() map[string]float32
- func (x *Proto3Message) GetMapValue12() map[string]float64
- func (x *Proto3Message) GetMapValue14() map[string]bool
- func (x *Proto3Message) GetMapValue15() map[bool]string
- func (x *Proto3Message) GetMapValue16() map[string]*wrapperspb.UInt64Value
- func (x *Proto3Message) GetMapValue2() map[string]int32
- func (x *Proto3Message) GetMapValue3() map[int32]string
- func (x *Proto3Message) GetMapValue4() map[string]int64
- func (x *Proto3Message) GetMapValue5() map[int64]string
- func (x *Proto3Message) GetMapValue6() map[string]uint32
- func (x *Proto3Message) GetMapValue7() map[uint32]string
- func (x *Proto3Message) GetMapValue8() map[string]uint64
- func (x *Proto3Message) GetMapValue9() map[uint64]string
- func (x *Proto3Message) GetNested() *Proto3Message
- func (x *Proto3Message) GetOneofBoolValue() bool
- func (x *Proto3Message) GetOneofStringValue() string
- func (m *Proto3Message) GetOneofValue() isProto3Message_OneofValue
- func (x *Proto3Message) GetRepeatedEnum() []EnumValue
- func (x *Proto3Message) GetRepeatedMessage() []*wrapperspb.UInt64Value
- func (x *Proto3Message) GetRepeatedValue() []string
- func (x *Proto3Message) GetStringValue() string
- func (x *Proto3Message) GetTimestampValue() *timestamppb.Timestamp
- func (x *Proto3Message) GetUint32Value() uint32
- func (x *Proto3Message) GetUint64Value() uint64
- func (x *Proto3Message) GetWrapperBoolValue() *wrapperspb.BoolValue
- func (x *Proto3Message) GetWrapperBytesValue() *wrapperspb.BytesValue
- func (x *Proto3Message) GetWrapperDoubleValue() *wrapperspb.DoubleValue
- func (x *Proto3Message) GetWrapperFloatValue() *wrapperspb.FloatValue
- func (x *Proto3Message) GetWrapperInt32Value() *wrapperspb.Int32Value
- func (x *Proto3Message) GetWrapperInt64Value() *wrapperspb.Int64Value
- func (x *Proto3Message) GetWrapperStringValue() *wrapperspb.StringValue
- func (x *Proto3Message) GetWrapperUInt32Value() *wrapperspb.UInt32Value
- func (x *Proto3Message) GetWrapperUInt64Value() *wrapperspb.UInt64Value
- func (*Proto3Message) ProtoMessage()
- func (x *Proto3Message) ProtoReflect() protoreflect.Message
- func (x *Proto3Message) Reset()
- func (x *Proto3Message) String() string
- type Proto3Message_OneofBoolValue
- type Proto3Message_OneofStringValue
- type Role
- type TestApiClient
- type TestApiData
- func (*TestApiData) Descriptor() ([]byte, []int)deprecated
- func (x *TestApiData) GetSrvVersion() string
- func (x *TestApiData) GetVersion() string
- func (*TestApiData) ProtoMessage()
- func (x *TestApiData) ProtoReflect() protoreflect.Message
- func (x *TestApiData) Reset()
- func (x *TestApiData) String() string
- type TestApiOutput
- func (*TestApiOutput) Descriptor() ([]byte, []int)deprecated
- func (x *TestApiOutput) GetCode() int32
- func (x *TestApiOutput) GetData() *TestApiData
- func (x *TestApiOutput) GetMsg() string
- func (x *TestApiOutput) GetNowTime() int64
- func (*TestApiOutput) ProtoMessage()
- func (x *TestApiOutput) ProtoReflect() protoreflect.Message
- func (x *TestApiOutput) Reset()
- func (x *TestApiOutput) String() string
- type TestApiOutput1
- func (*TestApiOutput1) Descriptor() ([]byte, []int)deprecated
- func (x *TestApiOutput1) GetAbc() string
- func (x *TestApiOutput1) GetData() *structpb.Value
- func (*TestApiOutput1) ProtoMessage()
- func (x *TestApiOutput1) ProtoReflect() protoreflect.Message
- func (x *TestApiOutput1) Reset()
- func (x *TestApiOutput1) String() string
- type TestApiServer
- type TestApiV2Client
- type TestApiV2Server
- type TestReq
- func (*TestReq) Descriptor() ([]byte, []int)deprecated
- func (x *TestReq) GetHeaders() map[string]*structpb.ListValue
- func (x *TestReq) GetInput() string
- func (x *TestReq) GetLists() *structpb.ListValue
- func (x *TestReq) GetName() string
- func (*TestReq) ProtoMessage()
- func (x *TestReq) ProtoReflect() protoreflect.Message
- func (x *TestReq) Reset()
- func (x *TestReq) String() string
- type TransportClient
- type TransportServer
- type Transport_TestStream1Client
- type Transport_TestStream1Server
- type Transport_TestStream2Client
- type Transport_TestStream2Server
- type Transport_TestStreamClient
- type Transport_TestStreamServer
- type UnimplementedGreeterServer
- type UnimplementedTestApiServer
- func (UnimplementedTestApiServer) Version(context.Context, *TestReq) (*TestApiOutput, error)
- func (UnimplementedTestApiServer) Version1(context.Context, *structpb.Value) (*TestApiOutput1, error)
- func (UnimplementedTestApiServer) VersionTest(context.Context, *TestReq) (*TestApiOutput, error)
- func (UnimplementedTestApiServer) VersionTestCustom(context.Context, *TestReq) (*TestApiOutput, error)
- type UnimplementedTestApiV2Server
- type UnimplementedTransportServer
- func (UnimplementedTransportServer) TestStream(Transport_TestStreamServer) error
- func (UnimplementedTransportServer) TestStream1(Transport_TestStream1Server) error
- func (UnimplementedTransportServer) TestStream2(*Message, Transport_TestStream2Server) error
- func (UnimplementedTransportServer) TestStream3(context.Context, *Message) (*Message, error)
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) AddUser(context.Context, *User) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *User) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) ListUsers(*ListUsersRequest, UserService_ListUsersServer) error
- func (UnimplementedUserServiceServer) ListUsersByRole(UserService_ListUsersByRoleServer) error
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
- type UnsafeGreeterServer
- type UnsafeTestApiServer
- type UnsafeTestApiV2Server
- type UnsafeTransportServer
- type UnsafeUserServiceServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask
- func (x *UpdateUserRequest) GetUser() *User
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type User
- type UserRole
- func (*UserRole) Descriptor() ([]byte, []int)deprecated
- func (x *UserRole) GetHeaders() map[string]*structpb.ListValue
- func (x *UserRole) GetLists() *structpb.ListValue
- func (x *UserRole) GetRole() Role
- func (*UserRole) ProtoMessage()
- func (x *UserRole) ProtoReflect() protoreflect.Message
- func (x *UserRole) Reset()
- func (x *UserRole) String() string
- type UserServiceClient
- type UserServiceServer
- type UserService_ListUsersByRoleClient
- type UserService_ListUsersByRoleServer
- type UserService_ListUsersClient
- type UserService_ListUsersServer
Constants ¶
This section is empty.
Variables ¶
var ( PhoneType_name = map[int32]string{ 0: "MOBILE", 1: "HOME", 2: "WORK", } PhoneType_value = map[string]int32{ "MOBILE": 0, "HOME": 1, "WORK": 2, } )
Enum value maps for PhoneType.
var ( Role_name = map[int32]string{ 0: "GUEST", 1: "MEMBER", 2: "ADMIN", } Role_value = map[string]int32{ "GUEST": 0, "MEMBER": 1, "ADMIN": 2, } )
Enum value maps for Role.
var ( EnumValue_name = map[int32]string{ 0: "X", 1: "Y", 2: "Z", } EnumValue_value = map[string]int32{ "X": 0, "Y": 1, "Z": 2, } )
Enum value maps for EnumValue.
var File_proto_hello_api1_proto protoreflect.FileDescriptor
var File_proto_hello_api_proto protoreflect.FileDescriptor
var File_proto_hello_example_proto protoreflect.FileDescriptor
var File_proto_hello_helloworld_proto protoreflect.FileDescriptor
var File_proto_hello_proto3_proto protoreflect.FileDescriptor
var File_proto_hello_transport_proto protoreflect.FileDescriptor
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Greeter_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/hello/helloworld.proto", }
Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var TestApiV2_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.TestApiV2", HandlerType: (*TestApiV2Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version1", Handler: _TestApiV2_Version1_Handler, }, { MethodName: "VersionTest1", Handler: _TestApiV2_VersionTest1_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/hello/api.proto", }
TestApiV2_ServiceDesc is the grpc.ServiceDesc for TestApiV2 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var TestApi_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.TestApi", HandlerType: (*TestApiServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _TestApi_Version_Handler, }, { MethodName: "Version1", Handler: _TestApi_Version1_Handler, }, { MethodName: "VersionTest", Handler: _TestApi_VersionTest_Handler, }, { MethodName: "VersionTestCustom", Handler: _TestApi_VersionTestCustom_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/hello/api.proto", }
TestApi_ServiceDesc is the grpc.ServiceDesc for TestApi service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Transport_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.Transport", HandlerType: (*TransportServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TestStream3", Handler: _Transport_TestStream3_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "TestStream", Handler: _Transport_TestStream_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "TestStream1", Handler: _Transport_TestStream1_Handler, ClientStreams: true, }, { StreamName: "TestStream2", Handler: _Transport_TestStream2_Handler, ServerStreams: true, }, }, Metadata: "proto/hello/transport.proto", }
Transport_ServiceDesc is the grpc.ServiceDesc for Transport service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddUser", Handler: _UserService_AddUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListUsers", Handler: _UserService_ListUsers_Handler, ServerStreams: true, }, { StreamName: "ListUsersByRole", Handler: _UserService_ListUsersByRole_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/hello/example.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func InitGreeterClient ¶
func InitTestApiClient ¶
func InitTestApiV2Client ¶
func InitTransportClient ¶
func InitUserServiceClient ¶
func RegisterGreeter ¶
func RegisterGreeter(srv service.Service, impl GreeterServer)
func RegisterGreeterHandler ¶
func RegisterGreeterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGreeterHandler registers the http handlers for service Greeter to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGreeterHandlerClient ¶
func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GreeterClient) error
RegisterGreeterHandlerClient registers the http handlers for service Greeter to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GreeterClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GreeterClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GreeterClient" to call the correct interceptors.
func RegisterGreeterHandlerFromEndpoint ¶
func RegisterGreeterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGreeterHandlerFromEndpoint is same as RegisterGreeterHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGreeterHandlerServer ¶
func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GreeterServer) error
RegisterGreeterHandlerServer registers the http handlers for service Greeter to "mux". UnaryRPC :call GreeterServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGreeterHandlerFromEndpoint instead.
func RegisterGreeterServer ¶
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
func RegisterTestApi ¶
func RegisterTestApi(srv service.Service, impl TestApiServer)
func RegisterTestApiHandler ¶
func RegisterTestApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTestApiHandler registers the http handlers for service TestApi to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTestApiHandlerClient ¶
func RegisterTestApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TestApiClient) error
RegisterTestApiHandlerClient registers the http handlers for service TestApi to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TestApiClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TestApiClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TestApiClient" to call the correct interceptors.
func RegisterTestApiHandlerFromEndpoint ¶
func RegisterTestApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTestApiHandlerFromEndpoint is same as RegisterTestApiHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTestApiHandlerServer ¶
func RegisterTestApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TestApiServer) error
RegisterTestApiHandlerServer registers the http handlers for service TestApi to "mux". UnaryRPC :call TestApiServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTestApiHandlerFromEndpoint instead.
func RegisterTestApiServer ¶
func RegisterTestApiServer(s grpc.ServiceRegistrar, srv TestApiServer)
func RegisterTestApiV2 ¶
func RegisterTestApiV2(srv service.Service, impl TestApiV2Server)
func RegisterTestApiV2Handler ¶
func RegisterTestApiV2Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTestApiV2Handler registers the http handlers for service TestApiV2 to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTestApiV2HandlerClient ¶
func RegisterTestApiV2HandlerClient(ctx context.Context, mux *runtime.ServeMux, client TestApiV2Client) error
RegisterTestApiV2HandlerClient registers the http handlers for service TestApiV2 to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TestApiV2Client". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TestApiV2Client" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TestApiV2Client" to call the correct interceptors.
func RegisterTestApiV2HandlerFromEndpoint ¶
func RegisterTestApiV2HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTestApiV2HandlerFromEndpoint is same as RegisterTestApiV2Handler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTestApiV2HandlerServer ¶
func RegisterTestApiV2HandlerServer(ctx context.Context, mux *runtime.ServeMux, server TestApiV2Server) error
RegisterTestApiV2HandlerServer registers the http handlers for service TestApiV2 to "mux". UnaryRPC :call TestApiV2Server directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTestApiV2HandlerFromEndpoint instead.
func RegisterTestApiV2Server ¶
func RegisterTestApiV2Server(s grpc.ServiceRegistrar, srv TestApiV2Server)
func RegisterTransport ¶
func RegisterTransport(srv service.Service, impl TransportServer)
func RegisterTransportHandler ¶
func RegisterTransportHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTransportHandler registers the http handlers for service Transport to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTransportHandlerClient ¶
func RegisterTransportHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransportClient) error
RegisterTransportHandlerClient registers the http handlers for service Transport to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransportClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransportClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TransportClient" to call the correct interceptors.
func RegisterTransportHandlerFromEndpoint ¶
func RegisterTransportHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTransportHandlerFromEndpoint is same as RegisterTransportHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTransportHandlerServer ¶
func RegisterTransportHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransportServer) error
RegisterTransportHandlerServer registers the http handlers for service Transport to "mux". UnaryRPC :call TransportServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTransportHandlerFromEndpoint instead.
func RegisterTransportServer ¶
func RegisterTransportServer(s grpc.ServiceRegistrar, srv TransportServer)
func RegisterUserService ¶
func RegisterUserService(srv service.Service, impl UserServiceServer)
func RegisterUserServiceHandler ¶
func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserServiceHandler registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserServiceHandlerClient ¶
func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
RegisterUserServiceHandlerClient registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserServiceClient" to call the correct interceptors.
func RegisterUserServiceHandlerFromEndpoint ¶
func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserServiceHandlerServer ¶
func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". UnaryRPC :call UserServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead.
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type EnumValue ¶
type EnumValue int32
func (EnumValue) Descriptor ¶
func (EnumValue) Descriptor() protoreflect.EnumDescriptor
func (EnumValue) EnumDescriptor
deprecated
func (EnumValue) Number ¶
func (x EnumValue) Number() protoreflect.EnumNumber
func (EnumValue) Type ¶
func (EnumValue) Type() protoreflect.EnumType
type GreeterClient ¶
type GreeterClient interface {
SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
}
GreeterClient is the client API for Greeter 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 NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterServer ¶
type GreeterServer interface {
SayHello(context.Context, *HelloRequest) (*HelloReply, error)
}
GreeterServer is the server API for Greeter service. All implementations should embed UnimplementedGreeterServer for forward compatibility
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` StrVal *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=strVal,proto3" json:"strVal,omitempty"` FloatVal *wrapperspb.FloatValue `protobuf:"bytes,3,opt,name=floatVal,proto3" json:"floatVal,omitempty"` DoubleVal *wrapperspb.DoubleValue `protobuf:"bytes,4,opt,name=doubleVal,proto3" json:"doubleVal,omitempty"` BoolVal *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=boolVal,proto3" json:"boolVal,omitempty"` BytesVal *wrapperspb.BytesValue `protobuf:"bytes,6,opt,name=bytesVal,proto3" json:"bytesVal,omitempty"` Int32Val *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=int32Val,proto3" json:"int32Val,omitempty"` Uint32Val *wrapperspb.UInt32Value `protobuf:"bytes,8,opt,name=uint32Val,proto3" json:"uint32Val,omitempty"` Int64Val *wrapperspb.Int64Value `protobuf:"bytes,9,opt,name=int64Val,proto3" json:"int64Val,omitempty"` Uint64Val *wrapperspb.UInt64Value `protobuf:"bytes,10,opt,name=uint64Val,proto3" json:"uint64Val,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetBoolVal ¶
func (x *HelloRequest) GetBoolVal() *wrapperspb.BoolValue
func (*HelloRequest) GetBytesVal ¶
func (x *HelloRequest) GetBytesVal() *wrapperspb.BytesValue
func (*HelloRequest) GetDoubleVal ¶
func (x *HelloRequest) GetDoubleVal() *wrapperspb.DoubleValue
func (*HelloRequest) GetFloatVal ¶
func (x *HelloRequest) GetFloatVal() *wrapperspb.FloatValue
func (*HelloRequest) GetInt32Val ¶
func (x *HelloRequest) GetInt32Val() *wrapperspb.Int32Value
func (*HelloRequest) GetInt64Val ¶
func (x *HelloRequest) GetInt64Val() *wrapperspb.Int64Value
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) GetStrVal ¶
func (x *HelloRequest) GetStrVal() *wrapperspb.StringValue
func (*HelloRequest) GetUint32Val ¶
func (x *HelloRequest) GetUint32Val() *wrapperspb.UInt32Value
func (*HelloRequest) GetUint64Val ¶
func (x *HelloRequest) GetUint64Val() *wrapperspb.UInt64Value
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 ListUsersRequest ¶
type ListUsersRequest struct { // Only list users created after this timestamp CreatedSince *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_since,json=createdSince,proto3" json:"created_since,omitempty"` // Only list users older than this Duration OlderThan *durationpb.Duration `protobuf:"bytes,2,opt,name=older_than,json=olderThan,proto3" json:"older_than,omitempty"` // contains filtered or unexported fields }
func (*ListUsersRequest) Descriptor
deprecated
func (*ListUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.
func (*ListUsersRequest) GetCreatedSince ¶
func (x *ListUsersRequest) GetCreatedSince() *timestamppb.Timestamp
func (*ListUsersRequest) GetOlderThan ¶
func (x *ListUsersRequest) GetOlderThan() *durationpb.Duration
func (*ListUsersRequest) ProtoMessage ¶
func (*ListUsersRequest) ProtoMessage()
func (*ListUsersRequest) ProtoReflect ¶
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message
func (*ListUsersRequest) Reset ¶
func (x *ListUsersRequest) Reset()
func (*ListUsersRequest) String ¶
func (x *ListUsersRequest) String() string
type Message ¶
type Message struct { Header map[string]string `` /* 153-byte string literal not displayed */ Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type PhoneType ¶
type PhoneType int32
枚举消息类型
func (PhoneType) Descriptor ¶
func (PhoneType) Descriptor() protoreflect.EnumDescriptor
func (PhoneType) EnumDescriptor
deprecated
func (PhoneType) Number ¶
func (x PhoneType) Number() protoreflect.EnumNumber
func (PhoneType) Type ¶
func (PhoneType) Type() protoreflect.EnumType
type Proto3Message ¶
type Proto3Message struct { // Next number: 46 Nested *Proto3Message `protobuf:"bytes,41,opt,name=nested,proto3" json:"nested,omitempty"` FloatValue float32 `protobuf:"fixed32,42,opt,name=float_value,json=floatValue,proto3" json:"float_value,omitempty"` DoubleValue float64 `protobuf:"fixed64,43,opt,name=double_value,json=doubleValue,proto3" json:"double_value,omitempty"` Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3" json:"int64_value,omitempty"` Int32Value int32 `protobuf:"varint,4,opt,name=int32_value,json=int32Value,proto3" json:"int32_value,omitempty"` Uint64Value uint64 `protobuf:"varint,5,opt,name=uint64_value,json=uint64Value,proto3" json:"uint64_value,omitempty"` Uint32Value uint32 `protobuf:"varint,6,opt,name=uint32_value,json=uint32Value,proto3" json:"uint32_value,omitempty"` BoolValue bool `protobuf:"varint,7,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"` StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3" json:"string_value,omitempty"` BytesValue []byte `protobuf:"bytes,9,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"` RepeatedValue []string `protobuf:"bytes,10,rep,name=repeated_value,json=repeatedValue,proto3" json:"repeated_value,omitempty"` RepeatedMessage []*wrapperspb.UInt64Value `protobuf:"bytes,44,rep,name=repeated_message,json=repeatedMessage,proto3" json:"repeated_message,omitempty"` EnumValue EnumValue `protobuf:"varint,11,opt,name=enum_value,json=enumValue,proto3,enum=hello.EnumValue" json:"enum_value,omitempty"` RepeatedEnum []EnumValue `` /* 127-byte string literal not displayed */ TimestampValue *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=timestamp_value,json=timestampValue,proto3" json:"timestamp_value,omitempty"` DurationValue *durationpb.Duration `protobuf:"bytes,14,opt,name=duration_value,json=durationValue,proto3" json:"duration_value,omitempty"` FieldmaskValue *fieldmaskpb.FieldMask `protobuf:"bytes,15,opt,name=fieldmask_value,json=fieldmaskValue,proto3" json:"fieldmask_value,omitempty"` // Types that are assignable to OneofValue: // *Proto3Message_OneofBoolValue // *Proto3Message_OneofStringValue OneofValue isProto3Message_OneofValue `protobuf_oneof:"oneof_value"` WrapperDoubleValue *wrapperspb.DoubleValue `protobuf:"bytes,17,opt,name=wrapper_double_value,json=wrapperDoubleValue,proto3" json:"wrapper_double_value,omitempty"` WrapperFloatValue *wrapperspb.FloatValue `protobuf:"bytes,18,opt,name=wrapper_float_value,json=wrapperFloatValue,proto3" json:"wrapper_float_value,omitempty"` WrapperInt64Value *wrapperspb.Int64Value `protobuf:"bytes,19,opt,name=wrapper_int64_value,json=wrapperInt64Value,proto3" json:"wrapper_int64_value,omitempty"` WrapperInt32Value *wrapperspb.Int32Value `protobuf:"bytes,20,opt,name=wrapper_int32_value,json=wrapperInt32Value,proto3" json:"wrapper_int32_value,omitempty"` WrapperUInt64Value *wrapperspb.UInt64Value `protobuf:"bytes,21,opt,name=wrapper_u_int64_value,json=wrapperUInt64Value,proto3" json:"wrapper_u_int64_value,omitempty"` WrapperUInt32Value *wrapperspb.UInt32Value `protobuf:"bytes,22,opt,name=wrapper_u_int32_value,json=wrapperUInt32Value,proto3" json:"wrapper_u_int32_value,omitempty"` WrapperBoolValue *wrapperspb.BoolValue `protobuf:"bytes,23,opt,name=wrapper_bool_value,json=wrapperBoolValue,proto3" json:"wrapper_bool_value,omitempty"` WrapperStringValue *wrapperspb.StringValue `protobuf:"bytes,24,opt,name=wrapper_string_value,json=wrapperStringValue,proto3" json:"wrapper_string_value,omitempty"` WrapperBytesValue *wrapperspb.BytesValue `protobuf:"bytes,25,opt,name=wrapper_bytes_value,json=wrapperBytesValue,proto3" json:"wrapper_bytes_value,omitempty"` MapValue map[string]string `` /* 174-byte string literal not displayed */ MapValue2 map[string]int32 `` /* 178-byte string literal not displayed */ MapValue3 map[int32]string `` /* 178-byte string literal not displayed */ MapValue4 map[string]int64 `` /* 178-byte string literal not displayed */ MapValue5 map[int64]string `` /* 178-byte string literal not displayed */ MapValue6 map[string]uint32 `` /* 178-byte string literal not displayed */ MapValue7 map[uint32]string `` /* 178-byte string literal not displayed */ MapValue8 map[string]uint64 `` /* 178-byte string literal not displayed */ MapValue9 map[uint64]string `` /* 178-byte string literal not displayed */ MapValue10 map[string]float32 `` /* 182-byte string literal not displayed */ MapValue12 map[string]float64 `` /* 182-byte string literal not displayed */ MapValue14 map[string]bool `` /* 181-byte string literal not displayed */ MapValue15 map[bool]string `` /* 181-byte string literal not displayed */ MapValue16 map[string]*wrapperspb.UInt64Value `` /* 180-byte string literal not displayed */ Details []*anypb.Any `protobuf:"bytes,46,rep,name=details,proto3" json:"details,omitempty"` // contains filtered or unexported fields }
func (*Proto3Message) Descriptor
deprecated
func (*Proto3Message) Descriptor() ([]byte, []int)
Deprecated: Use Proto3Message.ProtoReflect.Descriptor instead.
func (*Proto3Message) GetBoolValue ¶
func (x *Proto3Message) GetBoolValue() bool
func (*Proto3Message) GetBytesValue ¶
func (x *Proto3Message) GetBytesValue() []byte
func (*Proto3Message) GetDetails ¶
func (x *Proto3Message) GetDetails() []*anypb.Any
func (*Proto3Message) GetDoubleValue ¶
func (x *Proto3Message) GetDoubleValue() float64
func (*Proto3Message) GetDurationValue ¶
func (x *Proto3Message) GetDurationValue() *durationpb.Duration
func (*Proto3Message) GetEnumValue ¶
func (x *Proto3Message) GetEnumValue() EnumValue
func (*Proto3Message) GetFieldmaskValue ¶
func (x *Proto3Message) GetFieldmaskValue() *fieldmaskpb.FieldMask
func (*Proto3Message) GetFloatValue ¶
func (x *Proto3Message) GetFloatValue() float32
func (*Proto3Message) GetInt32Value ¶
func (x *Proto3Message) GetInt32Value() int32
func (*Proto3Message) GetInt64Value ¶
func (x *Proto3Message) GetInt64Value() int64
func (*Proto3Message) GetMapValue ¶
func (x *Proto3Message) GetMapValue() map[string]string
func (*Proto3Message) GetMapValue10 ¶
func (x *Proto3Message) GetMapValue10() map[string]float32
func (*Proto3Message) GetMapValue12 ¶
func (x *Proto3Message) GetMapValue12() map[string]float64
func (*Proto3Message) GetMapValue14 ¶
func (x *Proto3Message) GetMapValue14() map[string]bool
func (*Proto3Message) GetMapValue15 ¶
func (x *Proto3Message) GetMapValue15() map[bool]string
func (*Proto3Message) GetMapValue16 ¶
func (x *Proto3Message) GetMapValue16() map[string]*wrapperspb.UInt64Value
func (*Proto3Message) GetMapValue2 ¶
func (x *Proto3Message) GetMapValue2() map[string]int32
func (*Proto3Message) GetMapValue3 ¶
func (x *Proto3Message) GetMapValue3() map[int32]string
func (*Proto3Message) GetMapValue4 ¶
func (x *Proto3Message) GetMapValue4() map[string]int64
func (*Proto3Message) GetMapValue5 ¶
func (x *Proto3Message) GetMapValue5() map[int64]string
func (*Proto3Message) GetMapValue6 ¶
func (x *Proto3Message) GetMapValue6() map[string]uint32
func (*Proto3Message) GetMapValue7 ¶
func (x *Proto3Message) GetMapValue7() map[uint32]string
func (*Proto3Message) GetMapValue8 ¶
func (x *Proto3Message) GetMapValue8() map[string]uint64
func (*Proto3Message) GetMapValue9 ¶
func (x *Proto3Message) GetMapValue9() map[uint64]string
func (*Proto3Message) GetNested ¶
func (x *Proto3Message) GetNested() *Proto3Message
func (*Proto3Message) GetOneofBoolValue ¶
func (x *Proto3Message) GetOneofBoolValue() bool
func (*Proto3Message) GetOneofStringValue ¶
func (x *Proto3Message) GetOneofStringValue() string
func (*Proto3Message) GetOneofValue ¶
func (m *Proto3Message) GetOneofValue() isProto3Message_OneofValue
func (*Proto3Message) GetRepeatedEnum ¶
func (x *Proto3Message) GetRepeatedEnum() []EnumValue
func (*Proto3Message) GetRepeatedMessage ¶
func (x *Proto3Message) GetRepeatedMessage() []*wrapperspb.UInt64Value
func (*Proto3Message) GetRepeatedValue ¶
func (x *Proto3Message) GetRepeatedValue() []string
func (*Proto3Message) GetStringValue ¶
func (x *Proto3Message) GetStringValue() string
func (*Proto3Message) GetTimestampValue ¶
func (x *Proto3Message) GetTimestampValue() *timestamppb.Timestamp
func (*Proto3Message) GetUint32Value ¶
func (x *Proto3Message) GetUint32Value() uint32
func (*Proto3Message) GetUint64Value ¶
func (x *Proto3Message) GetUint64Value() uint64
func (*Proto3Message) GetWrapperBoolValue ¶
func (x *Proto3Message) GetWrapperBoolValue() *wrapperspb.BoolValue
func (*Proto3Message) GetWrapperBytesValue ¶
func (x *Proto3Message) GetWrapperBytesValue() *wrapperspb.BytesValue
func (*Proto3Message) GetWrapperDoubleValue ¶
func (x *Proto3Message) GetWrapperDoubleValue() *wrapperspb.DoubleValue
func (*Proto3Message) GetWrapperFloatValue ¶
func (x *Proto3Message) GetWrapperFloatValue() *wrapperspb.FloatValue
func (*Proto3Message) GetWrapperInt32Value ¶
func (x *Proto3Message) GetWrapperInt32Value() *wrapperspb.Int32Value
func (*Proto3Message) GetWrapperInt64Value ¶
func (x *Proto3Message) GetWrapperInt64Value() *wrapperspb.Int64Value
func (*Proto3Message) GetWrapperStringValue ¶
func (x *Proto3Message) GetWrapperStringValue() *wrapperspb.StringValue
func (*Proto3Message) GetWrapperUInt32Value ¶
func (x *Proto3Message) GetWrapperUInt32Value() *wrapperspb.UInt32Value
func (*Proto3Message) GetWrapperUInt64Value ¶
func (x *Proto3Message) GetWrapperUInt64Value() *wrapperspb.UInt64Value
func (*Proto3Message) ProtoMessage ¶
func (*Proto3Message) ProtoMessage()
func (*Proto3Message) ProtoReflect ¶
func (x *Proto3Message) ProtoReflect() protoreflect.Message
func (*Proto3Message) Reset ¶
func (x *Proto3Message) Reset()
func (*Proto3Message) String ¶
func (x *Proto3Message) String() string
type Proto3Message_OneofBoolValue ¶
type Proto3Message_OneofBoolValue struct {
OneofBoolValue bool `protobuf:"varint,1,opt,name=oneof_bool_value,json=oneofBoolValue,proto3,oneof"`
}
type Proto3Message_OneofStringValue ¶
type Proto3Message_OneofStringValue struct {
OneofStringValue string `protobuf:"bytes,2,opt,name=oneof_string_value,json=oneofStringValue,proto3,oneof"`
}
type Role ¶
type Role int32
func (Role) Descriptor ¶
func (Role) Descriptor() protoreflect.EnumDescriptor
func (Role) EnumDescriptor
deprecated
func (Role) Number ¶
func (x Role) Number() protoreflect.EnumNumber
func (Role) Type ¶
func (Role) Type() protoreflect.EnumType
type TestApiClient ¶
type TestApiClient interface { // Version rpc Version(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) Version1(ctx context.Context, in *structpb.Value, opts ...grpc.CallOption) (*TestApiOutput1, error) // VersionTest rpc VersionTest(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) // VersionTest rpc custom VersionTestCustom(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) }
TestApiClient is the client API for TestApi 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 NewTestApiClient ¶
func NewTestApiClient(cc grpc.ClientConnInterface) TestApiClient
type TestApiData ¶
type TestApiData struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` SrvVersion string `protobuf:"bytes,2,opt,name=srvVersion,json=srv_ver,proto3" json:"srvVersion,omitempty"` // contains filtered or unexported fields }
func (*TestApiData) Descriptor
deprecated
func (*TestApiData) Descriptor() ([]byte, []int)
Deprecated: Use TestApiData.ProtoReflect.Descriptor instead.
func (*TestApiData) GetSrvVersion ¶
func (x *TestApiData) GetSrvVersion() string
func (*TestApiData) GetVersion ¶
func (x *TestApiData) GetVersion() string
func (*TestApiData) ProtoMessage ¶
func (*TestApiData) ProtoMessage()
func (*TestApiData) ProtoReflect ¶
func (x *TestApiData) ProtoReflect() protoreflect.Message
func (*TestApiData) Reset ¶
func (x *TestApiData) Reset()
func (*TestApiData) String ¶
func (x *TestApiData) String() string
type TestApiOutput ¶
type TestApiOutput 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"` NowTime int64 `protobuf:"varint,3,opt,name=nowTime,proto3" json:"nowTime,omitempty"` Data *TestApiData `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*TestApiOutput) Descriptor
deprecated
func (*TestApiOutput) Descriptor() ([]byte, []int)
Deprecated: Use TestApiOutput.ProtoReflect.Descriptor instead.
func (*TestApiOutput) GetCode ¶
func (x *TestApiOutput) GetCode() int32
func (*TestApiOutput) GetData ¶
func (x *TestApiOutput) GetData() *TestApiData
func (*TestApiOutput) GetMsg ¶
func (x *TestApiOutput) GetMsg() string
func (*TestApiOutput) GetNowTime ¶
func (x *TestApiOutput) GetNowTime() int64
func (*TestApiOutput) ProtoMessage ¶
func (*TestApiOutput) ProtoMessage()
func (*TestApiOutput) ProtoReflect ¶
func (x *TestApiOutput) ProtoReflect() protoreflect.Message
func (*TestApiOutput) Reset ¶
func (x *TestApiOutput) Reset()
func (*TestApiOutput) String ¶
func (x *TestApiOutput) String() string
type TestApiOutput1 ¶
type TestApiOutput1 struct { Data *structpb.Value `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Abc string `protobuf:"bytes,2,opt,name=abc,proto3" json:"abc,omitempty"` // contains filtered or unexported fields }
func (*TestApiOutput1) Descriptor
deprecated
func (*TestApiOutput1) Descriptor() ([]byte, []int)
Deprecated: Use TestApiOutput1.ProtoReflect.Descriptor instead.
func (*TestApiOutput1) GetAbc ¶
func (x *TestApiOutput1) GetAbc() string
func (*TestApiOutput1) GetData ¶
func (x *TestApiOutput1) GetData() *structpb.Value
func (*TestApiOutput1) ProtoMessage ¶
func (*TestApiOutput1) ProtoMessage()
func (*TestApiOutput1) ProtoReflect ¶
func (x *TestApiOutput1) ProtoReflect() protoreflect.Message
func (*TestApiOutput1) Reset ¶
func (x *TestApiOutput1) Reset()
func (*TestApiOutput1) String ¶
func (x *TestApiOutput1) String() string
type TestApiServer ¶
type TestApiServer interface { // Version rpc Version(context.Context, *TestReq) (*TestApiOutput, error) Version1(context.Context, *structpb.Value) (*TestApiOutput1, error) // VersionTest rpc VersionTest(context.Context, *TestReq) (*TestApiOutput, error) // VersionTest rpc custom VersionTestCustom(context.Context, *TestReq) (*TestApiOutput, error) }
TestApiServer is the server API for TestApi service. All implementations should embed UnimplementedTestApiServer for forward compatibility
type TestApiV2Client ¶
type TestApiV2Client interface { Version1(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) VersionTest1(ctx context.Context, in *TestReq, opts ...grpc.CallOption) (*TestApiOutput, error) }
TestApiV2Client is the client API for TestApiV2 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 NewTestApiV2Client ¶
func NewTestApiV2Client(cc grpc.ClientConnInterface) TestApiV2Client
type TestApiV2Server ¶
type TestApiV2Server interface { Version1(context.Context, *TestReq) (*TestApiOutput, error) VersionTest1(context.Context, *TestReq) (*TestApiOutput, error) }
TestApiV2Server is the server API for TestApiV2 service. All implementations should embed UnimplementedTestApiV2Server for forward compatibility
type TestReq ¶
type TestReq struct { Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Lists *structpb.ListValue `protobuf:"bytes,3,opt,name=lists,proto3" json:"lists,omitempty"` Headers map[string]*structpb.ListValue `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*TestReq) Descriptor
deprecated
func (*TestReq) ProtoMessage ¶
func (*TestReq) ProtoMessage()
func (*TestReq) ProtoReflect ¶
func (x *TestReq) ProtoReflect() protoreflect.Message
type TransportClient ¶
type TransportClient interface { TestStream(ctx context.Context, opts ...grpc.CallOption) (Transport_TestStreamClient, error) TestStream1(ctx context.Context, opts ...grpc.CallOption) (Transport_TestStream1Client, error) TestStream2(ctx context.Context, in *Message, opts ...grpc.CallOption) (Transport_TestStream2Client, error) TestStream3(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) }
TransportClient is the client API for Transport 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 NewTransportClient ¶
func NewTransportClient(cc grpc.ClientConnInterface) TransportClient
type TransportServer ¶
type TransportServer interface { TestStream(Transport_TestStreamServer) error TestStream1(Transport_TestStream1Server) error TestStream2(*Message, Transport_TestStream2Server) error TestStream3(context.Context, *Message) (*Message, error) }
TransportServer is the server API for Transport service. All implementations should embed UnimplementedTransportServer for forward compatibility
type Transport_TestStream2Client ¶
type Transport_TestStream2Client interface { Recv() (*Message, error) grpc.ClientStream }
type Transport_TestStream2Server ¶
type Transport_TestStream2Server interface { Send(*Message) error grpc.ServerStream }
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer should be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) SayHello ¶
func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
type UnimplementedTestApiServer ¶
type UnimplementedTestApiServer struct { }
UnimplementedTestApiServer should be embedded to have forward compatible implementations.
func (UnimplementedTestApiServer) Version ¶
func (UnimplementedTestApiServer) Version(context.Context, *TestReq) (*TestApiOutput, error)
func (UnimplementedTestApiServer) Version1 ¶
func (UnimplementedTestApiServer) Version1(context.Context, *structpb.Value) (*TestApiOutput1, error)
func (UnimplementedTestApiServer) VersionTest ¶
func (UnimplementedTestApiServer) VersionTest(context.Context, *TestReq) (*TestApiOutput, error)
func (UnimplementedTestApiServer) VersionTestCustom ¶
func (UnimplementedTestApiServer) VersionTestCustom(context.Context, *TestReq) (*TestApiOutput, error)
type UnimplementedTestApiV2Server ¶
type UnimplementedTestApiV2Server struct { }
UnimplementedTestApiV2Server should be embedded to have forward compatible implementations.
func (UnimplementedTestApiV2Server) Version1 ¶
func (UnimplementedTestApiV2Server) Version1(context.Context, *TestReq) (*TestApiOutput, error)
func (UnimplementedTestApiV2Server) VersionTest1 ¶
func (UnimplementedTestApiV2Server) VersionTest1(context.Context, *TestReq) (*TestApiOutput, error)
type UnimplementedTransportServer ¶
type UnimplementedTransportServer struct { }
UnimplementedTransportServer should be embedded to have forward compatible implementations.
func (UnimplementedTransportServer) TestStream ¶
func (UnimplementedTransportServer) TestStream(Transport_TestStreamServer) error
func (UnimplementedTransportServer) TestStream1 ¶
func (UnimplementedTransportServer) TestStream1(Transport_TestStream1Server) error
func (UnimplementedTransportServer) TestStream2 ¶
func (UnimplementedTransportServer) TestStream2(*Message, Transport_TestStream2Server) error
func (UnimplementedTransportServer) TestStream3 ¶
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) ListUsers ¶
func (UnimplementedUserServiceServer) ListUsers(*ListUsersRequest, UserService_ListUsersServer) error
func (UnimplementedUserServiceServer) ListUsersByRole ¶
func (UnimplementedUserServiceServer) ListUsersByRole(UserService_ListUsersByRoleServer) error
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
type UnsafeGreeterServer ¶
type UnsafeGreeterServer interface {
// contains filtered or unexported methods
}
UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServer will result in compilation errors.
type UnsafeTestApiServer ¶
type UnsafeTestApiServer interface {
// contains filtered or unexported methods
}
UnsafeTestApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestApiServer will result in compilation errors.
type UnsafeTestApiV2Server ¶
type UnsafeTestApiV2Server interface {
// contains filtered or unexported methods
}
UnsafeTestApiV2Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestApiV2Server will result in compilation errors.
type UnsafeTransportServer ¶
type UnsafeTransportServer interface {
// contains filtered or unexported methods
}
UnsafeTransportServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TransportServer will result in compilation errors.
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct { // The user resource which replaces the resource on the server. User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // The update mask applies to the resource. For the `FieldMask` definition, // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetUpdateMask ¶
func (x *UpdateUserRequest) GetUpdateMask() *fieldmaskpb.FieldMask
func (*UpdateUserRequest) GetUser ¶
func (x *UpdateUserRequest) GetUser() *User
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
type User ¶
type User struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Role Role `protobuf:"varint,2,opt,name=role,proto3,enum=hello.Role" json:"role,omitempty"` CreateDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_date,json=createDate,proto3" json:"create_date,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreateDate ¶
func (x *User) GetCreateDate() *timestamppb.Timestamp
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserRole ¶
type UserRole struct { Role Role `protobuf:"varint,1,opt,name=role,proto3,enum=hello.Role" json:"role,omitempty"` Lists *structpb.ListValue `protobuf:"bytes,2,opt,name=lists,proto3" json:"lists,omitempty"` Headers map[string]*structpb.ListValue `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*UserRole) Descriptor
deprecated
func (*UserRole) ProtoMessage ¶
func (*UserRole) ProtoMessage()
func (*UserRole) ProtoReflect ¶
func (x *UserRole) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { AddUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) GetUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*emptypb.Empty, error) ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (UserService_ListUsersClient, error) ListUsersByRole(ctx context.Context, opts ...grpc.CallOption) (UserService_ListUsersByRoleClient, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) }
UserServiceClient is the client API for UserService 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 NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { AddUser(context.Context, *User) (*emptypb.Empty, error) GetUser(context.Context, *User) (*emptypb.Empty, error) ListUsers(*ListUsersRequest, UserService_ListUsersServer) error ListUsersByRole(UserService_ListUsersByRoleServer) error UpdateUser(context.Context, *UpdateUserRequest) (*User, error) }
UserServiceServer is the server API for UserService service. All implementations should embed UnimplementedUserServiceServer for forward compatibility
type UserService_ListUsersClient ¶
type UserService_ListUsersClient interface { Recv() (*User, error) grpc.ClientStream }
type UserService_ListUsersServer ¶
type UserService_ListUsersServer interface { Send(*User) error grpc.ServerStream }
Source Files ¶
- api.lava.pb.go
- api.pb.go
- api.pb.gw.go
- api1.pb.go
- api_grpc.pb.go
- example.lava.pb.go
- example.pb.go
- example.pb.gw.go
- example_grpc.pb.go
- helloworld.lava.pb.go
- helloworld.pb.go
- helloworld.pb.gw.go
- helloworld_grpc.pb.go
- proto3.pb.go
- transport.lava.pb.go
- transport.pb.go
- transport.pb.gw.go
- transport_grpc.pb.go