retriever

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlagRetriever

type FlagRetriever interface {
	Retrieve() ([]byte, error)
}

FlagRetriever is an interface that force to have a Retrieve() function for different way of getting the config file.

func NewHTTPRetriever

func NewHTTPRetriever(httpClient HTTPClient, url string, method string, body string, header http.Header) FlagRetriever

NewHTTPRetriever return a new HTTPRetriever to get the file from an HTTP endpoint.

func NewLocalRetriever

func NewLocalRetriever(path string) FlagRetriever

NewLocalRetriever is the retriever for local file.

func NewS3Retriever

func NewS3Retriever(downloader s3manageriface.DownloaderAPI, bucket string, item string) FlagRetriever

NewS3Retriever return a new S3Retriever to get the file from S3.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is an interface over http.Client to make mock easier.

Jump to

Keyboard shortcuts

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