Documentation ¶
Overview ¶
Package fetcher contains the implementations of fetchers to retrieve current versions for the catalog entries
Index ¶
- Variables
- type AtlassianFetcher
- type Create
- type Fetcher
- type GitTagFetcher
- type GithubReleaseFetcher
- func (GithubReleaseFetcher) FetchVersion(ctx context.Context, attrs *fieldcollection.FieldCollection) (string, time.Time, error)
- func (GithubReleaseFetcher) Links(attrs *fieldcollection.FieldCollection) []database.CatalogLink
- func (GithubReleaseFetcher) Validate(attrs *fieldcollection.FieldCollection) error
- type HTMLFetcher
- type JSONFetcher
- type RegexFetcher
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoVersionFound signalizes the fetcher was not able to retrieve a version ErrNoVersionFound = errors.New("no version found") )
Functions ¶
This section is empty.
Types ¶
type AtlassianFetcher ¶
type AtlassianFetcher struct{}
AtlassianFetcher implements the fetcher interface to monitor Atlassian products
func (AtlassianFetcher) FetchVersion ¶
func (AtlassianFetcher) FetchVersion(ctx context.Context, attrs *fieldcollection.FieldCollection) (string, time.Time, error)
FetchVersion retrieves the latest version for the catalog entry
func (AtlassianFetcher) Links ¶
func (AtlassianFetcher) Links(_ *fieldcollection.FieldCollection) []database.CatalogLink
Links retrieves a collection of links for the fetcher
func (AtlassianFetcher) Validate ¶
func (AtlassianFetcher) Validate(attrs *fieldcollection.FieldCollection) error
Validate validates the configuration given to the fetcher
type Fetcher ¶
type Fetcher interface { // FetchVersion retrieves the latest version for the catalog entry FetchVersion(ctx context.Context, attrs *fieldcollection.FieldCollection) (string, time.Time, error) // Links retrieves a collection of links for the fetcher Links(attrs *fieldcollection.FieldCollection) []database.CatalogLink // Validate validates the configuration given to the fetcher Validate(attrs *fieldcollection.FieldCollection) error }
Fetcher defines the interface all fetchers have to follow
type GitTagFetcher ¶
type GitTagFetcher struct{}
GitTagFetcher implements the fetcher interface to monitor tags in a git repository
func (GitTagFetcher) FetchVersion ¶
func (g GitTagFetcher) FetchVersion(_ context.Context, attrs *fieldcollection.FieldCollection) (string, time.Time, error)
FetchVersion retrieves the latest version for the catalog entry
func (GitTagFetcher) Links ¶
func (GitTagFetcher) Links(_ *fieldcollection.FieldCollection) []database.CatalogLink
Links retrieves a collection of links for the fetcher
func (GitTagFetcher) Validate ¶
func (GitTagFetcher) Validate(attrs *fieldcollection.FieldCollection) error
Validate validates the configuration given to the fetcher
type GithubReleaseFetcher ¶
type GithubReleaseFetcher struct{}
GithubReleaseFetcher implements the fetcher interface to monitor releases in a Github repository
func (GithubReleaseFetcher) FetchVersion ¶
func (GithubReleaseFetcher) FetchVersion(ctx context.Context, attrs *fieldcollection.FieldCollection) (string, time.Time, error)
FetchVersion retrieves the latest version for the catalog entry
func (GithubReleaseFetcher) Links ¶
func (GithubReleaseFetcher) Links(attrs *fieldcollection.FieldCollection) []database.CatalogLink
Links retrieves a collection of links for the fetcher
func (GithubReleaseFetcher) Validate ¶
func (GithubReleaseFetcher) Validate(attrs *fieldcollection.FieldCollection) error
Validate validates the configuration given to the fetcher
type HTMLFetcher ¶
type HTMLFetcher struct{}
HTMLFetcher implements the fetcher interface to monitor versions on websites by xpath queries
func (HTMLFetcher) FetchVersion ¶
func (HTMLFetcher) FetchVersion(_ context.Context, attrs *fieldcollection.FieldCollection) (string, time.Time, error)
FetchVersion retrieves the latest version for the catalog entry
func (HTMLFetcher) Links ¶
func (HTMLFetcher) Links(attrs *fieldcollection.FieldCollection) []database.CatalogLink
Links retrieves a collection of links for the fetcher
func (HTMLFetcher) Validate ¶
func (HTMLFetcher) Validate(attrs *fieldcollection.FieldCollection) error
Validate validates the configuration given to the fetcher
type JSONFetcher ¶
type JSONFetcher struct{}
JSONFetcher implements the fetcher interface to retrieve a version from a JSON document
func (JSONFetcher) FetchVersion ¶
func (JSONFetcher) FetchVersion(ctx context.Context, attrs *fieldcollection.FieldCollection) (string, time.Time, error)
FetchVersion retrieves the latest version for the catalog entry
func (JSONFetcher) Links ¶
func (JSONFetcher) Links(_ *fieldcollection.FieldCollection) []database.CatalogLink
Links retrieves a collection of links for the fetcher
func (JSONFetcher) Validate ¶
func (JSONFetcher) Validate(attrs *fieldcollection.FieldCollection) error
Validate validates the configuration given to the fetcher
type RegexFetcher ¶
type RegexFetcher struct{}
RegexFetcher implements the fetcher interface to monitor versions on a web request by regex
func (RegexFetcher) FetchVersion ¶
func (RegexFetcher) FetchVersion(ctx context.Context, attrs *fieldcollection.FieldCollection) (string, time.Time, error)
FetchVersion retrieves the latest version for the catalog entry
func (RegexFetcher) Links ¶
func (RegexFetcher) Links(attrs *fieldcollection.FieldCollection) []database.CatalogLink
Links retrieves a collection of links for the fetcher
func (RegexFetcher) Validate ¶
func (RegexFetcher) Validate(attrs *fieldcollection.FieldCollection) error
Validate validates the configuration given to the fetcher