environment_loaders

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDNLoader

type CDNLoader struct {
	// contains filtered or unexported fields
}

func NewCDNLoader

func NewCDNLoader(opts ...CDNLoaderOptionBuilder) *CDNLoader

func (*CDNLoader) Init

func (loader *CDNLoader) Init(envID string, APIKey string) error

func (*CDNLoader) LoadEnvironment

func (l *CDNLoader) LoadEnvironment(envID string, APIKey string) (*models.Environment, error)

type CDNLoaderOptionBuilder

type CDNLoaderOptionBuilder func(*CDNLoader)

func WithBaseURL

func WithBaseURL(url string) CDNLoaderOptionBuilder

func WithHTTPClient

func WithHTTPClient(client *http.Client) CDNLoaderOptionBuilder

func WithLogger added in v0.3.1

func WithLogger(lvl string, fmt logger.LogFormat) CDNLoaderOptionBuilder

func WithPollingInterval

func WithPollingInterval(pollingInterval time.Duration) CDNLoaderOptionBuilder

type MockLoader

type MockLoader struct {
	MockedEnvironment *models.Environment
	ErrorReturned     error
}

func (*MockLoader) Init

func (loader *MockLoader) Init(envID string, APIKey string) error

func (*MockLoader) LoadEnvironment

func (l *MockLoader) LoadEnvironment(envID string, APIKey string) (*models.Environment, error)

Jump to

Keyboard shortcuts

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