cfg

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2017 License: BSD-3-Clause Imports: 9 Imported by: 18

Documentation

Index

Constants

View Source
const (
	//Disconnected represents mynode is disconnected.
	Disconnected = iota
	//Port0 represents mynode is behind NAT and not opened.
	Port0
	//UPnP represents mynode is opned by uPnP.
	UPnP
	//Normal represents port was opened manually.
	Normal
)
View Source
const (
	//AdminURL is the url to admin.cgi
	AdminURL = "/admin.cgi"
	//GatewayURL is the url to gateway.cgi
	GatewayURL = "/gateway.cgi"
	//ThreadURL is the url to thread.cgi
	ThreadURL = "/thread.cgi"
	//ServerURL is the url to server.cgi
	ServerURL = "/server.cgi"
)

Variables

View Source
var (
	ErrSpam = errors.New("this is spam")
	ErrGet  = errors.New("cannot get data")
)

data Errors.

View Source
var (
	Docroot     string
	LogDir      string
	RunDir      string
	FileDir     string
	TemplateDir string

	NetworkMode          int //port_opened,relay,upnp
	SaveRecord           int64
	SaveSize             int // It is not seconds, but number.
	GetRange             int64
	SyncRange            int64
	SaveRemoved          int64
	DefaultPort          int //DefaultPort is listening port
	MaxConnection        int
	SpamList             string
	InitnodeList         string
	NodeAllowFile        string
	NodeDenyFile         string
	ReAdminStr           string
	ReFriendStr          string
	ReVisitorStr         string
	ServerName           string
	TagSize              int
	RSSRange             int64
	TopRecentRange       int64
	RecentRange          int64
	RecordLimit          int
	ThreadPageSize       int
	DefaultThumbnailSize string
	Enable2ch            bool
	ForceThumbnail       bool
	EnableProf           bool
	HeavyMoon            bool
	EnableEmbed          bool
)

config params

View Source
var (

	//InitNode is initiali nodes.
	InitNode *util.ConfList
)
View Source
var SuffixTXT = "txt"

SuffixTXT is suffix of text files.

View Source
var Version = "unstable"

Version is one of Gou. it shoud be overwritten when building on travis.

Functions

func Motd

func Motd() string

Motd returns path to motd.txt

func PID

func PID() string

PID returns path to pid.txt

func Parse added in v0.2.0

func Parse()

Parse makes config vars from the ini files and returns it.

func SetAndroid added in v0.2.0

func SetAndroid(path string)

SetAndroid sets that I'm in android and writable path as cwd. all paths are ignored when in android.

Types

This section is empty.

Jump to

Keyboard shortcuts

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