api

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SearchResources(url, keyword string, startDate, endDate time.Time) ([]ResourceDto, error)
	AddResource(res ResourceDto) (ResourceDto, error)
	ScheduleURL(url string) error
}

Client is the interface to interact with the API process

func NewClient

func NewClient(baseURL string) Client

NewClient create a new Client instance to dial with the API located on given address

type ResourceDto

type ResourceDto struct {
	URL   string    `json:"url"`
	Body  string    `json:"body"`
	Title string    `json:"title"`
	Time  time.Time `json:"time"`
}

ResourceDto represent a resource as given by the API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL