api

package
v0.0.0-...-da474b6 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CategoryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "category.CategoryService",
	HandlerType: (*CategoryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCategoryTree",
			Handler:    _CategoryService_GetCategoryTree_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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_category_proto protoreflect.FileDescriptor

Functions

func RegisterCategoryServiceServer

func RegisterCategoryServiceServer(s grpc.ServiceRegistrar, srv CategoryServiceServer)

Types

type Category

type Category struct {
	Id            int32       `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name          string      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Url           string      `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	SubCategories []*Category `protobuf:"bytes,4,rep,name=subCategories,proto3" json:"subCategories,omitempty"`
	// contains filtered or unexported fields
}

func (*Category) Descriptor deprecated

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

Deprecated: Use Category.ProtoReflect.Descriptor instead.

func (*Category) GetId

func (x *Category) GetId() int32

func (*Category) GetName

func (x *Category) GetName() string

func (*Category) GetSubCategories

func (x *Category) GetSubCategories() []*Category

func (*Category) GetUrl

func (x *Category) GetUrl() 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 CategoryServiceClient

type CategoryServiceClient interface {
	GetCategoryTree(ctx context.Context, in *CategoryTreeRequest, opts ...grpc.CallOption) (*CategoryTreeResponse, 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 {
	GetCategoryTree(context.Context, *CategoryTreeRequest) (*CategoryTreeResponse, error)
	// contains filtered or unexported methods
}

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

type CategoryTreeRequest

type CategoryTreeRequest struct {
	Root int32 `protobuf:"varint,1,opt,name=root,proto3" json:"root,omitempty"`
	// contains filtered or unexported fields
}

func (*CategoryTreeRequest) Descriptor deprecated

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

Deprecated: Use CategoryTreeRequest.ProtoReflect.Descriptor instead.

func (*CategoryTreeRequest) GetRoot

func (x *CategoryTreeRequest) GetRoot() int32

func (*CategoryTreeRequest) ProtoMessage

func (*CategoryTreeRequest) ProtoMessage()

func (*CategoryTreeRequest) ProtoReflect

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

func (*CategoryTreeRequest) Reset

func (x *CategoryTreeRequest) Reset()

func (*CategoryTreeRequest) String

func (x *CategoryTreeRequest) String() string

type CategoryTreeResponse

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

func (*CategoryTreeResponse) Descriptor deprecated

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

Deprecated: Use CategoryTreeResponse.ProtoReflect.Descriptor instead.

func (*CategoryTreeResponse) GetCategories

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

func (*CategoryTreeResponse) ProtoMessage

func (*CategoryTreeResponse) ProtoMessage()

func (*CategoryTreeResponse) ProtoReflect

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

func (*CategoryTreeResponse) Reset

func (x *CategoryTreeResponse) Reset()

func (*CategoryTreeResponse) String

func (x *CategoryTreeResponse) String() string

type UnimplementedCategoryServiceServer

type UnimplementedCategoryServiceServer struct {
}

UnimplementedCategoryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCategoryServiceServer) GetCategoryTree

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