gou

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2015 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sakurifice

func Sakurifice(cfg *Config)

Sakurifice makes cache be compatible with saku. i.e. makes body dir ,attach dir and dat.stat in under cache dir.

func StartDaemon

func StartDaemon(cfg *Config, version string)

StartDaemon setups saves pid, start cron job and a http server.

Types

type Config

type Config struct {
	SaveRecord           int64
	SaveSize             int // It is not seconds, but number.
	GetRange             int64
	SyncRange            int64
	SaveRemoved          int64
	DefaultPort          int //DefaultPort is listening port
	MaxConnection        int
	Docroot              string
	LogDir               string
	RunDir               string
	FileDir              string
	CacheDir             string
	TemplateDir          string
	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
	EnableNAT            bool //EnableNAT is enabled if you want to use nat.
	ForceThumbnail       bool
	EnableProf           bool
	HeavyMoon            bool
	EnableEmbed          bool
	RelayNumber          int
}

Config contains params ini file.

func NewConfig

func NewConfig() *Config

NewConfig make a struct including configs from the ini files and returns it.

func (*Config) AdminSid

func (c *Config) AdminSid() string

AdminSid returns path to sid.txt

func (*Config) Datakey

func (c *Config) Datakey() string

Datakey returns path to datakey.txt

func (*Config) Lookup

func (c *Config) Lookup() string

Lookup returns path to lookup.txt

func (*Config) Motd

func (c *Config) Motd() string

Motd returns path to motd.txt

func (*Config) PID

func (c *Config) PID() string

PID returns path to pid.txt

func (*Config) Recent

func (c *Config) Recent() string

Recent returns path to recent.txt

func (*Config) Sugtag

func (c *Config) Sugtag() string

Sugtag returns path to sugtag.txt

Jump to

Keyboard shortcuts

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