Documentation
¶
Index ¶
- Variables
- type API
- type ApplyAppConfigRequest
- type ApplyAppConfigResponse
- type Config
- type Dependencies
- type Error
- type Factory
- type QueryAppConfigRequest
- type QueryAppConfigResponse
- type QueryAppConfigSchemaRequest
- type QueryAppConfigSchemaResponse
- type QueryRSSHubCategoriesRequest
- type QueryRSSHubCategoriesResponse
- type QueryRSSHubRoutesRequest
- type QueryRSSHubRoutesResponse
- type QueryRSSHubWebsitesRequest
- type QueryRSSHubWebsitesResponse
- type QueryRequest
- type QueryRequestSemanticFilter
- type QueryResponse
- type RSSHubRoute
- type RSSHubWebsite
- type WriteRequest
- type WriteResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadRequest = func(err error) Error { return newError(http.StatusBadRequest, err) } ErrNotFound = func(err error) Error { return newError(http.StatusNotFound, err) } ErrInternal = func(err error) Error { return newError(http.StatusInternalServerError, err) } )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
component.Component
config.Watcher
QueryAppConfigSchema(
ctx context.Context,
req *QueryAppConfigSchemaRequest,
) (resp *QueryAppConfigSchemaResponse, err error)
QueryAppConfig(ctx context.Context, req *QueryAppConfigRequest) (resp *QueryAppConfigResponse, err error)
ApplyAppConfig(ctx context.Context, req *ApplyAppConfigRequest) (resp *ApplyAppConfigResponse, err error)
QueryRSSHubCategories(
ctx context.Context,
req *QueryRSSHubCategoriesRequest,
) (resp *QueryRSSHubCategoriesResponse, err error)
QueryRSSHubWebsites(
ctx context.Context,
req *QueryRSSHubWebsitesRequest,
) (resp *QueryRSSHubWebsitesResponse, err error)
QueryRSSHubRoutes(ctx context.Context, req *QueryRSSHubRoutesRequest) (resp *QueryRSSHubRoutesResponse, err error)
Write(ctx context.Context, req *WriteRequest) (resp *WriteResponse, err error) // WARN: beta!!!
Query(ctx context.Context, req *QueryRequest) (resp *QueryResponse, err error)
}
--- Interface code block ---
type ApplyAppConfigRequest ¶
type ApplyAppConfigResponse ¶
type ApplyAppConfigResponse struct{}
type Dependencies ¶
type Factory ¶
--- Factory code block ---
func NewFactory ¶
func NewFactory(mockOn ...component.MockOption) Factory
type QueryAppConfigRequest ¶
type QueryAppConfigRequest struct{}
type QueryAppConfigResponse ¶
type QueryAppConfigSchemaRequest ¶
type QueryAppConfigSchemaRequest struct{}
type QueryRSSHubCategoriesRequest ¶
type QueryRSSHubCategoriesRequest struct{}
type QueryRSSHubCategoriesResponse ¶
type QueryRSSHubCategoriesResponse struct {
Categories []string `json:"categories,omitempty"`
}
type QueryRSSHubRoutesRequest ¶
type QueryRSSHubRoutesRequest struct {
WebsiteID string `json:"website_id,omitempty"`
}
type QueryRSSHubRoutesResponse ¶
type QueryRSSHubRoutesResponse struct {
Routes []RSSHubRoute `json:"routes,omitempty"`
}
type QueryRSSHubWebsitesRequest ¶
type QueryRSSHubWebsitesRequest struct {
Category string `json:"category,omitempty"`
}
type QueryRSSHubWebsitesResponse ¶
type QueryRSSHubWebsitesResponse struct {
Websites []RSSHubWebsite `json:"websites,omitempty"`
}
type QueryRequest ¶
type QueryRequest struct {
Query string `json:"query,omitempty"`
Threshold float32 `json:"threshold,omitempty"`
LabelFilters []string `json:"label_filters,omitempty"`
Summarize bool `json:"summarize,omitempty"`
Limit int `json:"limit,omitempty"`
Start time.Time `json:"start,omitempty"`
End time.Time `json:"end,omitempty"`
}
func (*QueryRequest) Validate ¶
func (r *QueryRequest) Validate() error
type QueryResponse ¶
type RSSHubRoute ¶
type RSSHubWebsite ¶
type WriteRequest ¶
type WriteResponse ¶
type WriteResponse struct{} // TODO: data may lost (if crash just now) after Response returned.
Click to show internal directories.
Click to hide internal directories.