config

package
v0.0.0-...-e550801 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	R, G, B, A float64
}

type Config

type Config struct {
	ListenPort int    `env:"TSRV_LISTENPORT"`
	TestFlag   bool   `env:"TSRV_TESTFLAG"`
	FileMap    string `env:"TSRV_FILEMAP"`
	Styles     map[string]map[string]Style
}

type Env

type Env struct {
	Config *Config
	// contains filtered or unexported fields
}

func NewEnv

func NewEnv(path string) *Env

type JSONStyle

type JSONStyle struct {
	Color   string  `json:"color"`
	Width   int     `json:"width"`
	Dash    float64 `json:"dash"`
	Opacity float64 `json:"opacity"`
}

type Style

type Style struct {
	Color Color
	Width int
	Dash  float64
}

func (*Style) Implement

func (s *Style) Implement(c *gg.Context)

func (*Style) UnmarshalJSON

func (s *Style) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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