Documentation ¶
Overview ¶
Package categoryV1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterCategoryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCategoryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CategoryServiceClient) error
- func RegisterCategoryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCategoryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CategoryServiceServer) error
- func RegisterCategoryServiceServer(s grpc.ServiceRegistrar, srv CategoryServiceServer)
- type Category
- func (*Category) Descriptor() ([]byte, []int)deprecated
- func (x *Category) GetDescription() string
- func (x *Category) GetId() string
- func (x *Category) GetMetaData() []*CategoryMetaData
- func (x *Category) GetName() string
- func (*Category) ProtoMessage()
- func (x *Category) ProtoReflect() protoreflect.Message
- func (x *Category) Reset()
- func (x *Category) String() string
- type CategoryMetaData
- func (*CategoryMetaData) Descriptor() ([]byte, []int)deprecated
- func (x *CategoryMetaData) GetCategoryId() string
- func (x *CategoryMetaData) GetDefaultValue() string
- func (x *CategoryMetaData) GetDescription() string
- func (x *CategoryMetaData) GetId() string
- func (x *CategoryMetaData) GetKey() string
- func (x *CategoryMetaData) GetOrder() int32
- func (x *CategoryMetaData) GetType() string
- func (x *CategoryMetaData) GetValue() string
- func (*CategoryMetaData) ProtoMessage()
- func (x *CategoryMetaData) ProtoReflect() protoreflect.Message
- func (x *CategoryMetaData) Reset()
- func (x *CategoryMetaData) String() string
- type CategoryServiceClient
- type CategoryServiceServer
- type CreateCategoryRequest
- func (*CreateCategoryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateCategoryRequest) GetCategory() *Category
- func (*CreateCategoryRequest) ProtoMessage()
- func (x *CreateCategoryRequest) ProtoReflect() protoreflect.Message
- func (x *CreateCategoryRequest) Reset()
- func (x *CreateCategoryRequest) String() string
- type CreateCategoryResponse
- type DeleteCategoryRequest
- func (*DeleteCategoryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteCategoryRequest) GetId() string
- func (*DeleteCategoryRequest) ProtoMessage()
- func (x *DeleteCategoryRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteCategoryRequest) Reset()
- func (x *DeleteCategoryRequest) String() string
- type DeleteCategoryResponse
- type GetCategoryListRequest
- type GetCategoryListResponse
- func (*GetCategoryListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetCategoryListResponse) GetCategory() []*Category
- func (*GetCategoryListResponse) ProtoMessage()
- func (x *GetCategoryListResponse) ProtoReflect() protoreflect.Message
- func (x *GetCategoryListResponse) Reset()
- func (x *GetCategoryListResponse) String() string
- type GetCategoryRequest
- type GetCategoryResponse
- func (*GetCategoryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetCategoryResponse) GetCategory() *Category
- func (*GetCategoryResponse) ProtoMessage()
- func (x *GetCategoryResponse) ProtoReflect() protoreflect.Message
- func (x *GetCategoryResponse) Reset()
- func (x *GetCategoryResponse) String() string
- type UnimplementedCategoryServiceServer
- func (UnimplementedCategoryServiceServer) CreateCategory(context.Context, *CreateCategoryRequest) (*CreateCategoryResponse, error)
- func (UnimplementedCategoryServiceServer) DeleteCategory(context.Context, *DeleteCategoryRequest) (*DeleteCategoryResponse, error)
- func (UnimplementedCategoryServiceServer) GetCategory(context.Context, *GetCategoryRequest) (*GetCategoryResponse, error)
- func (UnimplementedCategoryServiceServer) GetCategoryList(context.Context, *GetCategoryListRequest) (*GetCategoryListResponse, error)
- func (UnimplementedCategoryServiceServer) UpdateCategory(context.Context, *UpdateCategoryRequest) (*UpdateCategoryResponse, error)
- type UnsafeCategoryServiceServer
- type UpdateCategoryRequest
- func (*UpdateCategoryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateCategoryRequest) GetCategory() *Category
- func (*UpdateCategoryRequest) ProtoMessage()
- func (x *UpdateCategoryRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateCategoryRequest) Reset()
- func (x *UpdateCategoryRequest) String() string
- type UpdateCategoryResponse
Constants ¶
const ( CategoryService_CreateCategory_FullMethodName = "/category.v1.CategoryService/CreateCategory" CategoryService_GetCategory_FullMethodName = "/category.v1.CategoryService/GetCategory" CategoryService_GetCategoryList_FullMethodName = "/category.v1.CategoryService/GetCategoryList" CategoryService_UpdateCategory_FullMethodName = "/category.v1.CategoryService/UpdateCategory" CategoryService_DeleteCategory_FullMethodName = "/category.v1.CategoryService/DeleteCategory" )
Variables ¶
var CategoryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "category.v1.CategoryService", HandlerType: (*CategoryServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateCategory", Handler: _CategoryService_CreateCategory_Handler, }, { MethodName: "GetCategory", Handler: _CategoryService_GetCategory_Handler, }, { MethodName: "GetCategoryList", Handler: _CategoryService_GetCategoryList_Handler, }, { MethodName: "UpdateCategory", Handler: _CategoryService_UpdateCategory_Handler, }, { MethodName: "DeleteCategory", Handler: _CategoryService_DeleteCategory_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "category/v1/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)
var File_category_v1_category_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCategoryServiceHandler ¶
func RegisterCategoryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCategoryServiceHandler registers the http handlers for service CategoryService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCategoryServiceHandlerClient ¶
func RegisterCategoryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CategoryServiceClient) error
RegisterCategoryServiceHandlerClient registers the http handlers for service CategoryService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CategoryServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CategoryServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CategoryServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterCategoryServiceHandlerFromEndpoint ¶
func RegisterCategoryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCategoryServiceHandlerFromEndpoint is same as RegisterCategoryServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCategoryServiceHandlerServer ¶
func RegisterCategoryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CategoryServiceServer) error
RegisterCategoryServiceHandlerServer registers the http handlers for service CategoryService to "mux". UnaryRPC :call CategoryServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCategoryServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterCategoryServiceServer ¶
func RegisterCategoryServiceServer(s grpc.ServiceRegistrar, srv CategoryServiceServer)
Types ¶
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"` MetaData []*CategoryMetaData `protobuf:"bytes,4,rep,name=metaData,proto3" json:"metaData,omitempty"` // contains filtered or unexported fields }
func (*Category) Descriptor
deprecated
func (*Category) GetDescription ¶
func (*Category) GetMetaData ¶
func (x *Category) GetMetaData() []*CategoryMetaData
func (*Category) ProtoMessage ¶
func (*Category) ProtoMessage()
func (*Category) ProtoReflect ¶
func (x *Category) ProtoReflect() protoreflect.Message
type CategoryMetaData ¶
type CategoryMetaData struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CategoryId string `protobuf:"bytes,2,opt,name=categoryId,proto3" json:"categoryId,omitempty"` Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` Order int32 `protobuf:"varint,4,opt,name=order,proto3" json:"order,omitempty"` Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` Value string `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` DefaultValue string `protobuf:"bytes,8,opt,name=defaultValue,proto3" json:"defaultValue,omitempty"` // contains filtered or unexported fields }
func (*CategoryMetaData) Descriptor
deprecated
func (*CategoryMetaData) Descriptor() ([]byte, []int)
Deprecated: Use CategoryMetaData.ProtoReflect.Descriptor instead.
func (*CategoryMetaData) GetCategoryId ¶
func (x *CategoryMetaData) GetCategoryId() string
func (*CategoryMetaData) GetDefaultValue ¶
func (x *CategoryMetaData) GetDefaultValue() string
func (*CategoryMetaData) GetDescription ¶
func (x *CategoryMetaData) GetDescription() string
func (*CategoryMetaData) GetId ¶
func (x *CategoryMetaData) GetId() string
func (*CategoryMetaData) GetKey ¶
func (x *CategoryMetaData) GetKey() string
func (*CategoryMetaData) GetOrder ¶
func (x *CategoryMetaData) GetOrder() int32
func (*CategoryMetaData) GetType ¶
func (x *CategoryMetaData) GetType() string
func (*CategoryMetaData) GetValue ¶
func (x *CategoryMetaData) GetValue() string
func (*CategoryMetaData) ProtoMessage ¶
func (*CategoryMetaData) ProtoMessage()
func (*CategoryMetaData) ProtoReflect ¶
func (x *CategoryMetaData) ProtoReflect() protoreflect.Message
func (*CategoryMetaData) Reset ¶
func (x *CategoryMetaData) Reset()
func (*CategoryMetaData) String ¶
func (x *CategoryMetaData) String() string
type CategoryServiceClient ¶
type CategoryServiceClient interface { CreateCategory(ctx context.Context, in *CreateCategoryRequest, opts ...grpc.CallOption) (*CreateCategoryResponse, error) GetCategory(ctx context.Context, in *GetCategoryRequest, opts ...grpc.CallOption) (*GetCategoryResponse, error) GetCategoryList(ctx context.Context, in *GetCategoryListRequest, opts ...grpc.CallOption) (*GetCategoryListResponse, error) UpdateCategory(ctx context.Context, in *UpdateCategoryRequest, opts ...grpc.CallOption) (*UpdateCategoryResponse, error) DeleteCategory(ctx context.Context, in *DeleteCategoryRequest, opts ...grpc.CallOption) (*DeleteCategoryResponse, 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.
func NewCategoryServiceClient ¶
func NewCategoryServiceClient(cc grpc.ClientConnInterface) CategoryServiceClient
type CategoryServiceServer ¶
type CategoryServiceServer interface { CreateCategory(context.Context, *CreateCategoryRequest) (*CreateCategoryResponse, error) GetCategory(context.Context, *GetCategoryRequest) (*GetCategoryResponse, error) GetCategoryList(context.Context, *GetCategoryListRequest) (*GetCategoryListResponse, error) UpdateCategory(context.Context, *UpdateCategoryRequest) (*UpdateCategoryResponse, error) DeleteCategory(context.Context, *DeleteCategoryRequest) (*DeleteCategoryResponse, error) // contains filtered or unexported methods }
CategoryServiceServer is the server API for CategoryService service. All implementations must embed UnimplementedCategoryServiceServer for forward compatibility.
type CreateCategoryRequest ¶
type CreateCategoryRequest struct { Category *Category `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` // contains filtered or unexported fields }
CreateCategory
func (*CreateCategoryRequest) Descriptor
deprecated
func (*CreateCategoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateCategoryRequest.ProtoReflect.Descriptor instead.
func (*CreateCategoryRequest) GetCategory ¶
func (x *CreateCategoryRequest) GetCategory() *Category
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 CreateCategoryResponse ¶
type CreateCategoryResponse struct {
// contains filtered or unexported fields
}
func (*CreateCategoryResponse) Descriptor
deprecated
func (*CreateCategoryResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateCategoryResponse.ProtoReflect.Descriptor instead.
func (*CreateCategoryResponse) ProtoMessage ¶
func (*CreateCategoryResponse) ProtoMessage()
func (*CreateCategoryResponse) ProtoReflect ¶
func (x *CreateCategoryResponse) ProtoReflect() protoreflect.Message
func (*CreateCategoryResponse) Reset ¶
func (x *CreateCategoryResponse) Reset()
func (*CreateCategoryResponse) String ¶
func (x *CreateCategoryResponse) String() string
type DeleteCategoryRequest ¶
type DeleteCategoryRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
DeleteCategory
func (*DeleteCategoryRequest) Descriptor
deprecated
func (*DeleteCategoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCategoryRequest.ProtoReflect.Descriptor instead.
func (*DeleteCategoryRequest) GetId ¶
func (x *DeleteCategoryRequest) GetId() string
func (*DeleteCategoryRequest) ProtoMessage ¶
func (*DeleteCategoryRequest) ProtoMessage()
func (*DeleteCategoryRequest) ProtoReflect ¶
func (x *DeleteCategoryRequest) ProtoReflect() protoreflect.Message
func (*DeleteCategoryRequest) Reset ¶
func (x *DeleteCategoryRequest) Reset()
func (*DeleteCategoryRequest) String ¶
func (x *DeleteCategoryRequest) String() string
type DeleteCategoryResponse ¶
type DeleteCategoryResponse struct {
// contains filtered or unexported fields
}
func (*DeleteCategoryResponse) Descriptor
deprecated
func (*DeleteCategoryResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteCategoryResponse.ProtoReflect.Descriptor instead.
func (*DeleteCategoryResponse) ProtoMessage ¶
func (*DeleteCategoryResponse) ProtoMessage()
func (*DeleteCategoryResponse) ProtoReflect ¶
func (x *DeleteCategoryResponse) ProtoReflect() protoreflect.Message
func (*DeleteCategoryResponse) Reset ¶
func (x *DeleteCategoryResponse) Reset()
func (*DeleteCategoryResponse) String ¶
func (x *DeleteCategoryResponse) String() string
type GetCategoryListRequest ¶
type GetCategoryListRequest struct {
// contains filtered or unexported fields
}
GetCategory
func (*GetCategoryListRequest) Descriptor
deprecated
func (*GetCategoryListRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCategoryListRequest.ProtoReflect.Descriptor instead.
func (*GetCategoryListRequest) ProtoMessage ¶
func (*GetCategoryListRequest) ProtoMessage()
func (*GetCategoryListRequest) ProtoReflect ¶
func (x *GetCategoryListRequest) ProtoReflect() protoreflect.Message
func (*GetCategoryListRequest) Reset ¶
func (x *GetCategoryListRequest) Reset()
func (*GetCategoryListRequest) String ¶
func (x *GetCategoryListRequest) String() string
type GetCategoryListResponse ¶
type GetCategoryListResponse struct { Category []*Category `protobuf:"bytes,1,rep,name=category,proto3" json:"category,omitempty"` // contains filtered or unexported fields }
func (*GetCategoryListResponse) Descriptor
deprecated
func (*GetCategoryListResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetCategoryListResponse.ProtoReflect.Descriptor instead.
func (*GetCategoryListResponse) GetCategory ¶
func (x *GetCategoryListResponse) GetCategory() []*Category
func (*GetCategoryListResponse) ProtoMessage ¶
func (*GetCategoryListResponse) ProtoMessage()
func (*GetCategoryListResponse) ProtoReflect ¶
func (x *GetCategoryListResponse) ProtoReflect() protoreflect.Message
func (*GetCategoryListResponse) Reset ¶
func (x *GetCategoryListResponse) Reset()
func (*GetCategoryListResponse) String ¶
func (x *GetCategoryListResponse) String() string
type GetCategoryRequest ¶
type GetCategoryRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
GetCategory
func (*GetCategoryRequest) Descriptor
deprecated
func (*GetCategoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetCategoryRequest.ProtoReflect.Descriptor instead.
func (*GetCategoryRequest) GetId ¶
func (x *GetCategoryRequest) GetId() string
func (*GetCategoryRequest) ProtoMessage ¶
func (*GetCategoryRequest) ProtoMessage()
func (*GetCategoryRequest) ProtoReflect ¶
func (x *GetCategoryRequest) ProtoReflect() protoreflect.Message
func (*GetCategoryRequest) Reset ¶
func (x *GetCategoryRequest) Reset()
func (*GetCategoryRequest) String ¶
func (x *GetCategoryRequest) String() string
type GetCategoryResponse ¶
type GetCategoryResponse struct { Category *Category `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` // contains filtered or unexported fields }
func (*GetCategoryResponse) Descriptor
deprecated
func (*GetCategoryResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetCategoryResponse.ProtoReflect.Descriptor instead.
func (*GetCategoryResponse) GetCategory ¶
func (x *GetCategoryResponse) GetCategory() *Category
func (*GetCategoryResponse) ProtoMessage ¶
func (*GetCategoryResponse) ProtoMessage()
func (*GetCategoryResponse) ProtoReflect ¶
func (x *GetCategoryResponse) ProtoReflect() protoreflect.Message
func (*GetCategoryResponse) Reset ¶
func (x *GetCategoryResponse) Reset()
func (*GetCategoryResponse) String ¶
func (x *GetCategoryResponse) String() string
type UnimplementedCategoryServiceServer ¶
type UnimplementedCategoryServiceServer struct{}
UnimplementedCategoryServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedCategoryServiceServer) CreateCategory ¶
func (UnimplementedCategoryServiceServer) CreateCategory(context.Context, *CreateCategoryRequest) (*CreateCategoryResponse, error)
func (UnimplementedCategoryServiceServer) DeleteCategory ¶
func (UnimplementedCategoryServiceServer) DeleteCategory(context.Context, *DeleteCategoryRequest) (*DeleteCategoryResponse, error)
func (UnimplementedCategoryServiceServer) GetCategory ¶
func (UnimplementedCategoryServiceServer) GetCategory(context.Context, *GetCategoryRequest) (*GetCategoryResponse, error)
func (UnimplementedCategoryServiceServer) GetCategoryList ¶
func (UnimplementedCategoryServiceServer) GetCategoryList(context.Context, *GetCategoryListRequest) (*GetCategoryListResponse, error)
func (UnimplementedCategoryServiceServer) UpdateCategory ¶
func (UnimplementedCategoryServiceServer) UpdateCategory(context.Context, *UpdateCategoryRequest) (*UpdateCategoryResponse, error)
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.
type UpdateCategoryRequest ¶
type UpdateCategoryRequest struct { Category *Category `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` // contains filtered or unexported fields }
UpdateCategory
func (*UpdateCategoryRequest) Descriptor
deprecated
func (*UpdateCategoryRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateCategoryRequest.ProtoReflect.Descriptor instead.
func (*UpdateCategoryRequest) GetCategory ¶
func (x *UpdateCategoryRequest) GetCategory() *Category
func (*UpdateCategoryRequest) ProtoMessage ¶
func (*UpdateCategoryRequest) ProtoMessage()
func (*UpdateCategoryRequest) ProtoReflect ¶
func (x *UpdateCategoryRequest) ProtoReflect() protoreflect.Message
func (*UpdateCategoryRequest) Reset ¶
func (x *UpdateCategoryRequest) Reset()
func (*UpdateCategoryRequest) String ¶
func (x *UpdateCategoryRequest) String() string
type UpdateCategoryResponse ¶
type UpdateCategoryResponse struct {
// contains filtered or unexported fields
}
func (*UpdateCategoryResponse) Descriptor
deprecated
func (*UpdateCategoryResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateCategoryResponse.ProtoReflect.Descriptor instead.
func (*UpdateCategoryResponse) ProtoMessage ¶
func (*UpdateCategoryResponse) ProtoMessage()
func (*UpdateCategoryResponse) ProtoReflect ¶
func (x *UpdateCategoryResponse) ProtoReflect() protoreflect.Message
func (*UpdateCategoryResponse) Reset ¶
func (x *UpdateCategoryResponse) Reset()
func (*UpdateCategoryResponse) String ¶
func (x *UpdateCategoryResponse) String() string