petv1

package
v0.0.0-...-7fb8ae8 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PetType_name = map[int32]string{
		0: "PET_TYPE_UNSPECIFIED",
		1: "PET_TYPE_CAT",
		2: "PET_TYPE_DOG",
		3: "PET_TYPE_SNAKE",
		4: "PET_TYPE_HAMSTER",
	}
	PetType_value = map[string]int32{
		"PET_TYPE_UNSPECIFIED": 0,
		"PET_TYPE_CAT":         1,
		"PET_TYPE_DOG":         2,
		"PET_TYPE_SNAKE":       3,
		"PET_TYPE_HAMSTER":     4,
	}
)

Enum value maps for PetType.

View Source
var PetStore_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pet.v1.PetStore",
	HandlerType: (*PetStoreServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPet",
			Handler:    _PetStore_GetPet_Handler,
		},
		{
			MethodName: "PutPet",
			Handler:    _PetStore_PutPet_Handler,
		},
		{
			MethodName: "DeletePet",
			Handler:    _PetStore_DeletePet_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pet.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)

Functions

func RegisterPetStoreServer

func RegisterPetStoreServer(s grpc.ServiceRegistrar, srv PetStoreServer)

Types

type DeletePetRequest

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

func (*DeletePetRequest) Descriptor deprecated

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

Deprecated: Use DeletePetRequest.ProtoReflect.Descriptor instead.

func (*DeletePetRequest) GetPetID

func (x *DeletePetRequest) GetPetID() string

func (*DeletePetRequest) ProtoMessage

func (*DeletePetRequest) ProtoMessage()

func (*DeletePetRequest) ProtoReflect

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

func (*DeletePetRequest) Reset

func (x *DeletePetRequest) Reset()

func (*DeletePetRequest) String

func (x *DeletePetRequest) String() string

type DeletePetResponse

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

func (*DeletePetResponse) Descriptor deprecated

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

Deprecated: Use DeletePetResponse.ProtoReflect.Descriptor instead.

func (*DeletePetResponse) ProtoMessage

func (*DeletePetResponse) ProtoMessage()

func (*DeletePetResponse) ProtoReflect

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

func (*DeletePetResponse) Reset

func (x *DeletePetResponse) Reset()

func (*DeletePetResponse) String

func (x *DeletePetResponse) String() string

type GetPetRequest

