svc

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Vers contains the version number set at build time
	Vers string
)

Functions

func HashPass added in v0.5.0

func HashPass(s string) (string, error)

HashPass returns the bcrypt hash of the provided string. If an empty string is provided, return an empty string.

func Start

func Start()

Start is the initialization function for getwtxt

Types

type Configuration

type Configuration struct {
	Mu            sync.RWMutex
	Port          int           `yaml:"ListenPort"`
	MsgLog        string        `yaml:"MessageLog"`
	ReqLog        string        `yaml:"RequestLog"`
	DBType        string        `yaml:"DatabaseType"`
	DBPath        string        `yaml:"DatabasePath"`
	AssetsDir     string        `yaml:"AssetsDirectory"`
	StaticDir     string        `yaml:"StaticFilesDirectory"`
	AdminPassHash string        `yaml:"-"`
	StdoutLogging bool          `yaml:"StdoutLogging"`
	CacheInterval time.Duration `yaml:"StatusFetchInterval"`
	DBInterval    time.Duration `yaml:"DatabasePushInterval"`
	Instance      `yaml:"Instance"`
}

Configuration values are held in an instance of this struct.

type Instance

type Instance struct {
	Vers  string `yaml:"-"`
	Name  string `yaml:"Instance.SiteName"`
	URL   string `yaml:"Instance.URL"`
	Owner string `yaml:"Instance.OwnerName"`
	Mail  string `yaml:"Instance.Email"`
	Desc  string `yaml:"Instance.Description"`
}

Instance refers to meta data about this specific instance of getwtxt

type RemoteRegistries

type RemoteRegistries struct {
	List []string
}

RemoteRegistries holds a list of remote registries to periodically scrape for new users. The remote registries must have been added via POST like a user.

Jump to

Keyboard shortcuts

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