server

package module
v0.0.0-...-763e202 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: AGPL-3.0 Imports: 20 Imported by: 7

README

Build Status GoDoc

Hockeypuck Server

This package has been moved into https://github.com/hockeypuck/hockeypuck. Further contributions should be made there, this project has been archived.

Documentation

Index

Constants

View Source
const (
	DefaultDBDriver = "mongo"
	DefaultDBDSN    = "localhost:27017"
)
View Source
const (
	DefaultStatsRefreshHours = 4
	DefaultNWorkers          = 8
)
View Source
const (
	DefaultLogLevel    = "INFO"
	DefaultLevelDBPath = "recon.db"
)
View Source
const (
	DefaultHKPBind = ":11371"
)
View Source
const (
	DefaultSMTPHost = "localhost:25"
)

Variables

This section is empty.

Functions

func DialStorage

func DialStorage(settings *Settings) (storage.Storage, error)

Types

type DBConfig

type DBConfig struct {
	Driver string       `toml:"driver"`
	DSN    string       `toml:"dsn"`
	Mongo  *mongoConfig `toml:"mongo"`
}

type HKPConfig

type HKPConfig struct {
	Bind string `toml:"bind"`
}

type HKPSConfig

type HKPSConfig struct {
	HKPConfig
	Cert string `toml:"cert"`
	Key  string `toml:"key"`
}

type OpenPGPConfig

type OpenPGPConfig struct {
	PKS      *PKSConfig `toml:"pks"`
	NWorkers int        `toml:"nworkers"`
	DB       DBConfig   `toml:"db"`
}

func DefaultOpenPGP

func DefaultOpenPGP() OpenPGPConfig

type PKSConfig

type PKSConfig struct {
	From string     `toml:"from"`
	To   []string   `toml:"to"`
	SMTP SMTPConfig `toml:"smtp"`
}

type SMTPConfig

type SMTPConfig struct {
	Host     string `toml:"host"`
	ID       string `toml:"id"`
	User     string `toml:"user"`
	Password string `toml:"pass"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(settings *Settings) (*Server, error)

func (*Server) LogRotate

func (s *Server) LogRotate()

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop()

func (*Server) Wait

func (s *Server) Wait() error

type Settings

type Settings struct {
	Conflux confluxConfig `toml:"conflux"`

	IndexTemplate  string `toml:"indexTemplate"`
	VIndexTemplate string `toml:"vindexTemplate"`
	StatsTemplate  string `toml:"statsTemplate"`

	HKP  HKPConfig   `toml:"hkp"`
	HKPS *HKPSConfig `toml:"hkps"`

	OpenPGP OpenPGPConfig `toml:"openpgp"`

	LogFile  string `toml:"logfile"`
	LogLevel string `toml:"loglevel"`

	Webroot string `toml:"webroot"`

	Contact  string `toml:"contact"`
	Hostname string `toml:"hostname"`
	Software string `toml:"software"`
	Version  string `toml:"version"`
}

func DefaultSettings

func DefaultSettings() Settings

func ParseSettings

func ParseSettings(data string) (*Settings, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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