config

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingAddress = errors.New("missing texit address")
	ErrMissingApiKey  = errors.New("missing texit apiKey")
)

Functions

func LoadFromFile

func LoadFromFile[C Config](path string) (*C, error)

Loads the application config from a file at the specified path.

Types

type ApiConfig

type ApiConfig struct {
	Address string `yaml:"address"`
	ApiKey  string `yaml:"apiKey"`
}

Configuration to connect to the API server

func (*ApiConfig) Validate added in v0.0.3

func (c *ApiConfig) Validate() error

type Config

type Config interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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