config

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Token    string `yaml:"token"`
	Products struct {
		CDN struct {
			Token   string   `yaml:"token,omitempty"`
			Enabled bool     `yaml:"enable,omitempty"`
			Domains []string `yaml:"domains,omitempty"`
			Period  string   `yaml:"period,omitempty"`
		} `yaml:"cdn,omitempty"`
		OBJECT struct {
			Token   string   `yaml:"token,omitempty"`
			Enabled bool     `yaml:"enable,omitempty"`
			Buckets []string `yaml:"buckets,omitempty"`
		} `yaml:"object,omitempty"`
	} `yaml:"products,omitempty"`
}

Config represents the configuration for the exporter

func Load

func Load(r io.Reader) (*Config, error)

Load reads YAML from reader and unmarshal in Config

func (*Config) EnabledProducts

func (c *Config) EnabledProducts() string

EnabledProducts returns a comma separated string of enabled products

Jump to

Keyboard shortcuts

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