server

package
v0.0.0-...-a88801c Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_server_cat_proto protoreflect.FileDescriptor
View Source
var File_server_greeter_proto protoreflect.FileDescriptor

Functions

func RegisterCatServiceServer

func RegisterCatServiceServer(s *grpc.Server, srv CatServiceServer)

func RegisterGreeterServer

func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)

Types

type Cat

type Cat 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"`
	Color      string `protobuf:"bytes,3,opt,name=color,proto3" json:"color,omitempty"`
	CategoryId string `protobuf:"bytes,4,opt,name=categoryId,proto3" json:"categoryId,omitempty"`
	// contains filtered or unexported fields
}

func (*Cat) Descriptor deprecated

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

Deprecated: Use Cat.ProtoReflect.Descriptor instead.

func (*Cat) GetCategoryId

func (x *Cat) GetCategoryId() string

func (*Cat) GetColor

func (x *Cat) GetColor() string

func (*Cat) GetId

func (x *Cat) GetId() string

func (*Cat) GetName

func (x *Cat) GetName() string

func (*Cat) ProtoMessage

func (*Cat) ProtoMessage()

func (*Cat) ProtoReflect

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

func (*Cat) Reset

func (x *Cat) Reset()

func (*Cat) String

func (x *Cat) String() string

type CatServiceClient

type CatServiceClient interface {
	ReadAll(ctx context.Context, in *ReadAllRequest, opts ...grpc.CallOption) (*ReadAllResponse, error)
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
}

CatServiceClient is the client API for CatService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCatServiceClient

func NewCatServiceClient(cc grpc.ClientConnInterface) CatServiceClient

type CatServiceServer

CatServiceServer is the server API for CatService service.

type CatWithoutId

type CatWithoutId struct {
	Name       string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Color      string `protobuf:"bytes,2,opt,name=color,proto3" json:"color,omitempty"`
	CategoryId string `protobuf:"bytes,3,opt,name=categoryId,proto3" json:"categoryId,omitempty"`
	// contains filtered or unexported fields
}

func (*CatWithoutId) Descriptor deprecated

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

Deprecated: Use CatWithoutId.ProtoReflect.Descriptor instead.

func (*CatWithoutId) GetCategoryId

func (x *CatWithoutId) GetCategoryId() string

func (*CatWithoutId) GetColor

func (x *CatWithoutId) GetColor() string

func (*CatWithoutId) GetName

func (x *CatWithoutId) GetName() string

func (*CatWithoutId) ProtoMessage

func (*CatWithoutId) ProtoMessage()

func (*CatWithoutId) ProtoReflect

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

func (*CatWithoutId) Reset

func (x *CatWithoutId) Reset()

func (*CatWithoutId) String

func (x *CatWithoutId) String() string

type CreateRequest

type CreateRequest struct {
	Cat *CatWithoutId `protobuf:"bytes,1,opt,name=cat,proto3" json:"cat,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetCat

func (x *CreateRequest) GetCat() *CatWithoutId

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 {
	Cat *Cat `protobuf:"bytes,1,opt,name=cat,proto3" json:"cat,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetCat

func (x *CreateResponse) GetCat() *Cat

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 {
	Deleted bool `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetDeleted

func (x *DeleteResponse) GetDeleted() bool

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 GreeterClient

type GreeterClient interface {
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
}

GreeterClient is the client API for Greeter service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGreeterClient

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterServer

type GreeterServer interface {
	SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
}

GreeterServer is the server API for Greeter service.

type HelloRequest

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

func (*HelloRequest) Descriptor deprecated

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

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetName

func (x *HelloRequest) GetName() string

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 HelloResponse

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

func (*HelloResponse) Descriptor deprecated

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

Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.

func (*HelloResponse) GetMessage

func (x *HelloResponse) GetMessage() string

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) ProtoReflect

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

func (*HelloResponse) Reset

func (x *HelloResponse) Reset()

func (*HelloResponse) String

func (x *HelloResponse) String() string

type ReadAllRequest

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

func (*ReadAllRequest) Descriptor deprecated

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

Deprecated: Use ReadAllRequest.ProtoReflect.Descriptor instead.

func (*ReadAllRequest) ProtoMessage

func (*ReadAllRequest) ProtoMessage()

func (*ReadAllRequest) ProtoReflect

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

func (*ReadAllRequest) Reset

func (x *ReadAllRequest) Reset()

func (*ReadAllRequest) String

func (x *ReadAllRequest) String() string

type ReadAllResponse

type ReadAllResponse struct {
	Cats []*Cat `protobuf:"bytes,1,rep,name=cats,proto3" json:"cats,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadAllResponse) Descriptor deprecated

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

Deprecated: Use ReadAllResponse.ProtoReflect.Descriptor instead.

func (*ReadAllResponse) GetCats

func (x *ReadAllResponse) GetCats() []*Cat

func (*ReadAllResponse) ProtoMessage

func (*ReadAllResponse) ProtoMessage()

func (*ReadAllResponse) ProtoReflect

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

func (*ReadAllResponse) Reset

func (x *ReadAllResponse) Reset()

func (*ReadAllResponse) String

func (x *ReadAllResponse) String() string

type ReadRequest

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

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetId

func (x *ReadRequest) GetId() string

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

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

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadResponse

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

func (*ReadResponse) Descriptor deprecated

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

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetCat

func (x *ReadResponse) GetCat() *Cat

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

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

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type UnimplementedCatServiceServer

type UnimplementedCatServiceServer struct {
}

UnimplementedCatServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCatServiceServer) Create

func (*UnimplementedCatServiceServer) Delete

func (*UnimplementedCatServiceServer) Read

func (*UnimplementedCatServiceServer) ReadAll

func (*UnimplementedCatServiceServer) Update

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer can be embedded to have forward compatible implementations.

func (*UnimplementedGreeterServer) SayHello

type UpdateRequest

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

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetCat

func (x *UpdateRequest) GetCat() *Cat

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

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

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

type UpdateResponse

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

func (*UpdateResponse) Descriptor deprecated

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) GetCat

func (x *UpdateResponse) GetCat() *Cat

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect

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

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

Jump to

Keyboard shortcuts

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