Documentation ¶
Overview ¶
Package wikiv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterWikiServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterWikiServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WikiServiceClient) error
- func RegisterWikiServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterWikiServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WikiServiceServer) error
- func RegisterWikiServiceServer(s grpc.ServiceRegistrar, srv WikiServiceServer)
- type GetDocContentRequest
- func (*GetDocContentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetDocContentRequest) GetToken() string
- func (*GetDocContentRequest) ProtoMessage()
- func (x *GetDocContentRequest) ProtoReflect() protoreflect.Message
- func (x *GetDocContentRequest) Reset()
- func (x *GetDocContentRequest) String() string
- type GetDocContentResponse
- func (*GetDocContentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetDocContentResponse) GetContent() string
- func (x *GetDocContentResponse) GetRevision() int32
- func (*GetDocContentResponse) ProtoMessage()
- func (x *GetDocContentResponse) ProtoReflect() protoreflect.Message
- func (x *GetDocContentResponse) Reset()
- func (x *GetDocContentResponse) String() string
- type GetNodeListRequest
- func (*GetNodeListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetNodeListRequest) GetParentNodeToken() string
- func (x *GetNodeListRequest) GetSpaceId() string
- func (*GetNodeListRequest) ProtoMessage()
- func (x *GetNodeListRequest) ProtoReflect() protoreflect.Message
- func (x *GetNodeListRequest) Reset()
- func (x *GetNodeListRequest) String() string
- type GetNodeListResponse
- func (*GetNodeListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetNodeListResponse) GetHasMore() bool
- func (x *GetNodeListResponse) GetItems() []*NodeItem
- func (x *GetNodeListResponse) GetPageToken() string
- func (*GetNodeListResponse) ProtoMessage()
- func (x *GetNodeListResponse) ProtoReflect() protoreflect.Message
- func (x *GetNodeListResponse) Reset()
- func (x *GetNodeListResponse) String() string
- type NodeItem
- func (*NodeItem) Descriptor() ([]byte, []int)deprecated
- func (x *NodeItem) GetHasChild() bool
- func (x *NodeItem) GetNodeCreateTime() string
- func (x *NodeItem) GetNodeToken() string
- func (x *NodeItem) GetNodeType() string
- func (x *NodeItem) GetObjCreateTime() string
- func (x *NodeItem) GetObjEditTime() string
- func (x *NodeItem) GetObjToken() string
- func (x *NodeItem) GetObjType() string
- func (x *NodeItem) GetOriginNodeToken() string
- func (x *NodeItem) GetOriginSpaceId() string
- func (x *NodeItem) GetParentNodeToken() string
- func (x *NodeItem) GetSpaceId() string
- func (x *NodeItem) GetSubNode() []*NodeItem
- func (x *NodeItem) GetTitle() string
- func (*NodeItem) ProtoMessage()
- func (x *NodeItem) ProtoReflect() protoreflect.Message
- func (x *NodeItem) Reset()
- func (x *NodeItem) String() string
- type UnimplementedWikiServiceServer
- type UnsafeWikiServiceServer
- type WikiServiceClient
- type WikiServiceServer
Constants ¶
const ( WikiService_GetDocContent_FullMethodName = "/consultingapis.wiki.v1.WikiService/GetDocContent" WikiService_GetNodeList_FullMethodName = "/consultingapis.wiki.v1.WikiService/GetNodeList" )
Variables ¶
var File_consultingapis_wiki_v1_wiki_proto protoreflect.FileDescriptor
var WikiService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "consultingapis.wiki.v1.WikiService", HandlerType: (*WikiServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetDocContent", Handler: _WikiService_GetDocContent_Handler, }, { MethodName: "GetNodeList", Handler: _WikiService_GetNodeList_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "consultingapis/wiki/v1/wiki.proto", }
WikiService_ServiceDesc is the grpc.ServiceDesc for WikiService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWikiServiceHandler ¶
func RegisterWikiServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterWikiServiceHandler registers the http handlers for service WikiService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterWikiServiceHandlerClient ¶
func RegisterWikiServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WikiServiceClient) error
RegisterWikiServiceHandlerClient registers the http handlers for service WikiService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WikiServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WikiServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "WikiServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterWikiServiceHandlerFromEndpoint ¶
func RegisterWikiServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterWikiServiceHandlerFromEndpoint is same as RegisterWikiServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterWikiServiceHandlerServer ¶
func RegisterWikiServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WikiServiceServer) error
RegisterWikiServiceHandlerServer registers the http handlers for service WikiService to "mux". UnaryRPC :call WikiServiceServer 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 RegisterWikiServiceHandlerFromEndpoint 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 RegisterWikiServiceServer ¶
func RegisterWikiServiceServer(s grpc.ServiceRegistrar, srv WikiServiceServer)
Types ¶
type GetDocContentRequest ¶
type GetDocContentRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*GetDocContentRequest) Descriptor
deprecated
func (*GetDocContentRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetDocContentRequest.ProtoReflect.Descriptor instead.
func (*GetDocContentRequest) GetToken ¶
func (x *GetDocContentRequest) GetToken() string
func (*GetDocContentRequest) ProtoMessage ¶
func (*GetDocContentRequest) ProtoMessage()
func (*GetDocContentRequest) ProtoReflect ¶
func (x *GetDocContentRequest) ProtoReflect() protoreflect.Message
func (*GetDocContentRequest) Reset ¶
func (x *GetDocContentRequest) Reset()
func (*GetDocContentRequest) String ¶
func (x *GetDocContentRequest) String() string
type GetDocContentResponse ¶
type GetDocContentResponse struct { Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` Revision int32 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"` // contains filtered or unexported fields }
func (*GetDocContentResponse) Descriptor
deprecated
func (*GetDocContentResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetDocContentResponse.ProtoReflect.Descriptor instead.
func (*GetDocContentResponse) GetContent ¶
func (x *GetDocContentResponse) GetContent() string
func (*GetDocContentResponse) GetRevision ¶
func (x *GetDocContentResponse) GetRevision() int32
func (*GetDocContentResponse) ProtoMessage ¶
func (*GetDocContentResponse) ProtoMessage()
func (*GetDocContentResponse) ProtoReflect ¶
func (x *GetDocContentResponse) ProtoReflect() protoreflect.Message
func (*GetDocContentResponse) Reset ¶
func (x *GetDocContentResponse) Reset()
func (*GetDocContentResponse) String ¶
func (x *GetDocContentResponse) String() string
type GetNodeListRequest ¶
type GetNodeListRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=space_id,json=spaceId,proto3" json:"space_id,omitempty"` ParentNodeToken string `protobuf:"bytes,2,opt,name=parent_node_token,json=parentNodeToken,proto3" json:"parent_node_token,omitempty"` // contains filtered or unexported fields }
func (*GetNodeListRequest) Descriptor
deprecated
func (*GetNodeListRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetNodeListRequest.ProtoReflect.Descriptor instead.
func (*GetNodeListRequest) GetParentNodeToken ¶
func (x *GetNodeListRequest) GetParentNodeToken() string
func (*GetNodeListRequest) GetSpaceId ¶
func (x *GetNodeListRequest) GetSpaceId() string
func (*GetNodeListRequest) ProtoMessage ¶
func (*GetNodeListRequest) ProtoMessage()
func (*GetNodeListRequest) ProtoReflect ¶
func (x *GetNodeListRequest) ProtoReflect() protoreflect.Message
func (*GetNodeListRequest) Reset ¶
func (x *GetNodeListRequest) Reset()
func (*GetNodeListRequest) String ¶
func (x *GetNodeListRequest) String() string
type GetNodeListResponse ¶
type GetNodeListResponse struct { Items []*NodeItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` HasMore bool `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"` // contains filtered or unexported fields }
func (*GetNodeListResponse) Descriptor
deprecated
func (*GetNodeListResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetNodeListResponse.ProtoReflect.Descriptor instead.
func (*GetNodeListResponse) GetHasMore ¶
func (x *GetNodeListResponse) GetHasMore() bool
func (*GetNodeListResponse) GetItems ¶
func (x *GetNodeListResponse) GetItems() []*NodeItem
func (*GetNodeListResponse) GetPageToken ¶
func (x *GetNodeListResponse) GetPageToken() string
func (*GetNodeListResponse) ProtoMessage ¶
func (*GetNodeListResponse) ProtoMessage()
func (*GetNodeListResponse) ProtoReflect ¶
func (x *GetNodeListResponse) ProtoReflect() protoreflect.Message
func (*GetNodeListResponse) Reset ¶
func (x *GetNodeListResponse) Reset()
func (*GetNodeListResponse) String ¶
func (x *GetNodeListResponse) String() string
type NodeItem ¶
type NodeItem struct { SpaceId string `protobuf:"bytes,1,opt,name=space_id,json=spaceId,proto3" json:"space_id,omitempty"` NodeToken string `protobuf:"bytes,2,opt,name=node_token,json=nodeToken,proto3" json:"node_token,omitempty"` ObjToken string `protobuf:"bytes,3,opt,name=obj_token,json=objToken,proto3" json:"obj_token,omitempty"` ObjType string `protobuf:"bytes,4,opt,name=obj_type,json=objType,proto3" json:"obj_type,omitempty"` ParentNodeToken string `protobuf:"bytes,5,opt,name=parent_node_token,json=parentNodeToken,proto3" json:"parent_node_token,omitempty"` NodeType string `protobuf:"bytes,6,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"` OriginNodeToken string `protobuf:"bytes,7,opt,name=origin_node_token,json=originNodeToken,proto3" json:"origin_node_token,omitempty"` OriginSpaceId string `protobuf:"bytes,8,opt,name=origin_space_id,json=originSpaceId,proto3" json:"origin_space_id,omitempty"` HasChild bool `protobuf:"varint,9,opt,name=has_child,json=hasChild,proto3" json:"has_child,omitempty"` Title string `protobuf:"bytes,10,opt,name=title,proto3" json:"title,omitempty"` ObjCreateTime string `protobuf:"bytes,11,opt,name=obj_create_time,json=objCreateTime,proto3" json:"obj_create_time,omitempty"` ObjEditTime string `protobuf:"bytes,12,opt,name=obj_edit_time,json=objEditTime,proto3" json:"obj_edit_time,omitempty"` NodeCreateTime string `protobuf:"bytes,13,opt,name=node_create_time,json=nodeCreateTime,proto3" json:"node_create_time,omitempty"` SubNode []*NodeItem `protobuf:"bytes,14,rep,name=subNode,proto3" json:"subNode,omitempty"` // contains filtered or unexported fields }
func (*NodeItem) Descriptor
deprecated
func (*NodeItem) GetHasChild ¶
func (*NodeItem) GetNodeCreateTime ¶
func (*NodeItem) GetNodeToken ¶
func (*NodeItem) GetNodeType ¶
func (*NodeItem) GetObjCreateTime ¶
func (*NodeItem) GetObjEditTime ¶
func (*NodeItem) GetObjToken ¶
func (*NodeItem) GetObjType ¶
func (*NodeItem) GetOriginNodeToken ¶
func (*NodeItem) GetOriginSpaceId ¶
func (*NodeItem) GetParentNodeToken ¶
func (*NodeItem) GetSpaceId ¶
func (*NodeItem) GetSubNode ¶
func (*NodeItem) ProtoMessage ¶
func (*NodeItem) ProtoMessage()
func (*NodeItem) ProtoReflect ¶
func (x *NodeItem) ProtoReflect() protoreflect.Message
type UnimplementedWikiServiceServer ¶
type UnimplementedWikiServiceServer struct{}
UnimplementedWikiServiceServer 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 (UnimplementedWikiServiceServer) GetDocContent ¶
func (UnimplementedWikiServiceServer) GetDocContent(context.Context, *GetDocContentRequest) (*GetDocContentResponse, error)
func (UnimplementedWikiServiceServer) GetNodeList ¶
func (UnimplementedWikiServiceServer) GetNodeList(context.Context, *GetNodeListRequest) (*GetNodeListResponse, error)
type UnsafeWikiServiceServer ¶
type UnsafeWikiServiceServer interface {
// contains filtered or unexported methods
}
UnsafeWikiServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WikiServiceServer will result in compilation errors.
type WikiServiceClient ¶
type WikiServiceClient interface { GetDocContent(ctx context.Context, in *GetDocContentRequest, opts ...grpc.CallOption) (*GetDocContentResponse, error) GetNodeList(ctx context.Context, in *GetNodeListRequest, opts ...grpc.CallOption) (*GetNodeListResponse, error) }
WikiServiceClient is the client API for WikiService 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 NewWikiServiceClient ¶
func NewWikiServiceClient(cc grpc.ClientConnInterface) WikiServiceClient
type WikiServiceServer ¶
type WikiServiceServer interface { GetDocContent(context.Context, *GetDocContentRequest) (*GetDocContentResponse, error) GetNodeList(context.Context, *GetNodeListRequest) (*GetNodeListResponse, error) // contains filtered or unexported methods }
WikiServiceServer is the server API for WikiService service. All implementations must embed UnimplementedWikiServiceServer for forward compatibility.