Documentation ¶
Index ¶
- Variables
- func RegisterAdaCoreServiceServer(s *grpc.Server, srv AdaCoreServiceServer)
- type AdaCoreServiceClient
- type AdaCoreServiceServer
- type AdaCoreService_BuildWithMarkdownClient
- type AdaCoreService_BuildWithMarkdownServer
- type ChatBotData
- func (*ChatBotData) Descriptor() ([]byte, []int)deprecated
- func (x *ChatBotData) GetBuildNums() int64
- func (x *ChatBotData) GetDataNums() int64
- func (x *ChatBotData) GetPageNums() int64
- func (*ChatBotData) ProtoMessage()
- func (x *ChatBotData) ProtoReflect() protoreflect.Message
- func (x *ChatBotData) Reset()
- func (x *ChatBotData) String() string
- type MarkdownData
- func (*MarkdownData) Descriptor() ([]byte, []int)deprecated
- func (x *MarkdownData) GetBinaryData() map[string][]byte
- func (x *MarkdownData) GetCtrlKey() int32
- func (x *MarkdownData) GetExpireTime() int32
- func (x *MarkdownData) GetHashName() string
- func (x *MarkdownData) GetStrData() string
- func (x *MarkdownData) GetTemplateData() string
- func (x *MarkdownData) GetTemplateName() string
- func (*MarkdownData) ProtoMessage()
- func (x *MarkdownData) ProtoReflect() protoreflect.Message
- func (x *MarkdownData) Reset()
- func (x *MarkdownData) String() string
- type MarkdownStream
- func (*MarkdownStream) Descriptor() ([]byte, []int)deprecated
- func (x *MarkdownStream) GetCurLength() int32
- func (x *MarkdownStream) GetCurStart() int32
- func (x *MarkdownStream) GetData() []byte
- func (x *MarkdownStream) GetError() string
- func (x *MarkdownStream) GetHashData() string
- func (x *MarkdownStream) GetMarkdownData() *MarkdownData
- func (x *MarkdownStream) GetToken() string
- func (x *MarkdownStream) GetTotalHashData() string
- func (x *MarkdownStream) GetTotalLength() int32
- func (*MarkdownStream) ProtoMessage()
- func (x *MarkdownStream) ProtoReflect() protoreflect.Message
- func (x *MarkdownStream) Reset()
- func (x *MarkdownStream) String() string
- type ReplyMarkdown
- func (*ReplyMarkdown) Descriptor() ([]byte, []int)deprecated
- func (x *ReplyMarkdown) GetErr() string
- func (x *ReplyMarkdown) GetHashName() string
- func (x *ReplyMarkdown) GetLstRes() []*ResourceInfo
- func (x *ReplyMarkdown) GetUrl() string
- func (*ReplyMarkdown) ProtoMessage()
- func (x *ReplyMarkdown) ProtoReflect() protoreflect.Message
- func (x *ReplyMarkdown) Reset()
- func (x *ReplyMarkdown) String() string
- type ResourceInfo
- func (*ResourceInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceInfo) GetChildren() []string
- func (x *ResourceInfo) GetCitedTimes() int32
- func (x *ResourceInfo) GetCreateTime() int64
- func (x *ResourceInfo) GetCtrlKey() int32
- func (x *ResourceInfo) GetExpireTime() int32
- func (x *ResourceInfo) GetHashName() string
- func (x *ResourceInfo) GetType() ResourceType
- func (*ResourceInfo) ProtoMessage()
- func (x *ResourceInfo) ProtoReflect() protoreflect.Message
- func (x *ResourceInfo) Reset()
- func (x *ResourceInfo) String() string
- type ResourceType
- func (ResourceType) Descriptor() protoreflect.EnumDescriptor
- func (x ResourceType) Enum() *ResourceType
- func (ResourceType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResourceType) Number() protoreflect.EnumNumber
- func (x ResourceType) String() string
- func (ResourceType) Type() protoreflect.EnumType
- type TokenInfo
- func (*TokenInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TokenInfo) GetIsAllowTemplateData() bool
- func (x *TokenInfo) GetMaxExpireTime() int32
- func (x *TokenInfo) GetResNums() int32
- func (x *TokenInfo) GetTemplates() []string
- func (x *TokenInfo) GetToken() string
- func (*TokenInfo) ProtoMessage()
- func (x *TokenInfo) ProtoReflect() protoreflect.Message
- func (x *TokenInfo) Reset()
- func (x *TokenInfo) String() string
- type UnimplementedAdaCoreServiceServer
- type UserData
- func (*UserData) Descriptor() ([]byte, []int)deprecated
- func (x *UserData) GetBuildNums() int64
- func (x *UserData) GetDataNums() int64
- func (x *UserData) GetPageNums() int64
- func (x *UserData) GetToken() string
- func (*UserData) ProtoMessage()
- func (x *UserData) ProtoReflect() protoreflect.Message
- func (x *UserData) Reset()
- func (x *UserData) String() string
Constants ¶
This section is empty.
Variables ¶
var ( ResourceType_name = map[int32]string{ 0: "RT_PAGE", 1: "RT_OTHER", } ResourceType_value = map[string]int32{ "RT_PAGE": 0, "RT_OTHER": 1, } )
Enum value maps for ResourceType.
var File_adachatbot_proto protoreflect.FileDescriptor
var File_adacore_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAdaCoreServiceServer ¶
func RegisterAdaCoreServiceServer(s *grpc.Server, srv AdaCoreServiceServer)
Types ¶
type AdaCoreServiceClient ¶
type AdaCoreServiceClient interface { // buildWithMarkdown - build with markdown BuildWithMarkdown(ctx context.Context, opts ...grpc.CallOption) (AdaCoreService_BuildWithMarkdownClient, error) }
AdaCoreServiceClient is the client API for AdaCoreService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAdaCoreServiceClient ¶
func NewAdaCoreServiceClient(cc grpc.ClientConnInterface) AdaCoreServiceClient
type AdaCoreServiceServer ¶
type AdaCoreServiceServer interface { // buildWithMarkdown - build with markdown BuildWithMarkdown(AdaCoreService_BuildWithMarkdownServer) error }
AdaCoreServiceServer is the server API for AdaCoreService service.
type AdaCoreService_BuildWithMarkdownClient ¶
type AdaCoreService_BuildWithMarkdownClient interface { Send(*MarkdownStream) error CloseAndRecv() (*ReplyMarkdown, error) grpc.ClientStream }
type AdaCoreService_BuildWithMarkdownServer ¶
type AdaCoreService_BuildWithMarkdownServer interface { SendAndClose(*ReplyMarkdown) error Recv() (*MarkdownStream, error) grpc.ServerStream }
type ChatBotData ¶
type ChatBotData struct { DataNums int64 `protobuf:"varint,1,opt,name=dataNums,proto3" json:"dataNums,omitempty"` PageNums int64 `protobuf:"varint,2,opt,name=pageNums,proto3" json:"pageNums,omitempty"` BuildNums int64 `protobuf:"varint,3,opt,name=buildNums,proto3" json:"buildNums,omitempty"` // contains filtered or unexported fields }
ChatBotData - chatbot data
func (*ChatBotData) Descriptor
deprecated
func (*ChatBotData) Descriptor() ([]byte, []int)
Deprecated: Use ChatBotData.ProtoReflect.Descriptor instead.
func (*ChatBotData) GetBuildNums ¶
func (x *ChatBotData) GetBuildNums() int64
func (*ChatBotData) GetDataNums ¶
func (x *ChatBotData) GetDataNums() int64
func (*ChatBotData) GetPageNums ¶
func (x *ChatBotData) GetPageNums() int64
func (*ChatBotData) ProtoMessage ¶
func (*ChatBotData) ProtoMessage()
func (*ChatBotData) ProtoReflect ¶
func (x *ChatBotData) ProtoReflect() protoreflect.Message
func (*ChatBotData) Reset ¶
func (x *ChatBotData) Reset()
func (*ChatBotData) String ¶
func (x *ChatBotData) String() string
type MarkdownData ¶
type MarkdownData struct { // strData - markdown string data StrData string `protobuf:"bytes,1,opt,name=strData,proto3" json:"strData,omitempty"` // binaryData - binary data map, it's like images BinaryData map[string][]byte `` /* 161-byte string literal not displayed */ // hashName - hashname HashName string `protobuf:"bytes,3,opt,name=hashName,proto3" json:"hashName,omitempty"` // templateName - template Name TemplateName string `protobuf:"bytes,10,opt,name=templateName,proto3" json:"templateName,omitempty"` // templateData - template data TemplateData string `protobuf:"bytes,11,opt,name=templateData,proto3" json:"templateData,omitempty"` // expireTime - expire time in seconds ExpireTime int32 `protobuf:"varint,100,opt,name=expireTime,proto3" json:"expireTime,omitempty"` // ctrlKey - Control keys are generated and managed by the client CtrlKey int32 `protobuf:"varint,101,opt,name=ctrlKey,proto3" json:"ctrlKey,omitempty"` // contains filtered or unexported fields }
MarkdownData - markdown data
func (*MarkdownData) Descriptor
deprecated
func (*MarkdownData) Descriptor() ([]byte, []int)
Deprecated: Use MarkdownData.ProtoReflect.Descriptor instead.
func (*MarkdownData) GetBinaryData ¶
func (x *MarkdownData) GetBinaryData() map[string][]byte
func (*MarkdownData) GetCtrlKey ¶
func (x *MarkdownData) GetCtrlKey() int32
func (*MarkdownData) GetExpireTime ¶
func (x *MarkdownData) GetExpireTime() int32
func (*MarkdownData) GetHashName ¶
func (x *MarkdownData) GetHashName() string
func (*MarkdownData) GetStrData ¶
func (x *MarkdownData) GetStrData() string
func (*MarkdownData) GetTemplateData ¶
func (x *MarkdownData) GetTemplateData() string
func (*MarkdownData) GetTemplateName ¶
func (x *MarkdownData) GetTemplateName() string
func (*MarkdownData) ProtoMessage ¶
func (*MarkdownData) ProtoMessage()
func (*MarkdownData) ProtoReflect ¶
func (x *MarkdownData) ProtoReflect() protoreflect.Message
func (*MarkdownData) Reset ¶
func (x *MarkdownData) Reset()
func (*MarkdownData) String ¶
func (x *MarkdownData) String() string
type MarkdownStream ¶
type MarkdownStream struct { // totalLength - If the message is too long, it will send data in multiple msg, this is the total length. TotalLength int32 `protobuf:"varint,1,opt,name=totalLength,proto3" json:"totalLength,omitempty"` // curStart - The starting point of the current data (in bytes). CurStart int32 `protobuf:"varint,2,opt,name=curStart,proto3" json:"curStart,omitempty"` // curLength - The length of the current data (in bytes). CurLength int32 `protobuf:"varint,3,opt,name=curLength,proto3" json:"curLength,omitempty"` // hashData - This is the hash of each paragraph. HashData string `protobuf:"bytes,4,opt,name=hashData,proto3" json:"hashData,omitempty"` // totalHashData - If multiple messages return data, this is the hash value of all data, only sent in the last message. TotalHashData string `protobuf:"bytes,5,opt,name=totalHashData,proto3" json:"totalHashData,omitempty"` // data - binary data Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` // error - error string Error string `protobuf:"bytes,100,opt,name=error,proto3" json:"error,omitempty"` // markdownData - If the data does not exceed 4mb, this is the data that is directly available. MarkdownData *MarkdownData `protobuf:"bytes,200,opt,name=markdownData,proto3" json:"markdownData,omitempty"` // token - API token Token string `protobuf:"bytes,300,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
MarkdownStream - markdown stream data
func (*MarkdownStream) Descriptor
deprecated
func (*MarkdownStream) Descriptor() ([]byte, []int)
Deprecated: Use MarkdownStream.ProtoReflect.Descriptor instead.
func (*MarkdownStream) GetCurLength ¶
func (x *MarkdownStream) GetCurLength() int32
func (*MarkdownStream) GetCurStart ¶
func (x *MarkdownStream) GetCurStart() int32
func (*MarkdownStream) GetData ¶
func (x *MarkdownStream) GetData() []byte
func (*MarkdownStream) GetError ¶
func (x *MarkdownStream) GetError() string
func (*MarkdownStream) GetHashData ¶
func (x *MarkdownStream) GetHashData() string
func (*MarkdownStream) GetMarkdownData ¶
func (x *MarkdownStream) GetMarkdownData() *MarkdownData
func (*MarkdownStream) GetToken ¶
func (x *MarkdownStream) GetToken() string
func (*MarkdownStream) GetTotalHashData ¶
func (x *MarkdownStream) GetTotalHashData() string
func (*MarkdownStream) GetTotalLength ¶
func (x *MarkdownStream) GetTotalLength() int32
func (*MarkdownStream) ProtoMessage ¶
func (*MarkdownStream) ProtoMessage()
func (*MarkdownStream) ProtoReflect ¶
func (x *MarkdownStream) ProtoReflect() protoreflect.Message
func (*MarkdownStream) Reset ¶
func (x *MarkdownStream) Reset()
func (*MarkdownStream) String ¶
func (x *MarkdownStream) String() string
type ReplyMarkdown ¶
type ReplyMarkdown struct { // url - url Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // hashName - hashname HashName string `protobuf:"bytes,2,opt,name=hashName,proto3" json:"hashName,omitempty"` // lstRes - resource list LstRes []*ResourceInfo `protobuf:"bytes,10,rep,name=lstRes,proto3" json:"lstRes,omitempty"` // err - error Err string `protobuf:"bytes,100,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
ReplyMarkdown - reply
func (*ReplyMarkdown) Descriptor
deprecated
func (*ReplyMarkdown) Descriptor() ([]byte, []int)
Deprecated: Use ReplyMarkdown.ProtoReflect.Descriptor instead.
func (*ReplyMarkdown) GetErr ¶
func (x *ReplyMarkdown) GetErr() string
func (*ReplyMarkdown) GetHashName ¶
func (x *ReplyMarkdown) GetHashName() string
func (*ReplyMarkdown) GetLstRes ¶
func (x *ReplyMarkdown) GetLstRes() []*ResourceInfo
func (*ReplyMarkdown) GetUrl ¶
func (x *ReplyMarkdown) GetUrl() string
func (*ReplyMarkdown) ProtoMessage ¶
func (*ReplyMarkdown) ProtoMessage()
func (*ReplyMarkdown) ProtoReflect ¶
func (x *ReplyMarkdown) ProtoReflect() protoreflect.Message
func (*ReplyMarkdown) Reset ¶
func (x *ReplyMarkdown) Reset()
func (*ReplyMarkdown) String ¶
func (x *ReplyMarkdown) String() string
type ResourceInfo ¶
type ResourceInfo struct { // hashName - hashname HashName string `protobuf:"bytes,1,opt,name=hashName,proto3" json:"hashName,omitempty"` // citedTimes - cited times CitedTimes int32 `protobuf:"varint,2,opt,name=citedTimes,proto3" json:"citedTimes,omitempty"` // createTime - Creation time in seconds CreateTime int64 `protobuf:"varint,3,opt,name=createTime,proto3" json:"createTime,omitempty"` // type - resource type Type ResourceType `protobuf:"varint,4,opt,name=type,proto3,enum=adacorepb.ResourceType" json:"type,omitempty"` // children - children resource hashname Children []string `protobuf:"bytes,10,rep,name=children,proto3" json:"children,omitempty"` // expireTime - expire time in seconds ExpireTime int32 `protobuf:"varint,100,opt,name=expireTime,proto3" json:"expireTime,omitempty"` // ctrlKey - Control keys are generated and managed by the client CtrlKey int32 `protobuf:"varint,101,opt,name=ctrlKey,proto3" json:"ctrlKey,omitempty"` // contains filtered or unexported fields }
ResourceInfo - resource infomation
func (*ResourceInfo) Descriptor
deprecated
func (*ResourceInfo) Descriptor() ([]byte, []int)
Deprecated: Use ResourceInfo.ProtoReflect.Descriptor instead.
func (*ResourceInfo) GetChildren ¶
func (x *ResourceInfo) GetChildren() []string
func (*ResourceInfo) GetCitedTimes ¶
func (x *ResourceInfo) GetCitedTimes() int32
func (*ResourceInfo) GetCreateTime ¶
func (x *ResourceInfo) GetCreateTime() int64
func (*ResourceInfo) GetCtrlKey ¶
func (x *ResourceInfo) GetCtrlKey() int32
func (*ResourceInfo) GetExpireTime ¶
func (x *ResourceInfo) GetExpireTime() int32
func (*ResourceInfo) GetHashName ¶
func (x *ResourceInfo) GetHashName() string
func (*ResourceInfo) GetType ¶
func (x *ResourceInfo) GetType() ResourceType
func (*ResourceInfo) ProtoMessage ¶
func (*ResourceInfo) ProtoMessage()
func (*ResourceInfo) ProtoReflect ¶
func (x *ResourceInfo) ProtoReflect() protoreflect.Message
func (*ResourceInfo) Reset ¶
func (x *ResourceInfo) Reset()
func (*ResourceInfo) String ¶
func (x *ResourceInfo) String() string
type ResourceType ¶
type ResourceType int32
ResourceType - resource type
const ( // RT_PAGE - This is a page ResourceType_RT_PAGE ResourceType = 0 // RT_OTHER - This is other resource ResourceType_RT_OTHER ResourceType = 1 )
func (ResourceType) Descriptor ¶
func (ResourceType) Descriptor() protoreflect.EnumDescriptor
func (ResourceType) Enum ¶
func (x ResourceType) Enum() *ResourceType
func (ResourceType) EnumDescriptor
deprecated
func (ResourceType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ResourceType.Descriptor instead.
func (ResourceType) Number ¶
func (x ResourceType) Number() protoreflect.EnumNumber
func (ResourceType) String ¶
func (x ResourceType) String() string
func (ResourceType) Type ¶
func (ResourceType) Type() protoreflect.EnumType
type TokenInfo ¶
type TokenInfo struct { // token - token Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // maxExpireTime - max expire time in seconds MaxExpireTime int32 `protobuf:"varint,2,opt,name=maxExpireTime,proto3" json:"maxExpireTime,omitempty"` // isAllowTemplateData - Whether to allow templatedata IsAllowTemplateData bool `protobuf:"varint,3,opt,name=isAllowTemplateData,proto3" json:"isAllowTemplateData,omitempty"` // templates - This is all the templates available for this role. Templates []string `protobuf:"bytes,4,rep,name=templates,proto3" json:"templates,omitempty"` // resNums - This is the amount of resources available for this role ResNums int32 `protobuf:"varint,5,opt,name=resNums,proto3" json:"resNums,omitempty"` // contains filtered or unexported fields }
RoleInfo - role infomation
func (*TokenInfo) Descriptor
deprecated
func (*TokenInfo) GetIsAllowTemplateData ¶
func (*TokenInfo) GetMaxExpireTime ¶
func (*TokenInfo) GetResNums ¶
func (*TokenInfo) GetTemplates ¶
func (*TokenInfo) ProtoMessage ¶
func (*TokenInfo) ProtoMessage()
func (*TokenInfo) ProtoReflect ¶
func (x *TokenInfo) ProtoReflect() protoreflect.Message
type UnimplementedAdaCoreServiceServer ¶
type UnimplementedAdaCoreServiceServer struct { }
UnimplementedAdaCoreServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedAdaCoreServiceServer) BuildWithMarkdown ¶
func (*UnimplementedAdaCoreServiceServer) BuildWithMarkdown(AdaCoreService_BuildWithMarkdownServer) error
type UserData ¶
type UserData struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` DataNums int64 `protobuf:"varint,2,opt,name=dataNums,proto3" json:"dataNums,omitempty"` PageNums int64 `protobuf:"varint,3,opt,name=pageNums,proto3" json:"pageNums,omitempty"` BuildNums int64 `protobuf:"varint,4,opt,name=buildNums,proto3" json:"buildNums,omitempty"` // contains filtered or unexported fields }
UserData - user data
func (*UserData) Descriptor
deprecated
func (*UserData) GetBuildNums ¶
func (*UserData) GetDataNums ¶
func (*UserData) GetPageNums ¶
func (*UserData) ProtoMessage ¶
func (*UserData) ProtoMessage()
func (*UserData) ProtoReflect ¶
func (x *UserData) ProtoReflect() protoreflect.Message