v1

package
v0.0.0-...-d095f68 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Person_Employment_name = map[int32]string{
		0: "UNSET",
		1: "EMPLOYED",
		2: "UNEMPLOYED",
	}
	Person_Employment_value = map[string]int32{
		"UNSET":      0,
		"EMPLOYED":   1,
		"UNEMPLOYED": 2,
	}
)

Enum value maps for Person_Employment.

View Source
var File_v1_service_proto protoreflect.FileDescriptor
View Source
var People_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "example.v1.People",
	HandlerType: (*PeopleServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _People_Create_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _People_Get_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _People_Delete_Handler,
		},
		{
			MethodName: "List",
			Handler:    _People_List_Handler,
		},
		{
			MethodName: "Ping",
			Handler:    _People_Ping_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "v1/service.proto",
}

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

Functions

func RegisterPeopleServer

func RegisterPeopleServer(s grpc.ServiceRegistrar, srv PeopleServer)

Types

type Biking

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

func (*Biking) Descriptor deprecated

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

Deprecated: Use Biking.ProtoReflect.Descriptor instead.

func (*Biking) GetStyle

func (x *Biking) GetStyle() string

func (*Biking) ProtoMessage

func (*Biking) ProtoMessage()

func (*Biking) ProtoReflect

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

func (*Biking) Reset

func (x *Biking) Reset()

func (*Biking) String

func (x *Biking) String() string

type Coding

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

func (*Coding) Descriptor deprecated

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

Deprecated: Use Coding.ProtoReflect.Descriptor instead.

func (*Coding) GetLanguage

func (x *Coding) GetLanguage() string

func (*Coding) ProtoMessage

func (*Coding) ProtoMessage()

func (*Coding) ProtoReflect

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

func (*Coding) Reset

func (x *Coding) Reset()

func (*Coding) String

func (x *Coding) String() string

type CreateRequest

