v1.26.0 Latest Latest

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 8 Imported by: 1




This section is empty.


This section is empty.


This section is empty.


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:
	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