Documentation
¶
Index ¶
- type Address
- type AddressOptions
- type BatchRequestPayload
- type BatchRequestPayloadWithStringData
- type Color
- type Condition
- type ConfigSpiderData
- type DataField
- type DocItem
- type ElasticsearchResponseData
- type EventData
- type Export
- func (e *Export) GetDownloadPath() string
- func (e *Export) GetEndTs() time.Time
- func (e *Export) GetFilter() interfaces.Filter
- func (e *Export) GetId() string
- func (e *Export) GetStartTs() time.Time
- func (e *Export) GetStatus() string
- func (e *Export) GetTarget() string
- func (e *Export) GetType() string
- type Field
- type FileRequestPayload
- type Filter
- type FilterSelectOption
- type FsFileInfo
- func (f *FsFileInfo) GetChildren() []interfaces.FsFileInfo
- func (f *FsFileInfo) GetExtension() string
- func (f *FsFileInfo) GetFileSize() int64
- func (f *FsFileInfo) GetFullPath() string
- func (f *FsFileInfo) GetIsDir() bool
- func (f *FsFileInfo) GetMd5() string
- func (f *FsFileInfo) GetName() string
- func (f *FsFileInfo) GetPath() string
- type GitConfig
- type GitPayload
- type GrpcBaseServiceMessage
- type GrpcBaseServiceParams
- type GrpcDelegateMessage
- type GrpcEventServiceMessage
- type GrpcSubscribe
- type ListRequestData
- type ListResponse
- type ModelDelegate
- type ModelInfo
- type NodeInfo
- type Page
- type Pagination
- type PluginEventKey
- type PluginSetting
- type PluginSubStatus
- type PluginUIAsset
- type PluginUIComponent
- type PluginUINav
- type PublicPlugin
- type Release
- type ReleaseSlices
- type Response
- type Result
- func (r Result) Bytes() (bytes []byte)
- func (r Result) DenormalizeObjectId() (res Result)
- func (r Result) Flatten() (res Result)
- func (r Result) GetTaskId() (id primitive.ObjectID)
- func (r Result) GetValue(key string) (value interface{})
- func (r Result) SetTaskId(id primitive.ObjectID)
- func (r Result) SetValue(key string, value interface{})
- func (r Result) String() (s string)
- func (r Result) ToJSON() (res Result)
- func (r Result) Value() map[string]interface{}
- type RpcMessage
- type ScrapyItem
- type ScrapySettingParam
- type Sort
- type SpiderType
- type Stage
- type StatsDailyItem
- type StatsTasksByStatusItem
- type StreamMessageTaskData
- type SystemInfo
- type TTLMap
- type TaskMessage
- type TaskRunOptions
- type Translation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶ added in v0.6.0
func NewAddress ¶ added in v0.6.0
func NewAddress(opts *AddressOptions) (res *Address)
func NewAddressFromString ¶ added in v0.6.0
type AddressOptions ¶ added in v0.6.0
type BatchRequestPayload ¶ added in v0.6.0
type BatchRequestPayloadWithStringData ¶ added in v0.6.0
type Condition ¶ added in v0.6.0
type ConfigSpiderData ¶
type ConfigSpiderData struct {
// 通用
Name string `yaml:"name" json:"name"`
DisplayName string `yaml:"display_name" json:"display_name"`
Col string `yaml:"col" json:"col"`
Remark string `yaml:"remark" json:"remark"`
Type string `yaml:"type" bson:"type"`
// 可配置爬虫
Engine string `yaml:"engine" json:"engine"`
StartUrl string `yaml:"start_url" json:"start_url"`
StartStage string `yaml:"start_stage" json:"start_stage"`
Stages []Stage `yaml:"stages" json:"stages"`
Settings map[string]string `yaml:"settings" json:"settings"`
// 自定义爬虫
Cmd string `yaml:"cmd" json:"cmd"`
}
type ElasticsearchResponseData ¶ added in v0.6.2
type ElasticsearchResponseData struct {
Took int64 `json:"took"`
Timeout bool `json:"timeout"`
Hits struct {
Total struct {
Value int64 `json:"value"`
Relation string `json:"relation"`
} `json:"total"`
MaxScore float64 `json:"max_score"`
Hits []struct {
Index string `json:"_index"`
Id string `json:"_id"`
Score float64 `json:"_score"`
Source interface{} `json:"_source"`
} `json:"hits"`
} `json:"hits"`
}
type Export ¶ added in v0.6.1
type Export struct {
Id string `json:"id"`
Type string `json:"type"`
Target string `json:"target"`
Filter interfaces.Filter `json:"filter"`
Status string `json:"status"`
StartTs time.Time `json:"start_ts"`
EndTs time.Time `json:"end_ts"`
FileName string `json:"file_name"`
DownloadPath string `json:"-"`
Limit int `json:"-"`
}
func (*Export) GetDownloadPath ¶ added in v0.6.1
func (*Export) GetFilter ¶ added in v0.6.1
func (e *Export) GetFilter() interfaces.Filter
func (*Export) GetStartTs ¶ added in v0.6.1
type FileRequestPayload ¶ added in v0.6.0
type Filter ¶ added in v0.6.0
type Filter struct {
IsOr bool `form:"is_or" url:"is_or"`
Conditions []*Condition `json:"conditions"`
}
func (*Filter) GetConditions ¶ added in v0.6.1
func (f *Filter) GetConditions() (conditions []interfaces.FilterCondition)
func (*Filter) SetConditions ¶ added in v0.6.1
func (f *Filter) SetConditions(conditions []interfaces.FilterCondition)
type FilterSelectOption ¶ added in v0.6.1
type FilterSelectOption struct {
Value interface{} `json:"value" bson:"value"`
Label string `json:"label" bson:"label"`
}
type FsFileInfo ¶ added in v0.6.0
type FsFileInfo struct {
Name string `json:"name"` // file name
Path string `json:"path"` // file path
FullPath string `json:"full_path"` // file full path
Extension string `json:"extension"` // file extension
Md5 string `json:"md5"` // MD5 hash
IsDir bool `json:"is_dir"` // whether it is directory
FileSize int64 `json:"file_size"` // file size (bytes)
Children []interfaces.FsFileInfo `json:"children"` // children for sub-directory
}
func (*FsFileInfo) GetChildren ¶ added in v0.6.0
func (f *FsFileInfo) GetChildren() []interfaces.FsFileInfo
func (*FsFileInfo) GetExtension ¶ added in v0.6.0
func (f *FsFileInfo) GetExtension() string
func (*FsFileInfo) GetFileSize ¶ added in v0.6.0
func (f *FsFileInfo) GetFileSize() int64
func (*FsFileInfo) GetFullPath ¶ added in v0.6.0
func (f *FsFileInfo) GetFullPath() string
func (*FsFileInfo) GetIsDir ¶ added in v0.6.0
func (f *FsFileInfo) GetIsDir() bool
func (*FsFileInfo) GetMd5 ¶ added in v0.6.0
func (f *FsFileInfo) GetMd5() string
func (*FsFileInfo) GetName ¶ added in v0.6.0
func (f *FsFileInfo) GetName() string
func (*FsFileInfo) GetPath ¶ added in v0.6.0
func (f *FsFileInfo) GetPath() string
type GitPayload ¶ added in v0.6.0
type GrpcBaseServiceMessage ¶ added in v0.6.0
type GrpcBaseServiceMessage struct {
ModelId interfaces.ModelId `json:"id"`
Data []byte `json:"d"`
}
func (*GrpcBaseServiceMessage) GetData ¶ added in v0.6.0
func (msg *GrpcBaseServiceMessage) GetData() []byte
func (*GrpcBaseServiceMessage) GetModelId ¶ added in v0.6.0
func (msg *GrpcBaseServiceMessage) GetModelId() interfaces.ModelId
func (*GrpcBaseServiceMessage) ToBytes ¶ added in v0.6.0
func (msg *GrpcBaseServiceMessage) ToBytes() (data []byte)
type GrpcBaseServiceParams ¶ added in v0.6.0
type GrpcBaseServiceParams struct {
Query bson.M `json:"q"`
Id primitive.ObjectID `json:"id"`
Update bson.M `json:"u"`
Doc interfaces.Model `json:"d"`
Fields []string `json:"f"`
FindOptions *mongo.FindOptions `json:"o"`
Docs []interface{} `json:"dl"`
User interfaces.User `json:"U"`
}
func (*GrpcBaseServiceParams) Value ¶ added in v0.6.0
func (params *GrpcBaseServiceParams) Value() interface{}
type GrpcDelegateMessage ¶ added in v0.6.0
type GrpcDelegateMessage struct {
ModelId interfaces.ModelId `json:"id"`
Method interfaces.ModelDelegateMethod `json:"m"`
Data []byte `json:"d"`
}
func (*GrpcDelegateMessage) GetData ¶ added in v0.6.0
func (msg *GrpcDelegateMessage) GetData() []byte
func (*GrpcDelegateMessage) GetMethod ¶ added in v0.6.0
func (msg *GrpcDelegateMessage) GetMethod() interfaces.ModelDelegateMethod
func (*GrpcDelegateMessage) GetModelId ¶ added in v0.6.0
func (msg *GrpcDelegateMessage) GetModelId() interfaces.ModelId
func (*GrpcDelegateMessage) ToBytes ¶ added in v0.6.0
func (msg *GrpcDelegateMessage) ToBytes() (data []byte)
type GrpcEventServiceMessage ¶ added in v0.6.0
type GrpcSubscribe ¶ added in v0.6.0
type GrpcSubscribe struct {
Stream interfaces.GrpcStream
Finished chan bool
}
func (*GrpcSubscribe) GetFinished ¶ added in v0.6.0
func (sub *GrpcSubscribe) GetFinished() chan bool
func (*GrpcSubscribe) GetStream ¶ added in v0.6.0
func (sub *GrpcSubscribe) GetStream() interfaces.GrpcStream
func (*GrpcSubscribe) GetStreamBidirectional ¶ added in v0.6.0
func (sub *GrpcSubscribe) GetStreamBidirectional() interfaces.GrpcStreamBidirectional
type ListRequestData ¶ added in v0.6.0
type ListResponse ¶ added in v0.6.0
type ModelDelegate ¶ added in v0.6.0
type ModelDelegate struct {
Id interfaces.ModelId `json:"id"`
ColName string `json:"col_name"`
Doc interfaces.Model `json:"doc"`
Artifact interfaces.ModelArtifact `json:"a"`
User interfaces.User `json:"u"`
}
type ModelInfo ¶ added in v0.6.0
type ModelInfo struct {
Id interfaces.ModelId
ColName string
}
type NodeInfo ¶ added in v0.6.0
type Pagination ¶ added in v0.6.0
func (*Pagination) IsDefault ¶ added in v0.6.1
func (p *Pagination) IsDefault() (ok bool)
func (*Pagination) IsZero ¶ added in v0.6.1
func (p *Pagination) IsZero() (ok bool)
type PluginEventKey ¶ added in v0.6.0
type PluginSetting ¶ added in v0.6.0
type PluginSetting struct {
PluginBaseUrl string `json:"plugin_base_url"`
GithubPublicOrg string `json:"github_public_org"`
RepoPrefix string `json:"repo_prefix"`
GoProxy string `json:"go_proxy"`
}
func NewPluginSetting ¶ added in v0.6.0
func NewPluginSetting(value bson.M) (ps PluginSetting)
func (*PluginSetting) Value ¶ added in v0.6.0
func (ps *PluginSetting) Value() (value bson.M)
type PluginSubStatus ¶ added in v0.6.0
type PluginUIAsset ¶ added in v0.6.0
type PluginUIComponent ¶ added in v0.6.0
type PluginUINav ¶ added in v0.6.0
type PluginUINav struct {
}
type PublicPlugin ¶ added in v0.6.0
type ReleaseSlices ¶
type ReleaseSlices []Release
func (ReleaseSlices) Len ¶
func (r ReleaseSlices) Len() int
func (ReleaseSlices) Less ¶
func (r ReleaseSlices) Less(i, j int) bool
func (ReleaseSlices) Swap ¶
func (r ReleaseSlices) Swap(i, j int)
type Result ¶ added in v0.6.0
type Result map[string]interface{}
func (Result) DenormalizeObjectId ¶ added in v0.6.0
type RpcMessage ¶
type ScrapyItem ¶
type ScrapySettingParam ¶
type SpiderType ¶
type Stage ¶
type Stage struct {
Name string `yaml:"name" json:"name"`
IsList bool `yaml:"is_list" json:"is_list"`
ListCss string `yaml:"list_css" json:"list_css"`
ListXpath string `yaml:"list_xpath" json:"list_xpath"`
PageCss string `yaml:"page_css" json:"page_css"`
PageXpath string `yaml:"page_xpath" json:"page_xpath"`
PageAttr string `yaml:"page_attr" json:"page_attr"`
Fields []Field `yaml:"fields" json:"fields"`
}
type StatsDailyItem ¶ added in v0.6.0
type StatsTasksByStatusItem ¶ added in v0.6.0
type StreamMessageTaskData ¶ added in v0.6.0
type SystemInfo ¶
type TaskMessage ¶ added in v0.6.0
type TaskMessage struct {
Id primitive.ObjectID `json:"id"`
Key string `json:"key"`
Cmd string `json:"cmd"`
Param string `json:"param"`
}
func (*TaskMessage) ToString ¶ added in v0.6.0
func (m *TaskMessage) ToString() (string, error)
type TaskRunOptions ¶ added in v0.6.0
type TaskRunOptions struct {
}
type Translation ¶ added in v0.6.0
type Translation struct {
Lang string `json:"lang"`
Key string `json:"key"`
Value string `json:"value"`
}
func (Translation) GetLang ¶ added in v0.6.0
func (t Translation) GetLang() (l string)
Source Files
¶
- address.go
- color.go
- common.go
- config_spider.go
- data_field.go
- doc.go
- es.go
- event.go
- export.go
- filter.go
- filter_select_option.go
- fs_file_info.go
- git.go
- grpc_base_service_message.go
- grpc_base_service_params.go
- grpc_delegate_message.go
- grpc_event_service_message.go
- grpc_subscribe.go
- http.go
- model_delegate.go
- model_info.go
- node.go
- pagination.go
- plugin.go
- public_plugin.go
- result.go
- rpc.go
- sort.go
- spider.go
- stats.go
- system_info.go
- task.go
- translation.go
- ttl_map.go
- version.go
Click to show internal directories.
Click to hide internal directories.