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 Client ¶
type Client interface { SearchResources(url, keyword string, startDate, endDate time.Time, paginationPage, paginationSize int) ([]ResourceDto, int64, error) AddResource(res ResourceDto) (ResourceDto, error) ScheduleURL(url string) error Authenticate(credentials CredentialsDto) (string, error) }
Client is the interface to interact with the API component
func NewAuthenticatedClient ¶ added in v0.5.0
func NewAuthenticatedClient(baseURL string, credentials CredentialsDto) (Client, error)
NewAuthenticatedClient create a new Client & authenticate it against the API
type CredentialsDto ¶ added in v0.5.0
CredentialsDto represent the credential when logging in the API
Click to show internal directories.
Click to hide internal directories.