api

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: Apache-2.0 Imports: 13 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 struct {
	// contains filtered or unexported fields
}

Client stores information needed to access Flexera API API key will be sent in the Authorization field rate limiter is used to enforce their api limits (so we don't go over them)

func NewClient

func NewClient(baseURL, apiKey string) Client

NewClient creates a new Client object with given properties

func (Client) Fetch

func (c Client) Fetch(identifier string) (*schema.FlexeraAdvisory, error)

Fetch will return a channel with only one advisory in it

func (Client) FetchAll

func (c Client) FetchAll(from, to int64) (<-chan *schema.FlexeraAdvisory, error)

FetchAll will fetch all advisories since given time we first fetch all pages and just collect all identifiers found on them and push them into the `identifiers` channel. Then we start fetchers which take those identifiers and fetch the real advisories

Jump to

Keyboard shortcuts

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