Documentation ¶
Overview ¶
Package config package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Logger *log.Logger TokenProvider auth.TokenProvider Endpoint string }
Config holds a configuration.
type LoadOptions ¶
type LoadOptions struct { Logger *log.Logger TokenProvider auth.TokenProvider Endpoint string }
LoadOptions holds the options for loading a configuration.
type LoadOptionsFunc ¶
type LoadOptionsFunc func(*LoadOptions) error
LoadOptionsFunc is a type alias for the type of function that adds a load option.
func WithEndpoint ¶
func WithEndpoint(endpoint string) LoadOptionsFunc
WithEndpoint add/sets the specified endpoint, replacing THARSIS_ENDPOINT
func WithLogger ¶
func WithLogger(v *log.Logger) LoadOptionsFunc
WithLogger adds the specified logger.
func WithTokenProvider ¶
func WithTokenProvider(v auth.TokenProvider) LoadOptionsFunc
WithTokenProvider adds the specified authentication provider.
Click to show internal directories.
Click to hide internal directories.