config

package
v0.0.0-...-194d0c4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Edit

func Edit() error

func SetupConfig

func SetupConfig(c *Config)

Types

type Config

type Config struct {
	Default *Default `toml:"default"`
	Meta    *Meta    `toml:"meta"`
	REPL    *REPL    `toml:"repl"`
	Env     *Env     `toml:"env"`
	Server  *Server  `toml:"server"`
	Log     *Log     `toml:"log"`
	Request *Request `toml:"request"`
	Input   *Input   `toml:"input"`
}

func Get

func Get() *Config

type Default

type Default struct {
	ProtoPath []string `toml:"protoPath" default:""`
	ProtoFile []string `toml:"protoFile" default:""`
	Package   string   `toml:"package" default:""`
	Service   string   `toml:"service" default:""`
}

type Env

type Env struct {
	Server *Server `toml:"-"`
}
type Header struct {
	Key string `toml:"key"`
	Val string `toml:"val"`
}

type Input

type Input struct {
	PromptFormat string `default:"{ancestor}{name} ({type}) => " toml:"promptFormat"`
}

type Log

type Log struct {
	Prefix string `default:"[evans] " toml:"prefix"`
}

type Meta

type Meta struct {
	Path        string `default:"~/.config/evans/config.toml" toml:"path"`
	AutoUpdate  bool   `default:"false" toml:"autoUpdate"`
	UpdateLevel string `default:"patch" toml:"updateLevel"`
}

type REPL

type REPL struct {
	Server       *Server `toml:"-"`
	PromptFormat string  `default:"{package}.{sevice}@{addr}:{port}" toml:"promptFormat"`

	ColoredOutput bool `default:"true" toml:"coloredOutput"`

	ShowSplashText bool   `default:"true" toml:"showSplashText"`
	SplashTextPath string `default:"" toml:"splashTextPath"`
}

type Request

type Request struct {
	Header []Header `toml:"header"`
}

type Server

type Server struct {
	Host       string `default:"127.0.0.1" toml:"host"`
	Port       string `default:"50051" toml:"port"`
	Reflection bool   `default:"false" toml:"reflection"`
}

Jump to

Keyboard shortcuts

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