type GetPetRequest struct {
	PetId string `protobuf:"bytes,1,opt,name=pet_id,json=petId,proto3" json:"pet_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPetRequest) Descriptor deprecated

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

Deprecated: Use GetPetRequest.ProtoReflect.Descriptor instead.

func (*GetPetRequest) GetPetId

func (x *GetPetRequest) GetPetId() string

func (*GetPetRequest) ProtoMessage

func (*GetPetRequest) ProtoMessage()

func (*GetPetRequest) ProtoReflect

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

func (*GetPetRequest) Reset

func (x *GetPetRequest) Reset()

func (*GetPetRequest) String

func (x *GetPetRequest) String() string

type GetPetResponse

type GetPetResponse struct {
	Pet *Pet `protobuf:"bytes,1,opt,name=pet,proto3" json:"pet,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPetResponse) Descriptor deprecated

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

Deprecated: Use GetPetResponse.ProtoReflect.Descriptor instead.

func (*GetPetResponse) GetPet

func (x *GetPetResponse) GetPet() *Pet

func (*GetPetResponse) ProtoMessage

func (*GetPetResponse) ProtoMessage()

func (*GetPetResponse) ProtoReflect

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

func (*GetPetResponse) Reset

func (x *GetPetResponse) Reset()

func (*GetPetResponse) String

func (x *GetPetResponse) String() string

type Pet

type Pet struct {
	PetType   PetType            `protobuf:"varint,1,opt,name=pet_type,json=petType,proto3,enum=pet.v1.PetType" json:"pet_type,omitempty"`
	PetId     string             `protobuf:"bytes,2,opt,name=pet_id,json=petId,proto3" json:"pet_id,omitempty"`
	Name      string             `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	CreatedAt *datetime.DateTime `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Pet represents a pet in the pet store.

func (*Pet) Descriptor deprecated

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

Deprecated: Use Pet.ProtoReflect.Descriptor instead.

func (*Pet) GetCreatedAt

func (x *Pet) GetCreatedAt() *datetime.DateTime

func (*Pet) GetName

func (x *Pet) GetName() string

func (*Pet) GetPetId

func (x *Pet) GetPetId() string

func (*Pet) GetPetType

func (x *Pet) GetPetType() PetType

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 {
	GetPet(ctx context.Context, in *GetPetRequest, opts ...grpc.CallOption) (*GetPetResponse, error)
	PutPet(ctx context.Context, in *PutPetRequest, opts ...grpc.CallOption) (*PutPetResponse, error)
	DeletePet(ctx context.Context, in *DeletePetRequest, opts ...grpc.CallOption) (*DeletePetResponse, 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

type PetStoreServer

PetStoreServer is the server API for PetStore service. All implementations should embed UnimplementedPetStoreServer for forward compatibility

type PetType

type PetType int32

PetType represents the different types of pets in the pet store.

const (
	PetType_PET_TYPE_UNSPECIFIED PetType = 0
	PetType_PET_TYPE_CAT         PetType = 1
	PetType_PET_TYPE_DOG         PetType = 2
	PetType_PET_TYPE_SNAKE       PetType = 3
	PetType_PET_TYPE_HAMSTER     PetType = 4
)

func (PetType) Descriptor

func (PetType) Descriptor() protoreflect.EnumDescriptor

func (PetType) Enum

func (x PetType) Enum() *PetType

func (PetType) EnumDescriptor deprecated

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

Deprecated: Use PetType.Descriptor instead.

func (PetType) Number

func (x PetType) Number() protoreflect.EnumNumber

func (PetType) String

func (x PetType) String() string

func (PetType) Type

func (PetType) Type() protoreflect.EnumType

type PutPetRequest

type PutPetRequest struct {
	PetType PetType `protobuf:"varint,1,opt,name=pet_type,json=petType,proto3,enum=pet.v1.PetType" json:"pet_type,omitempty"`
	Name    string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*PutPetRequest) Descriptor deprecated

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

Deprecated: Use PutPetRequest.ProtoReflect.Descriptor instead.

func (*PutPetRequest) GetName

func (x *PutPetRequest) GetName() string

func (*PutPetRequest) GetPetType

func (x *PutPetRequest) GetPetType() PetType

func (*PutPetRequest) ProtoMessage

func (*PutPetRequest) ProtoMessage()

func (*PutPetRequest) ProtoReflect

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

func (*PutPetRequest) Reset

func (x *PutPetRequest) Reset()

func (*PutPetRequest) String

func (x *PutPetRequest) String() string

type PutPetResponse

type PutPetResponse struct {
	Pet *Pet `protobuf:"bytes,1,opt,name=pet,proto3" json:"pet,omitempty"`
	// contains filtered or unexported fields
}

func (*PutPetResponse) Descriptor deprecated

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

Deprecated: Use PutPetResponse.ProtoReflect.Descriptor instead.

func (*PutPetResponse) GetPet

func (x *PutPetResponse) GetPet() *Pet

func (*PutPetResponse) ProtoMessage

func (*PutPetResponse) ProtoMessage()

func (*PutPetResponse) ProtoReflect

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

func (*PutPetResponse) Reset

func (x *PutPetResponse) Reset()

func (*PutPetResponse) String

func (x *PutPetResponse) String() string

type UnimplementedPetStoreServer

type UnimplementedPetStoreServer struct {
}

UnimplementedPetStoreServer should be embedded to have forward compatible implementations.

func (UnimplementedPetStoreServer) DeletePet

func (UnimplementedPetStoreServer) GetPet

func (UnimplementedPetStoreServer) PutPet

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.

Jump to

Keyboard shortcuts

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