config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2015 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(filename string) error

func LoadJson

func LoadJson(filename string, c interface{}) error

func LogJson

func LogJson(c interface{}) error

func SaveJson

func SaveJson(filename string, c interface{}) error

Types

type Client

type Client struct {
	Server   string    `json:"server"`
	ID       string    `json:"id"`
	Type     string    `json:"type"`
	Hostname string    `json:"hostname"`
	Port     int       `json:"port"`
	LastSeen time.Time `json:"lastSeen"`
}

func (*Client) Load

func (c *Client) Load(filename string) error

func (*Client) Log

func (c *Client) Log()

func (*Client) Save

func (c *Client) Save(filename string) error

type Server

type Server struct {
	ListenOn string `json:"listen"`
	Database struct {
		Hosts    string `json:"url"`
		Database string `json:"db"`
	} `json:"database"`
}

func (*Server) Load

func (s *Server) Load(filename string) error

func (*Server) Log

func (s *Server) Log()

func (*Server) Save

func (s *Server) Save(filename string) error

Jump to

Keyboard shortcuts

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