example

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	NoEmptyService_Get_FullMethodName = "/petstore.NoEmptyService/Get"
)
View Source
const (
	SomeService_SomeMethod_FullMethodName = "/Some.Lib.SomeService/SomeMethod"
)

Variables

View Source
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.

View Source
var File_no_empty_proto protoreflect.FileDescriptor
View Source
var File_no_service_proto protoreflect.FileDescriptor
View Source
var File_petstore_proto protoreflect.FileDescriptor
View Source
var File_use_some_lib_proto protoreflect.FileDescriptor
View Source
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)

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use NoEmpty.ProtoReflect.Descriptor instead.

func (*NoEmpty) GetId added in v1.0.2

func (x *NoEmpty) GetId() string

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

func (*NoEmpty) Reset added in v1.0.2

func (x *NoEmpty) Reset()

func (*NoEmpty) String added in v1.0.2

func (x *NoEmpty) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Pet.ProtoReflect.Descriptor instead.

func (*Pet) GetId

func (x *Pet) GetId() string

func (*Pet) GetName

func (x *Pet) GetName() string

func (*Pet) GetStatus

func (x *Pet) GetStatus() Status

func (*Pet) ProtoMessage

func (*Pet) ProtoMessage()

func (*Pet) ProtoReflect

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

func (*Pet) Reset

func (x *Pet) Reset()

func (*Pet) String

func (x *Pet) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Pets.ProtoReflect.Descriptor instead.

func (*Pets) GetPets

func (x *Pets) GetPets() []*Pet

func (*Pets) ProtoMessage

func (*Pets) ProtoMessage()

func (*Pets) ProtoReflect

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

func (*Pets) Reset

func (x *Pets) Reset()

func (*Pets) String

func (x *Pets) String() string

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
const (
	Status_UNKNOWN   Status = 0
	Status_AVAILABLE Status = 1
	Status_PENDING   Status = 2
	Status_SOLD      Status = 3
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

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.

func (UnimplementedNoEmptyServiceServer) Get added in v1.0.2

type UnimplementedPetStoreServer

type UnimplementedPetStoreServer struct {
}

UnimplementedPetStoreServer must be embedded to have forward compatible implementations.

func (UnimplementedPetStoreServer) CreatePet

func (UnimplementedPetStoreServer) DeletePet

func (UnimplementedPetStoreServer) GetAll

func (UnimplementedPetStoreServer) GetPet

func (UnimplementedPetStoreServer) UpdatePet

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

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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