wikiv1

package
v0.0.0-...-a9153d3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package wikiv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	WikiService_GetDocContent_FullMethodName = "/consultingapis.wiki.v1.WikiService/GetDocContent"
	WikiService_GetNodeList_FullMethodName   = "/consultingapis.wiki.v1.WikiService/GetNodeList"
)

Variables

View Source
var File_consultingapis_wiki_v1_wiki_proto protoreflect.FileDescriptor
View Source
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.

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use NodeItem.ProtoReflect.Descriptor instead.

func (*NodeItem) GetHasChild

func (x *NodeItem) GetHasChild() bool

func (*NodeItem) GetNodeCreateTime

func (x *NodeItem) GetNodeCreateTime() string

func (*NodeItem) GetNodeToken

func (x *NodeItem) GetNodeToken() string

func (*NodeItem) GetNodeType

func (x *NodeItem) GetNodeType() string

func (*NodeItem) GetObjCreateTime

func (x *NodeItem) GetObjCreateTime() string

func (*NodeItem) GetObjEditTime

func (x *NodeItem) GetObjEditTime() string

func (*NodeItem) GetObjToken

func (x *NodeItem) GetObjToken() string

func (*NodeItem) GetObjType

func (x *NodeItem) GetObjType() string

func (*NodeItem) GetOriginNodeToken

func (x *NodeItem) GetOriginNodeToken() string

func (*NodeItem) GetOriginSpaceId

func (x *NodeItem) GetOriginSpaceId() string

func (*NodeItem) GetParentNodeToken

func (x *NodeItem) GetParentNodeToken() string

func (*NodeItem) GetSpaceId

func (x *NodeItem) GetSpaceId() string

func (*NodeItem) GetSubNode

func (x *NodeItem) GetSubNode() []*NodeItem

func (*NodeItem) GetTitle

func (x *NodeItem) GetTitle() string

func (*NodeItem) ProtoMessage

func (*NodeItem) ProtoMessage()

func (*NodeItem) ProtoReflect

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

func (*NodeItem) Reset

func (x *NodeItem) Reset()

func (*NodeItem) String

func (x *NodeItem) String() string

type UnimplementedWikiServiceServer

type UnimplementedWikiServiceServer struct {
}

UnimplementedWikiServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedWikiServiceServer) GetDocContent

func (UnimplementedWikiServiceServer) GetNodeList

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.

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

Jump to

Keyboard shortcuts

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