gitlabretriever

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Retriever

type Retriever struct {
	// Branch is the name of the GITLAB branch where to download the file
	// default: main
	Branch string // default is main
	// FilePath is the location of your file in the repository
	FilePath string

	// GitlabToken is the token to use when downloading the file
	GitlabToken string

	// RepositorySlug is the name of your repository in your gitlab instance
	// ex: thomaspoignant/go-feature-flag
	RepositorySlug string

	// BaseURL is the DNS of your GITLAB installation.
	// default: https://gitlab.com
	BaseURL string

	// Timeout is the time before we timeout while retrieving the flag file.
	// default: 10 seconds
	Timeout time.Duration
	// contains filtered or unexported fields
}

Retriever is a configuration struct for a GitHub retriever.

func (*Retriever) Retrieve

func (r *Retriever) Retrieve(ctx context.Context) ([]byte, error)

func (*Retriever) SetHTTPClient

func (r *Retriever) SetHTTPClient(client internal.HTTPClient)

SetHTTPClient is here if you want to override the default http.Client we are using. It is also used for the tests.

Jump to

Keyboard shortcuts

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