config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(cnf *Config, w io.Writer) error

Encode a configuration to a writer

func Write

func Write(cnf *Config, configFile string) error

Write the configuration into a file, specified by the configuration filepath

Types

type Config

type Config struct {
	DeviceID string `json:"device_id"`
	DSN      string `json:"dsn"`
}

Config represent the configuration

func Decode

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

Decode a configuration from a reader

func Read

func Read(configFile string) (*Config, error)

Read the configuration file

Jump to

Keyboard shortcuts

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