Documentation ¶
Overview ¶
Package knowledge_base is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterKnowledgeBaseServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterKnowledgeBaseServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KnowledgeBaseServiceClient) error
- func RegisterKnowledgeBaseServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterKnowledgeBaseServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KnowledgeBaseServiceServer) error
- func RegisterKnowledgeBaseServiceServer(s grpc.ServiceRegistrar, srv KnowledgeBaseServiceServer)
- type CreateKnowledgeBaseRequest
- func (*CreateKnowledgeBaseRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateKnowledgeBaseRequest) GetDescription() string
- func (x *CreateKnowledgeBaseRequest) GetOwnerId() string
- func (x *CreateKnowledgeBaseRequest) GetTopic() string
- func (*CreateKnowledgeBaseRequest) ProtoMessage()
- func (x *CreateKnowledgeBaseRequest) ProtoReflect() protoreflect.Message
- func (x *CreateKnowledgeBaseRequest) Reset()
- func (x *CreateKnowledgeBaseRequest) String() string
- type CreateKnowledgeBaseResponse
- func (*CreateKnowledgeBaseResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateKnowledgeBaseResponse) GetKnowledgeBase() *common.KnowledgeBase
- func (*CreateKnowledgeBaseResponse) ProtoMessage()
- func (x *CreateKnowledgeBaseResponse) ProtoReflect() protoreflect.Message
- func (x *CreateKnowledgeBaseResponse) Reset()
- func (x *CreateKnowledgeBaseResponse) String() string
- type DeleteKnowledgeBaseByIdRequest
- func (*DeleteKnowledgeBaseByIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteKnowledgeBaseByIdRequest) GetId() string
- func (*DeleteKnowledgeBaseByIdRequest) ProtoMessage()
- func (x *DeleteKnowledgeBaseByIdRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteKnowledgeBaseByIdRequest) Reset()
- func (x *DeleteKnowledgeBaseByIdRequest) String() string
- type DeleteKnowledgeBaseByIdResponse
- func (*DeleteKnowledgeBaseByIdResponse) Descriptor() ([]byte, []int)deprecated
- func (*DeleteKnowledgeBaseByIdResponse) ProtoMessage()
- func (x *DeleteKnowledgeBaseByIdResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteKnowledgeBaseByIdResponse) Reset()
- func (x *DeleteKnowledgeBaseByIdResponse) String() string
- type GetKnowledgeBaseByIdRequest
- func (*GetKnowledgeBaseByIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetKnowledgeBaseByIdRequest) GetId() string
- func (*GetKnowledgeBaseByIdRequest) ProtoMessage()
- func (x *GetKnowledgeBaseByIdRequest) ProtoReflect() protoreflect.Message
- func (x *GetKnowledgeBaseByIdRequest) Reset()
- func (x *GetKnowledgeBaseByIdRequest) String() string
- type GetKnowledgeBaseByIdResponse
- func (*GetKnowledgeBaseByIdResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetKnowledgeBaseByIdResponse) GetKnowledgeBase() *common.KnowledgeBase
- func (*GetKnowledgeBaseByIdResponse) ProtoMessage()
- func (x *GetKnowledgeBaseByIdResponse) ProtoReflect() protoreflect.Message
- func (x *GetKnowledgeBaseByIdResponse) Reset()
- func (x *GetKnowledgeBaseByIdResponse) String() string
- type KnowledgeBaseServiceClient
- type KnowledgeBaseServiceServer
- type UnimplementedKnowledgeBaseServiceServer
- func (UnimplementedKnowledgeBaseServiceServer) CreateKnowledgeBase(context.Context, *CreateKnowledgeBaseRequest) (*CreateKnowledgeBaseResponse, error)
- func (UnimplementedKnowledgeBaseServiceServer) DeleteKnowledgeBaseById(context.Context, *DeleteKnowledgeBaseByIdRequest) (*DeleteKnowledgeBaseByIdResponse, error)
- func (UnimplementedKnowledgeBaseServiceServer) GetKnowledgeBaseById(context.Context, *GetKnowledgeBaseByIdRequest) (*GetKnowledgeBaseByIdResponse, error)
- type UnsafeKnowledgeBaseServiceServer
Constants ¶
const ( KnowledgeBaseService_CreateKnowledgeBase_FullMethodName = "/knowdateapp.knowledge.v1.knowledge_base.KnowledgeBaseService/CreateKnowledgeBase" KnowledgeBaseService_GetKnowledgeBaseById_FullMethodName = "/knowdateapp.knowledge.v1.knowledge_base.KnowledgeBaseService/GetKnowledgeBaseById" KnowledgeBaseService_DeleteKnowledgeBaseById_FullMethodName = "/knowdateapp.knowledge.v1.knowledge_base.KnowledgeBaseService/DeleteKnowledgeBaseById" )
Variables ¶
var File_api_v1_knowledge_base_knowledge_base_proto protoreflect.FileDescriptor
var KnowledgeBaseService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "knowdateapp.knowledge.v1.knowledge_base.KnowledgeBaseService", HandlerType: (*KnowledgeBaseServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateKnowledgeBase", Handler: _KnowledgeBaseService_CreateKnowledgeBase_Handler, }, { MethodName: "GetKnowledgeBaseById", Handler: _KnowledgeBaseService_GetKnowledgeBaseById_Handler, }, { MethodName: "DeleteKnowledgeBaseById", Handler: _KnowledgeBaseService_DeleteKnowledgeBaseById_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/knowledge_base/knowledge_base.proto", }
KnowledgeBaseService_ServiceDesc is the grpc.ServiceDesc for KnowledgeBaseService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKnowledgeBaseServiceHandler ¶
func RegisterKnowledgeBaseServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterKnowledgeBaseServiceHandler registers the http handlers for service KnowledgeBaseService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterKnowledgeBaseServiceHandlerClient ¶
func RegisterKnowledgeBaseServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KnowledgeBaseServiceClient) error
RegisterKnowledgeBaseServiceHandlerClient registers the http handlers for service KnowledgeBaseService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KnowledgeBaseServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KnowledgeBaseServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "KnowledgeBaseServiceClient" to call the correct interceptors.
func RegisterKnowledgeBaseServiceHandlerFromEndpoint ¶
func RegisterKnowledgeBaseServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterKnowledgeBaseServiceHandlerFromEndpoint is same as RegisterKnowledgeBaseServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterKnowledgeBaseServiceHandlerServer ¶
func RegisterKnowledgeBaseServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KnowledgeBaseServiceServer) error
RegisterKnowledgeBaseServiceHandlerServer registers the http handlers for service KnowledgeBaseService to "mux". UnaryRPC :call KnowledgeBaseServiceServer 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 RegisterKnowledgeBaseServiceHandlerFromEndpoint instead.
func RegisterKnowledgeBaseServiceServer ¶
func RegisterKnowledgeBaseServiceServer(s grpc.ServiceRegistrar, srv KnowledgeBaseServiceServer)
Types ¶
type CreateKnowledgeBaseRequest ¶
type CreateKnowledgeBaseRequest struct { OwnerId string `protobuf:"bytes,1,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // contains filtered or unexported fields }
func (*CreateKnowledgeBaseRequest) Descriptor
deprecated
func (*CreateKnowledgeBaseRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateKnowledgeBaseRequest.ProtoReflect.Descriptor instead.
func (*CreateKnowledgeBaseRequest) GetDescription ¶
func (x *CreateKnowledgeBaseRequest) GetDescription() string
func (*CreateKnowledgeBaseRequest) GetOwnerId ¶
func (x *CreateKnowledgeBaseRequest) GetOwnerId() string
func (*CreateKnowledgeBaseRequest) GetTopic ¶
func (x *CreateKnowledgeBaseRequest) GetTopic() string
func (*CreateKnowledgeBaseRequest) ProtoMessage ¶
func (*CreateKnowledgeBaseRequest) ProtoMessage()
func (*CreateKnowledgeBaseRequest) ProtoReflect ¶
func (x *CreateKnowledgeBaseRequest) ProtoReflect() protoreflect.Message
func (*CreateKnowledgeBaseRequest) Reset ¶
func (x *CreateKnowledgeBaseRequest) Reset()
func (*CreateKnowledgeBaseRequest) String ¶
func (x *CreateKnowledgeBaseRequest) String() string
type CreateKnowledgeBaseResponse ¶
type CreateKnowledgeBaseResponse struct { KnowledgeBase *common.KnowledgeBase `protobuf:"bytes,1,opt,name=knowledge_base,json=knowledgeBase,proto3" json:"knowledge_base,omitempty"` // contains filtered or unexported fields }
func (*CreateKnowledgeBaseResponse) Descriptor
deprecated
func (*CreateKnowledgeBaseResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateKnowledgeBaseResponse.ProtoReflect.Descriptor instead.
func (*CreateKnowledgeBaseResponse) GetKnowledgeBase ¶
func (x *CreateKnowledgeBaseResponse) GetKnowledgeBase() *common.KnowledgeBase
func (*CreateKnowledgeBaseResponse) ProtoMessage ¶
func (*CreateKnowledgeBaseResponse) ProtoMessage()
func (*CreateKnowledgeBaseResponse) ProtoReflect ¶
func (x *CreateKnowledgeBaseResponse) ProtoReflect() protoreflect.Message
func (*CreateKnowledgeBaseResponse) Reset ¶
func (x *CreateKnowledgeBaseResponse) Reset()
func (*CreateKnowledgeBaseResponse) String ¶
func (x *CreateKnowledgeBaseResponse) String() string
type DeleteKnowledgeBaseByIdRequest ¶
type DeleteKnowledgeBaseByIdRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteKnowledgeBaseByIdRequest) Descriptor
deprecated
func (*DeleteKnowledgeBaseByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteKnowledgeBaseByIdRequest.ProtoReflect.Descriptor instead.
func (*DeleteKnowledgeBaseByIdRequest) GetId ¶
func (x *DeleteKnowledgeBaseByIdRequest) GetId() string
func (*DeleteKnowledgeBaseByIdRequest) ProtoMessage ¶
func (*DeleteKnowledgeBaseByIdRequest) ProtoMessage()
func (*DeleteKnowledgeBaseByIdRequest) ProtoReflect ¶
func (x *DeleteKnowledgeBaseByIdRequest) ProtoReflect() protoreflect.Message
func (*DeleteKnowledgeBaseByIdRequest) Reset ¶
func (x *DeleteKnowledgeBaseByIdRequest) Reset()
func (*DeleteKnowledgeBaseByIdRequest) String ¶
func (x *DeleteKnowledgeBaseByIdRequest) String() string
type DeleteKnowledgeBaseByIdResponse ¶
type DeleteKnowledgeBaseByIdResponse struct {
// contains filtered or unexported fields
}
func (*DeleteKnowledgeBaseByIdResponse) Descriptor
deprecated
func (*DeleteKnowledgeBaseByIdResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteKnowledgeBaseByIdResponse.ProtoReflect.Descriptor instead.
func (*DeleteKnowledgeBaseByIdResponse) ProtoMessage ¶
func (*DeleteKnowledgeBaseByIdResponse) ProtoMessage()
func (*DeleteKnowledgeBaseByIdResponse) ProtoReflect ¶
func (x *DeleteKnowledgeBaseByIdResponse) ProtoReflect() protoreflect.Message
func (*DeleteKnowledgeBaseByIdResponse) Reset ¶
func (x *DeleteKnowledgeBaseByIdResponse) Reset()
func (*DeleteKnowledgeBaseByIdResponse) String ¶
func (x *DeleteKnowledgeBaseByIdResponse) String() string
type GetKnowledgeBaseByIdRequest ¶
type GetKnowledgeBaseByIdRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetKnowledgeBaseByIdRequest) Descriptor
deprecated
func (*GetKnowledgeBaseByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetKnowledgeBaseByIdRequest.ProtoReflect.Descriptor instead.
func (*GetKnowledgeBaseByIdRequest) GetId ¶
func (x *GetKnowledgeBaseByIdRequest) GetId() string
func (*GetKnowledgeBaseByIdRequest) ProtoMessage ¶
func (*GetKnowledgeBaseByIdRequest) ProtoMessage()
func (*GetKnowledgeBaseByIdRequest) ProtoReflect ¶
func (x *GetKnowledgeBaseByIdRequest) ProtoReflect() protoreflect.Message
func (*GetKnowledgeBaseByIdRequest) Reset ¶
func (x *GetKnowledgeBaseByIdRequest) Reset()
func (*GetKnowledgeBaseByIdRequest) String ¶
func (x *GetKnowledgeBaseByIdRequest) String() string
type GetKnowledgeBaseByIdResponse ¶
type GetKnowledgeBaseByIdResponse struct { KnowledgeBase *common.KnowledgeBase `protobuf:"bytes,1,opt,name=knowledge_base,json=knowledgeBase,proto3" json:"knowledge_base,omitempty"` // contains filtered or unexported fields }
func (*GetKnowledgeBaseByIdResponse) Descriptor
deprecated
func (*GetKnowledgeBaseByIdResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetKnowledgeBaseByIdResponse.ProtoReflect.Descriptor instead.
func (*GetKnowledgeBaseByIdResponse) GetKnowledgeBase ¶
func (x *GetKnowledgeBaseByIdResponse) GetKnowledgeBase() *common.KnowledgeBase
func (*GetKnowledgeBaseByIdResponse) ProtoMessage ¶
func (*GetKnowledgeBaseByIdResponse) ProtoMessage()
func (*GetKnowledgeBaseByIdResponse) ProtoReflect ¶
func (x *GetKnowledgeBaseByIdResponse) ProtoReflect() protoreflect.Message
func (*GetKnowledgeBaseByIdResponse) Reset ¶
func (x *GetKnowledgeBaseByIdResponse) Reset()
func (*GetKnowledgeBaseByIdResponse) String ¶
func (x *GetKnowledgeBaseByIdResponse) String() string
type KnowledgeBaseServiceClient ¶
type KnowledgeBaseServiceClient interface { CreateKnowledgeBase(ctx context.Context, in *CreateKnowledgeBaseRequest, opts ...grpc.CallOption) (*CreateKnowledgeBaseResponse, error) GetKnowledgeBaseById(ctx context.Context, in *GetKnowledgeBaseByIdRequest, opts ...grpc.CallOption) (*GetKnowledgeBaseByIdResponse, error) DeleteKnowledgeBaseById(ctx context.Context, in *DeleteKnowledgeBaseByIdRequest, opts ...grpc.CallOption) (*DeleteKnowledgeBaseByIdResponse, error) }
KnowledgeBaseServiceClient is the client API for KnowledgeBaseService 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 NewKnowledgeBaseServiceClient ¶
func NewKnowledgeBaseServiceClient(cc grpc.ClientConnInterface) KnowledgeBaseServiceClient
type KnowledgeBaseServiceServer ¶
type KnowledgeBaseServiceServer interface { CreateKnowledgeBase(context.Context, *CreateKnowledgeBaseRequest) (*CreateKnowledgeBaseResponse, error) GetKnowledgeBaseById(context.Context, *GetKnowledgeBaseByIdRequest) (*GetKnowledgeBaseByIdResponse, error) DeleteKnowledgeBaseById(context.Context, *DeleteKnowledgeBaseByIdRequest) (*DeleteKnowledgeBaseByIdResponse, error) // contains filtered or unexported methods }
KnowledgeBaseServiceServer is the server API for KnowledgeBaseService service. All implementations must embed UnimplementedKnowledgeBaseServiceServer for forward compatibility
type UnimplementedKnowledgeBaseServiceServer ¶
type UnimplementedKnowledgeBaseServiceServer struct { }
UnimplementedKnowledgeBaseServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedKnowledgeBaseServiceServer) CreateKnowledgeBase ¶
func (UnimplementedKnowledgeBaseServiceServer) CreateKnowledgeBase(context.Context, *CreateKnowledgeBaseRequest) (*CreateKnowledgeBaseResponse, error)
func (UnimplementedKnowledgeBaseServiceServer) DeleteKnowledgeBaseById ¶
func (UnimplementedKnowledgeBaseServiceServer) DeleteKnowledgeBaseById(context.Context, *DeleteKnowledgeBaseByIdRequest) (*DeleteKnowledgeBaseByIdResponse, error)
func (UnimplementedKnowledgeBaseServiceServer) GetKnowledgeBaseById ¶
func (UnimplementedKnowledgeBaseServiceServer) GetKnowledgeBaseById(context.Context, *GetKnowledgeBaseByIdRequest) (*GetKnowledgeBaseByIdResponse, error)
type UnsafeKnowledgeBaseServiceServer ¶
type UnsafeKnowledgeBaseServiceServer interface {
// contains filtered or unexported methods
}
UnsafeKnowledgeBaseServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KnowledgeBaseServiceServer will result in compilation errors.