Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterNoEmptyServiceServer(s grpc.ServiceRegistrar, srv NoEmptyServiceServer)
- func RegisterPetStoreServer(s grpc.ServiceRegistrar, srv PetStoreServer)
- func RegisterSomeServiceServer(s grpc.ServiceRegistrar, srv SomeServiceServer)
- type NoEmpty
- type NoEmptyServiceClient
- type NoEmptyServiceServer
- type Pet
- type PetStoreClient
- type PetStoreServer
- type Pets
- type SomeServiceClient
- type SomeServiceServer
- type Status
- type UnimplementedNoEmptyServiceServer
- type UnimplementedPetStoreServer
- func (UnimplementedPetStoreServer) CreatePet(context.Context, *Pet) (*Pet, error)
- func (UnimplementedPetStoreServer) DeletePet(context.Context, *Pet) (*emptypb.Empty, error)
- func (UnimplementedPetStoreServer) GetAll(context.Context, *emptypb.Empty) (*Pets, error)
- func (UnimplementedPetStoreServer) GetPet(context.Context, *Pet) (*Pet, error)
- func (UnimplementedPetStoreServer) UpdatePet(context.Context, *Pet) (*Pet, error)
- type UnimplementedSomeServiceServer
- type UnsafeNoEmptyServiceServer
- type UnsafePetStoreServer
- type UnsafeSomeServiceServer
Constants ¶
const ( PetStore_GetAll_FullMethodName = "/petstore.PetStore/GetAll" PetStore_GetPet_FullMethodName = "/petstore.PetStore/GetPet" PetStore_CreatePet_FullMethodName = "/petstore.PetStore/CreatePet" PetStore_UpdatePet_FullMethodName = "/petstore.PetStore/UpdatePet" PetStore_DeletePet_FullMethodName = "/petstore.PetStore/DeletePet" )
const (
NoEmptyService_Get_FullMethodName = "/petstore.NoEmptyService/Get"
)
const (
SomeService_SomeMethod_FullMethodName = "/Some.Lib.SomeService/SomeMethod"
)
Variables ¶
var ( Status_name = map[int32]string{ 0: "UNKNOWN", 1: "AVAILABLE", 2: "PENDING", 3: "SOLD", } Status_value = map[string]int32{ "UNKNOWN": 0, "AVAILABLE": 1, "PENDING": 2, "SOLD": 3, } )
Enum value maps for Status.
var File_no_empty_proto protoreflect.FileDescriptor
var File_no_service_proto protoreflect.FileDescriptor
var File_petstore_proto protoreflect.FileDescriptor
var File_use_some_lib_proto protoreflect.FileDescriptor
var NoEmptyService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "petstore.NoEmptyService", HandlerType: (*NoEmptyServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _NoEmptyService_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "no-empty.proto", }
NoEmptyService_ServiceDesc is the grpc.ServiceDesc for NoEmptyService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PetStore_ServiceDesc = grpc.ServiceDesc{ ServiceName: "petstore.PetStore", HandlerType: (*PetStoreServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAll", Handler: _PetStore_GetAll_Handler, }, { MethodName: "GetPet", Handler: _PetStore_GetPet_Handler, }, { MethodName: "CreatePet", Handler: _PetStore_CreatePet_Handler, }, { MethodName: "UpdatePet", Handler: _PetStore_UpdatePet_Handler, }, { MethodName: "DeletePet", Handler: _PetStore_DeletePet_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "petstore.proto", }
PetStore_ServiceDesc is the grpc.ServiceDesc for PetStore service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var SomeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Some.Lib.SomeService", HandlerType: (*SomeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SomeMethod", Handler: _SomeService_SomeMethod_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "use_some_lib.proto", }
SomeService_ServiceDesc is the grpc.ServiceDesc for SomeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNoEmptyServiceServer ¶ added in v1.0.2
func RegisterNoEmptyServiceServer(s grpc.ServiceRegistrar, srv NoEmptyServiceServer)
func RegisterPetStoreServer ¶
func RegisterPetStoreServer(s grpc.ServiceRegistrar, srv PetStoreServer)
func RegisterSomeServiceServer ¶ added in v1.0.2
func RegisterSomeServiceServer(s grpc.ServiceRegistrar, srv SomeServiceServer)
Types ¶
type NoEmpty ¶ added in v1.0.2
type NoEmpty struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*NoEmpty) Descriptor
deprecated
added in
v1.0.2
func (*NoEmpty) ProtoMessage ¶ added in v1.0.2
func (*NoEmpty) ProtoMessage()
func (*NoEmpty) ProtoReflect ¶ added in v1.0.2
func (x *NoEmpty) ProtoReflect() protoreflect.Message
type NoEmptyServiceClient ¶ added in v1.0.2
type NoEmptyServiceClient interface {
Get(ctx context.Context, in *NoEmpty, opts ...grpc.CallOption) (*NoEmpty, error)
}
NoEmptyServiceClient is the client API for NoEmptyService 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 NewNoEmptyServiceClient ¶ added in v1.0.2
func NewNoEmptyServiceClient(cc grpc.ClientConnInterface) NoEmptyServiceClient
func NewNoEmptyServiceFixtures ¶ added in v1.0.2
func NewNoEmptyServiceFixtures(baseDir string) NoEmptyServiceClient
type NoEmptyServiceServer ¶ added in v1.0.2
type NoEmptyServiceServer interface { Get(context.Context, *NoEmpty) (*NoEmpty, error) // contains filtered or unexported methods }
NoEmptyServiceServer is the server API for NoEmptyService service. All implementations must embed UnimplementedNoEmptyServiceServer for forward compatibility
type Pet ¶
type Pet struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=petstore.Status" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Pet) Descriptor
deprecated
func (*Pet) ProtoMessage ¶
func (*Pet) ProtoMessage()
func (*Pet) ProtoReflect ¶
func (x *Pet) ProtoReflect() protoreflect.Message
type PetStoreClient ¶
type PetStoreClient interface { GetAll(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Pets, error) GetPet(ctx context.Context, in *Pet, opts ...grpc.CallOption) (*Pet, error) CreatePet(ctx context.Context, in *Pet, opts ...grpc.CallOption) (*Pet, error) UpdatePet(ctx context.Context, in *Pet, opts ...grpc.CallOption) (*Pet, error) DeletePet(ctx context.Context, in *Pet, opts ...grpc.CallOption) (*emptypb.Empty, error) }
PetStoreClient is the client API for PetStore 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 NewPetStoreClient ¶
func NewPetStoreClient(cc grpc.ClientConnInterface) PetStoreClient
func NewPetStoreFixtures ¶ added in v1.0.2
func NewPetStoreFixtures(baseDir string) PetStoreClient
type PetStoreServer ¶
type PetStoreServer interface { GetAll(context.Context, *emptypb.Empty) (*Pets, error) GetPet(context.Context, *Pet) (*Pet, error) CreatePet(context.Context, *Pet) (*Pet, error) UpdatePet(context.Context, *Pet) (*Pet, error) DeletePet(context.Context, *Pet) (*emptypb.Empty, error) // contains filtered or unexported methods }
PetStoreServer is the server API for PetStore service. All implementations must embed UnimplementedPetStoreServer for forward compatibility
type Pets ¶
type Pets struct { Pets []*Pet `protobuf:"bytes,1,rep,name=pets,proto3" json:"pets,omitempty"` // contains filtered or unexported fields }
func (*Pets) Descriptor
deprecated
func (*Pets) ProtoMessage ¶
func (*Pets) ProtoMessage()
func (*Pets) ProtoReflect ¶
func (x *Pets) ProtoReflect() protoreflect.Message
type SomeServiceClient ¶ added in v1.0.2
type SomeServiceClient interface {
SomeMethod(ctx context.Context, in *some_lib.SomeMessage, opts ...grpc.CallOption) (*some_lib.SomeMessage, error)
}
SomeServiceClient is the client API for SomeService 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 NewSomeServiceClient ¶ added in v1.0.2
func NewSomeServiceClient(cc grpc.ClientConnInterface) SomeServiceClient
func NewSomeServiceFixtures ¶ added in v1.0.2
func NewSomeServiceFixtures(baseDir string) SomeServiceClient
type SomeServiceServer ¶ added in v1.0.2
type SomeServiceServer interface { SomeMethod(context.Context, *some_lib.SomeMessage) (*some_lib.SomeMessage, error) // contains filtered or unexported methods }
SomeServiceServer is the server API for SomeService service. All implementations must embed UnimplementedSomeServiceServer for forward compatibility
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type UnimplementedNoEmptyServiceServer ¶ added in v1.0.2
type UnimplementedNoEmptyServiceServer struct { }
UnimplementedNoEmptyServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPetStoreServer ¶
type UnimplementedPetStoreServer struct { }
UnimplementedPetStoreServer must be embedded to have forward compatible implementations.
type UnimplementedSomeServiceServer ¶ added in v1.0.2
type UnimplementedSomeServiceServer struct { }
UnimplementedSomeServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSomeServiceServer) SomeMethod ¶ added in v1.0.2
func (UnimplementedSomeServiceServer) SomeMethod(context.Context, *some_lib.SomeMessage) (*some_lib.SomeMessage, error)
type UnsafeNoEmptyServiceServer ¶ added in v1.0.2
type UnsafeNoEmptyServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNoEmptyServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NoEmptyServiceServer will result in compilation errors.
type UnsafePetStoreServer ¶
type UnsafePetStoreServer interface {
// contains filtered or unexported methods
}
UnsafePetStoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PetStoreServer will result in compilation errors.
type UnsafeSomeServiceServer ¶ added in v1.0.2
type UnsafeSomeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSomeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SomeServiceServer will result in compilation errors.