internal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintFormat added in v0.3.0

func PrintFormat(stringed string, err error)

Types

type Config

type Config struct {
	Api struct {
		BaseUrl       string `env:"BASE_URL,required" json:"base_url"`
		ApiKey        string `env:"KEY,required" json:"api_key"`
		SkipTlsVerify bool   `env:"SKIP_TLS_VERIFY" envDefault:"true" json:"skip_tls_verify"`
	} `envPrefix:"API_" json:"api"`
}

func GetConfig

func GetConfig() (*Config, error)

type JsonOutputFormater added in v0.3.0

type JsonOutputFormater struct{}

func (*JsonOutputFormater) Format added in v0.3.0

func (f *JsonOutputFormater) Format(input any) (string, error)

type OutputFormat added in v0.3.0

type OutputFormat string
const (
	JSON OutputFormat = "json"
	YAML OutputFormat = "yaml"
	TEXT OutputFormat = "text"
)

type OutputFormater added in v0.3.0

type OutputFormater interface {
	Format(input any) (string, error)
}

func OutputFormaterSwitcher added in v0.3.0

func OutputFormaterSwitcher(output OutputFormat) OutputFormater

type TextOutputFormater added in v0.3.0

type TextOutputFormater struct{}

func (*TextOutputFormater) Format added in v0.3.0

func (f *TextOutputFormater) Format(input any) (string, error)

type YamlOutputFormater added in v0.3.0

type YamlOutputFormater struct{}

func (*YamlOutputFormater) Format added in v0.3.0

func (f *YamlOutputFormater) Format(input any) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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