type CreateRequest struct {
	Id         string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	FirstName  string            `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastName   string            `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	Employment Person_Employment `protobuf:"varint,4,opt,name=employment,proto3,enum=example.v1.Person_Employment" json:"employment,omitempty"`
	Hobby      *Hobby            `protobuf:"bytes,5,opt,name=hobby,proto3" json:"hobby,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetEmployment

func (x *CreateRequest) GetEmployment() Person_Employment

func (*CreateRequest) GetFirstName

func (x *CreateRequest) GetFirstName() string

func (*CreateRequest) GetHobby

func (x *CreateRequest) GetHobby() *Hobby

func (*CreateRequest) GetId

func (x *CreateRequest) GetId() string

func (*CreateRequest) GetLastName

func (x *CreateRequest) GetLastName() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

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

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetPerson

func (x *CreateResponse) GetPerson() *Person

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type DeleteRequest

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

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

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

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type GetRequest

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

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetId

func (x *GetRequest) GetId() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

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

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetPerson

func (x *GetResponse) GetPerson() *Person

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type Hobby

type Hobby struct {

	// Types that are assignable to Type:
	//	*Hobby_Coding
	//	*Hobby_Reading
	//	*Hobby_Biking
	Type isHobby_Type `protobuf_oneof:"type"`
	// contains filtered or unexported fields
}

func (*Hobby) Descriptor deprecated

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

Deprecated: Use Hobby.ProtoReflect.Descriptor instead.

func (*Hobby) GetBiking

func (x *Hobby) GetBiking() *Biking

func (*Hobby) GetCoding

func (x *Hobby) GetCoding() *Coding

func (*Hobby) GetReading

func (x *Hobby) GetReading() *Reading

func (*Hobby) GetType

func (m *Hobby) GetType() isHobby_Type

func (*Hobby) ProtoMessage

func (*Hobby) ProtoMessage()

func (*Hobby) ProtoReflect

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

func (*Hobby) Reset

func (x *Hobby) Reset()

func (*Hobby) String

func (x *Hobby) String() string

type Hobby_Biking

type Hobby_Biking struct {
	Biking *Biking `protobuf:"bytes,3,opt,name=biking,proto3,oneof"`
}

type Hobby_Coding

type Hobby_Coding struct {
	Coding *Coding `protobuf:"bytes,1,opt,name=coding,proto3,oneof"`
}

type Hobby_Reading

type Hobby_Reading struct {
	Reading *Reading `protobuf:"bytes,2,opt,name=reading,proto3,oneof"`
}

type ListRequest

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

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {
	People []*Person `protobuf:"bytes,1,rep,name=people,proto3" json:"people,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetPeople

func (x *ListResponse) GetPeople() []*Person

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type PeopleClient

type PeopleClient interface {
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

PeopleClient is the client API for People 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 NewPeopleClient

func NewPeopleClient(cc grpc.ClientConnInterface) PeopleClient

type PeopleServer

type PeopleServer interface {
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	List(context.Context, *ListRequest) (*ListResponse, error)
	Ping(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

PeopleServer is the server API for People service. All implementations must embed UnimplementedPeopleServer for forward compatibility

type Person

type Person struct {
	Id         string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	FirstName  string                 `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastName   string                 `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	Employment Person_Employment      `protobuf:"varint,4,opt,name=employment,proto3,enum=example.v1.Person_Employment" json:"employment,omitempty"`
	CreatedAt  *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt  *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Hobby      *Hobby                 `protobuf:"bytes,7,opt,name=hobby,proto3" json:"hobby,omitempty"`
	// contains filtered or unexported fields
}

func (*Person) Descriptor deprecated

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

Deprecated: Use Person.ProtoReflect.Descriptor instead.

func (*Person) GetCreatedAt

func (x *Person) GetCreatedAt() *timestamppb.Timestamp

func (*Person) GetEmployment

func (x *Person) GetEmployment() Person_Employment

func (*Person) GetFirstName

func (x *Person) GetFirstName() string

func (*Person) GetHobby

func (x *Person) GetHobby() *Hobby

func (*Person) GetId

func (x *Person) GetId() string

func (*Person) GetLastName

func (x *Person) GetLastName() string

func (*Person) GetUpdatedAt

func (x *Person) GetUpdatedAt() *timestamppb.Timestamp

func (*Person) ProtoMessage

func (*Person) ProtoMessage()

func (*Person) ProtoReflect

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

func (*Person) Reset

func (x *Person) Reset()

func (*Person) String

func (x *Person) String() string

type Person_Employment

type Person_Employment int32
const (
	Person_UNSET      Person_Employment = 0
	Person_EMPLOYED   Person_Employment = 1
	Person_UNEMPLOYED Person_Employment = 2
)

func (Person_Employment) Descriptor

func (Person_Employment) Enum

func (Person_Employment) EnumDescriptor deprecated

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

Deprecated: Use Person_Employment.Descriptor instead.

func (Person_Employment) Number

func (Person_Employment) String

func (x Person_Employment) String() string

func (Person_Employment) Type

type Reading

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

func (*Reading) Descriptor deprecated

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

Deprecated: Use Reading.ProtoReflect.Descriptor instead.

func (*Reading) GetGenre

func (x *Reading) GetGenre() string

func (*Reading) ProtoMessage

func (*Reading) ProtoMessage()

func (*Reading) ProtoReflect

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

func (*Reading) Reset

func (x *Reading) Reset()

func (*Reading) String

func (x *Reading) String() string

type UnimplementedPeopleServer

type UnimplementedPeopleServer struct {
}

UnimplementedPeopleServer must be embedded to have forward compatible implementations.

func (UnimplementedPeopleServer) Create

func (UnimplementedPeopleServer) Delete

func (UnimplementedPeopleServer) Get

func (UnimplementedPeopleServer) List

func (UnimplementedPeopleServer) Ping

type UnsafePeopleServer

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

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

Jump to

Keyboard shortcuts

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