config

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 19, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Content string
	// contains filtered or unexported fields
}

Client used to access the configurations.

func (*Client) GetBool

func (c *Client) GetBool(key string) bool

GetBool get the value as a bool from a given configuration.

func (*Client) GetDuration

func (c *Client) GetDuration(key string) (time.Duration, error)

GetDuration get the value as a time.Duration from a given configuration.

func (*Client) GetInt

func (c *Client) GetInt(key string) int

GetInt get the value as a int from a given configuration.

func (*Client) GetString

func (c *Client) GetString(key string) string

GetString get the value as a string from a given configuration.

func (*Client) GetStringSlice

func (c *Client) GetStringSlice(key string) []string

GetStringSlice get the value as a []string from a given configuration.

func (*Client) Init

func (c *Client) Init() error

Init the client instance.

func (*Client) IsSet

func (c *Client) IsSet(key string) bool

IsSet check if a given configuration exists.

func (*Client) Set

func (c *Client) Set(key string, value interface{})

Set the value of a key.

Jump to

Keyboard shortcuts

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