Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PaginationPageHeader is the header to determinate current page in paginated endpoint PaginationPageHeader = "X-Pagination-Page" // PaginationSizeHeader is the header to determinate page size in paginated endpoint PaginationSizeHeader = "X-Pagination-Size" // PaginationCountHeader is the header to determinate total count of element in paginated endpoint PaginationCountHeader = "X-Pagination-Count" // PaginationPageQueryParam is the query parameter used to set current page in paginated endpoint PaginationPageQueryParam = "pagination-page" // PaginationSizeQueryParam is the query parameter used to set page size in paginated endpoint PaginationSizeQueryParam = "pagination-size" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶ added in v0.7.0
type API interface { SearchResources(params *ResSearchParams) ([]ResourceDto, int64, error) AddResource(res ResourceDto) (ResourceDto, error) ScheduleURL(url string) error }
API is the interface to interact with the API component
type CredentialsDto ¶ added in v0.5.0
CredentialsDto represent the credential when logging in the API
type ResSearchParams ¶ added in v0.7.0
type ResSearchParams struct { URL string Keyword string StartDate time.Time EndDate time.Time WithBody bool PageSize int PageNumber int }
ResSearchParams is the search params used
type ResourceDto ¶
type ResourceDto struct { URL string `json:"url"` Body string `json:"body"` Time time.Time `json:"time"` Title string `json:"title"` Meta map[string]string `json:"meta"` Description string `json:"description"` Headers map[string]string `json:"headers"` }
ResourceDto represent a resource as given by the API
Click to show internal directories.
Click to hide internal directories.