config

package
v0.0.0-...-468e2a7 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2018 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	CACHE_SIZE = int64(512)
	FORMAT     = "jpeg"
	METHOD     = 3
	QUALITY    = 80
	ALPHA      = 0.5
	LISTEN_ON  = "127.0.0.1:15900"
	CACHE_SELF = "http://127.0.0.1:9100"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenOn string `json:"listen"`

	Sources struct {
		Http Source `json:"http"`
		File Source `json:"file"`
	} `json:"source"`

	Defaults struct {
		Format  string  `json:"format"`
		Method  int     `json:"method"`
		Quality int     `json:"quality"`
		Alpha   float64 `json:"blend_alpha"`
	} `json:"defaults"`

	GroupCache struct {
		Self  string   `json:"self"`
		Peers []string `json:"peers"`
		Size  string   `json:"size"`
	} `json:"groupcache"`

	Blend struct {
		With string `json:"with"`
		Mask string `json:"mask"`
		Roi  string `json:roi`
	}
}

func Get

func Get() *Config

func (*Config) Alpha

func (this *Config) Alpha() float64

func (*Config) BlendMask

func (this *Config) BlendMask(s string) string

func (*Config) BlendRoi

func (this *Config) BlendRoi(s string) string

func (*Config) BlendWith

func (this *Config) BlendWith(s string) string

func (*Config) CachePeers

func (this *Config) CachePeers() []string

func (*Config) CacheSelf

func (this *Config) CacheSelf() string

func (*Config) CacheSize

func (this *Config) CacheSize() int64

func (*Config) DumpCfg

func (this *Config) DumpCfg() error

func (*Config) Format

func (this *Config) Format() string

func (*Config) Listen

func (this *Config) Listen() string

func (*Config) Method

func (this *Config) Method() int

func (*Config) Quality

func (this *Config) Quality() int

func (*Config) Root

func (this *Config) Root(scheme string) (string, error)

func (*Config) RootFile

func (this *Config) RootFile() (string, error)

func (*Config) RootHttp

func (this *Config) RootHttp() (string, error)

func (*Config) Scheme

func (this *Config) Scheme() string

type Source

type Source struct {
	Root    string `json:"root"`
	Default bool   `json:"default"`
}

Jump to

Keyboard shortcuts

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