config

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoggerLevel = "log-level"

	ExecRuntime             = "runtime"
	ExecKeepCookies         = "browser-cookies"
	ExecWithBrowser         = "browser-open"
	ExecBrowserAddress      = "browser-address"
	ExecWithBrowserHeadless = "browser-headless"
	ExecProxy               = "proxy"
	ExecUserAgent           = "user-agent"

	BrowserPort     = "port"
	BrowserDetach   = "detach"
	BrowserHeadless = "headless"
	BrowserUserDir  = "user-dir"
)

Variables

View Source
var (
	ErrInvalidFlag = errors.New("invalid flag")
)
View Source
var FlagsStr = strings.Join(Flags, `"|"`)

Functions

func With

func With(ctx context.Context, store *Store) context.Context

Types

type KV

type KV struct {
	Key   string
	Value interface{}
}

type Store

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

func From

func From(ctx context.Context) *Store

func NewStore

func NewStore(appName, version string) (*Store, error)

func (*Store) AppName

func (s *Store) AppName() string

func (*Store) AppVersion

func (s *Store) AppVersion() string

func (*Store) BindFlags

func (s *Store) BindFlags(cmd *cobra.Command)

Bind the current command's flags to viper

func (*Store) Get

func (s *Store) Get(key string) (interface{}, error)

func (*Store) GetBrowserOptions

func (s *Store) GetBrowserOptions() browser.Options

func (*Store) GetLoggerOptions

func (s *Store) GetLoggerOptions() logger.Options

func (*Store) GetRuntimeOptions

func (s *Store) GetRuntimeOptions() runtime.Options

func (*Store) List

func (s *Store) List() []KV

func (*Store) Repo added in v1.3.0

func (s *Store) Repo() string

func (*Store) RepoOwner added in v1.3.0

func (s *Store) RepoOwner() string

func (*Store) Set

func (s *Store) Set(key, val string) error

Jump to

Keyboard shortcuts

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