config

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheConfig

type CacheConfig struct {
	Name        string `json:"name"`
	Path        string `json:"path,omitempty"`
	TTL         int    `json:"ttl,omitempty"`
	Limit       int    `json:"limit,omitempty"`
	Prefix      string `json:"prefix,omitempty"`
	Region      string `json:"region,omitempty"`
	Credentials string `json:"credentials,omitempty"`
}

type Config

type Config struct {
	Level       LevelConfig       `json:"level"`
	Profile     ProfileConfig     `json:"profile"`
	Graphics    GraphicsConfig    `json:"graphics"`
	Features    FeaturesConfig    `json:"features"`
	Images      ImagesConfig      `json:"images"`
	Derivatives DerivativesConfig `json:"derivatives"`
	Flickr      FlickrConfig      `json:"flickr,omitempty"`
	Primitive   PrimitiveConfig   `json:"primitive,omitempty"`
	Palette     PaletteConfig     `json:"palette,omitempty"`
	Custom      interface{}       `json:"custom,omitempty"`
}

func NewConfigFromBytes

func NewConfigFromBytes(body []byte) (*Config, error)

func NewConfigFromEnv

func NewConfigFromEnv(name string) (*Config, error)

func NewConfigFromFile

func NewConfigFromFile(file string) (*Config, error)

func NewConfigFromFlag

func NewConfigFromFlag(flag string) (*Config, error)

type DerivativesConfig

type DerivativesConfig struct {
	Cache CacheConfig `json:"cache"`
}

type FeaturesAppend

type FeaturesAppend map[string]map[string]FeaturesDetails

type FeaturesConfig

type FeaturesConfig struct {
	Enable  FeaturesToggle `json:"enable"`
	Disable FeaturesToggle `json:"disable"`
	Append  FeaturesAppend `json:"append"`
}

type FeaturesDetails

type FeaturesDetails struct {
	Syntax    string `json:"syntax"`
	Required  bool   `json:"required"`
	Supported bool   `json:"supported"`
	Match     string `json:"match,omitempty"`
}

type FeaturesToggle

type FeaturesToggle map[string][]string

type FlickrConfig

type FlickrConfig struct {
	ApiKey    string `json:"apikey"`
	ApiSecret string `json:"apisecret,omitempty"`
}

type GraphicsConfig

type GraphicsConfig struct {
	Source SourceConfig `json:"source"`
}

type ImagesConfig

type ImagesConfig struct {
	Source SourceConfig `json:"source"`
	Cache  CacheConfig  `json:"cache"`
}

type LevelConfig

type LevelConfig struct {
	Compliance string `json:"compliance"`
}

type PaletteConfig

type PaletteConfig struct {
	Extruder SourceConfig   `json:"extruder"`
	Grid     SourceConfig   `json:"grid"`
	Palettes []SourceConfig `json:"palettes"`
}

type PrimitiveConfig

type PrimitiveConfig struct {
	MaxIterations int `json:"max_iterations"`
}

type ProfileConfig

type ProfileConfig struct {
	Services ServicesConfig `json:"services"`
}

type ServicesConfig

type ServicesConfig struct {
	Enable ServicesToggle `json:"enable"`
}

type ServicesToggle

type ServicesToggle []string

type SourceConfig

type SourceConfig struct {
	Name        string `json:"name"`
	Path        string `json:"path,omitempty"`
	Prefix      string `json:"prefix,omitempty"`
	Region      string `json:"region,omitempty"`
	Credentials string `json:"credentials,omitempty"`
	Tmpdir      string `json:"tmpdir,omitempty"`
	Count       int    `json:"count,omitempty"` // used by PaletteConfig.Extruder
}

Jump to

Keyboard shortcuts

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