conf

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2016 License: MIT Imports: 2 Imported by: 2

Documentation

Overview

Package conf is an helper package for managing configuration files.

Index

Constants

View Source
const SampleConf = `` /* 450-byte string literal not displayed */

SampleConf is a sample configuration file.

Variables

This section is empty.

Functions

func WriteSampleConf

func WriteSampleConf() error

WriteSampleConf writes SampleConf to bancho.ini

Types

type Conf

type Conf struct {
	SQLInfo struct {
		User   string
		Pass   string
		Name   string
		Host   string
		DBType string
	}
	Ports struct {
		HTTP  string
		HTTPS string
	}
}

Conf is a struct containing the instance information on ripple.

func Get

func Get() (Conf, error)

Get retrieves data from bancho.ini, and if already set, it gets data from cached.

func GetConf

func GetConf(b []byte) (Conf, error)

GetConf creates a new Conf instance with the passed bytes

func GetFromFile

func GetFromFile(confFileName string) (Conf, error)

GetFromFile retrieves the data from a file and uses it to make a new Conf.

Jump to

Keyboard shortcuts

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