pb

package
v0.0.0-...-b1c1dce Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CategoryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.CategoryService",
	HandlerType: (*CategoryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateCategory",
			Handler:    _CategoryService_CreateCategory_Handler,
		},
		{
			MethodName: "ListCategories",
			Handler:    _CategoryService_ListCategories_Handler,
		},
		{
			MethodName: "GetCategory",
			Handler:    _CategoryService_GetCategory_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "CreateCategoryStream",
			Handler:       _CategoryService_CreateCategoryStream_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "CreateCategoryStreamBidirectional",
			Handler:       _CategoryService_CreateCategoryStreamBidirectional_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/course_category.proto",
}

CategoryService_ServiceDesc is the grpc.ServiceDesc for CategoryService 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 File_proto_course_category_proto protoreflect.FileDescriptor

Functions

func RegisterCategoryServiceServer

func RegisterCategoryServiceServer(s grpc.ServiceRegistrar, srv CategoryServiceServer)

Types

type Blank

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

func (*Blank) Descriptor deprecated

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

Deprecated: Use Blank.ProtoReflect.Descriptor instead.

func (*Blank) ProtoMessage

func (*Blank) ProtoMessage()

func (*Blank) ProtoReflect

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

func (*Blank) Reset

func (x *Blank) Reset()

func (*Blank) String

func (x *Blank) String() string

type Category

type Category 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"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Category) Descriptor deprecated

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

Deprecated: Use Category.ProtoReflect.Descriptor instead.

func (*Category) GetDescription

func (x *Category) GetDescription() string

func (*Category) GetId

func (x *Category) GetId() string

func (*Category) GetName

func (x *Category) GetName() string

func (*Category) ProtoMessage

func (*Category) ProtoMessage()

func (*Category) ProtoReflect

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

func (*Category) Reset

func (x *Category) Reset()

func (*Category) String

func (x *Category) String() string

type CategoryGetRequest

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

func (*CategoryGetRequest) Descriptor deprecated

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

Deprecated: Use CategoryGetRequest.ProtoReflect.Descriptor instead.

func (*CategoryGetRequest) GetId

func (x *CategoryGetRequest) GetId() string

func (*CategoryGetRequest) ProtoMessage

func (*CategoryGetRequest) ProtoMessage()

func (*CategoryGetRequest) ProtoReflect

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

func (*CategoryGetRequest) Reset

func (x *CategoryGetRequest) Reset()

func (*CategoryGetRequest) String

func (x *CategoryGetRequest) String() string

type CategoryList

type CategoryList struct {
	Categories []*Category `protobuf:"bytes,1,rep,name=categories,proto3" json:"categories,omitempty"`
	// contains filtered or unexported fields
}

func (*CategoryList) Descriptor deprecated

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

Deprecated: Use CategoryList.ProtoReflect.Descriptor instead.

func (*CategoryList) GetCategories

func (x *CategoryList) GetCategories() []*Category

func (*CategoryList) ProtoMessage

func (*CategoryList) ProtoMessage()

func (*CategoryList) ProtoReflect

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

func (*CategoryList) Reset

func (x *CategoryList) Reset()

func (*CategoryList) String

func (x *CategoryList) String() string

type CategoryServiceClient

type CategoryServiceClient interface {
	CreateCategory(ctx context.Context, in *CreateCategoryRequest, opts ...grpc.CallOption) (*Category, error)
	CreateCategoryStream(ctx context.Context, opts ...grpc.CallOption) (CategoryService_CreateCategoryStreamClient, error)
	CreateCategoryStreamBidirectional(ctx context.Context, opts ...grpc.CallOption) (CategoryService_CreateCategoryStreamBidirectionalClient, error)
	ListCategories(ctx context.Context, in *Blank, opts ...grpc.CallOption) (*CategoryList, error)
	GetCategory(ctx context.Context, in *CategoryGetRequest, opts ...grpc.CallOption) (*Category, error)
}

CategoryServiceClient is the client API for CategoryService 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.

type CategoryServiceServer

type CategoryServiceServer interface {
	CreateCategory(context.Context, *CreateCategoryRequest) (*Category, error)
	CreateCategoryStream(CategoryService_CreateCategoryStreamServer) error
	CreateCategoryStreamBidirectional(CategoryService_CreateCategoryStreamBidirectionalServer) error
	ListCategories(context.Context, *Blank) (*CategoryList, error)
	GetCategory(context.Context, *CategoryGetRequest) (*Category, error)
	// contains filtered or unexported methods
}

CategoryServiceServer is the server API for CategoryService service. All implementations must embed UnimplementedCategoryServiceServer for forward compatibility

type CategoryService_CreateCategoryStreamBidirectionalClient

type CategoryService_CreateCategoryStreamBidirectionalClient interface {
	Send(*CreateCategoryRequest) error
	Recv() (*Category, error)
	grpc.ClientStream
}

type CategoryService_CreateCategoryStreamBidirectionalServer

type CategoryService_CreateCategoryStreamBidirectionalServer interface {
	Send(*Category) error
	Recv() (*CreateCategoryRequest, error)
	grpc.ServerStream
}

type CategoryService_CreateCategoryStreamClient

type CategoryService_CreateCategoryStreamClient interface {
	Send(*CreateCategoryRequest) error
	CloseAndRecv() (*CategoryList, error)
	grpc.ClientStream
}

type CategoryService_CreateCategoryStreamServer

type CategoryService_CreateCategoryStreamServer interface {
	SendAndClose(*CategoryList) error
	Recv() (*CreateCategoryRequest, error)
	grpc.ServerStream
}

type CreateCategoryRequest

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

func (*CreateCategoryRequest) Descriptor deprecated

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

Deprecated: Use CreateCategoryRequest.ProtoReflect.Descriptor instead.

func (*CreateCategoryRequest) GetDescription

func (x *CreateCategoryRequest) GetDescription() string

func (*CreateCategoryRequest) GetName

func (x *CreateCategoryRequest) GetName() string

func (*CreateCategoryRequest) ProtoMessage

func (*CreateCategoryRequest) ProtoMessage()

func (*CreateCategoryRequest) ProtoReflect

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

func (*CreateCategoryRequest) Reset

func (x *CreateCategoryRequest) Reset()

func (*CreateCategoryRequest) String

func (x *CreateCategoryRequest) String() string

type UnimplementedCategoryServiceServer

type UnimplementedCategoryServiceServer struct {
}

UnimplementedCategoryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCategoryServiceServer) CreateCategory

func (UnimplementedCategoryServiceServer) CreateCategoryStream

func (UnimplementedCategoryServiceServer) CreateCategoryStreamBidirectional

func (UnimplementedCategoryServiceServer) GetCategory

func (UnimplementedCategoryServiceServer) ListCategories

type UnsafeCategoryServiceServer

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

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

Jump to

Keyboard shortcuts

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