internal

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains added in v0.11.0

func Contains[E comparable](s []E, v E) bool

func ContainsFunc added in v0.11.0

func ContainsFunc[E any](s []E, f func(E) bool) bool

func GetCaches added in v0.7.0

func GetCaches(prefix string) ([]string, error)

func GetConfigHome added in v0.5.0

func GetConfigHome() (string, error)

func GetStateHome added in v0.5.0

func GetStateHome() (string, error)

func NewError added in v0.9.0

func NewError(cause error, format string, args ...any) error

Types

type Cache added in v0.7.0

type Cache struct {
	Accounts map[string]account
	Config   string
}

func NewCache added in v0.7.0

func NewCache(config string) (*Cache, error)

func (*Cache) Len added in v0.7.0

func (c *Cache) Len() int

func (*Cache) Remove added in v0.7.0

func (c *Cache) Remove() error

func (*Cache) SortedAccounts added in v0.11.0

func (c *Cache) SortedAccounts(prefix string, exclusions []string) []string

type Client

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

func NewClient

func NewClient(params Parameters) (Client, error)

func (Client) Run

func (c Client) Run() error

type Config

type Config struct {
	Aliases    []string      `json:"aliases"`
	AppID      string        `json:"app-id"`    //nolint:tagliatelle
	CertFile   string        `json:"cert-file"` //nolint:tagliatelle
	Expiry     time.Duration `json:"expiry"`
	Host       string        `json:"host"`
	KeyFile    string        `json:"key-file"`        //nolint:tagliatelle
	MaxConns   int           `json:"max-connections"` //nolint:tagliatelle
	MaxTries   int           `json:"max-tries"`       //nolint:tagliatelle
	Safe       string        `json:"safe"`
	SkipVerify bool          `json:"skip-verify"` //nolint:tagliatelle
	Timeout    time.Duration `json:"timeout"`
	Wait       time.Duration `json:"wait"`
}

func NewConfig added in v0.11.0

func NewConfig() Config

func (Config) Overwrite

func (c Config) Overwrite(other Config) Config

func (Config) String added in v0.11.0

func (c Config) String() string

type Error added in v0.9.0

type Error struct {
	Cause   error
	Message string
}

func (*Error) Error added in v0.9.0

func (e *Error) Error() string

type Parameters

type Parameters struct {
	Config

	CfgName string
	JSON    bool
	Objects []string
	Output  string
	// contains filtered or unexported fields
}

func NewParameters added in v0.5.0

func NewParameters() Parameters

func (Parameters) Errorf

func (p Parameters) Errorf(format string, v ...any)

func (Parameters) Fatalf

func (p Parameters) Fatalf(format string, v ...any)

func (Parameters) Validate added in v0.5.0

func (p Parameters) Validate() error

Jump to

Keyboard shortcuts

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