added support for config files, openbsd, pledge and unveil
This commit is contained in:
parent
62543e44da
commit
375933c7bc
14 changed files with 138 additions and 49 deletions
|
|
@ -1,7 +0,0 @@
|
|||
// Copyright (C) 2018 Marius Schellenberger
|
||||
|
||||
// +build !openbsd
|
||||
|
||||
package core
|
||||
|
||||
func Pledge(promises, execpromises string) error { return nil }
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// Copyright (C) 2018 Marius Schellenberger
|
||||
|
||||
// +build openbsd
|
||||
|
||||
package core
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
func Pledge(promises, execpromises string) error {
|
||||
return unix.Pledge(promises, execpromises)
|
||||
}
|
||||
|
|
@ -43,14 +43,14 @@ type Result struct {
|
|||
}
|
||||
|
||||
type Config struct {
|
||||
DataDir string
|
||||
User string
|
||||
Group string
|
||||
ListenAddr string
|
||||
LogFile string
|
||||
Version string
|
||||
Secret string
|
||||
Foreground bool
|
||||
SecureCookie bool
|
||||
Debug bool
|
||||
DataDir string `json:"data_dir,omitempty"`
|
||||
User string `json:"user,omitempty"`
|
||||
Group string `json:"group,omitempty"`
|
||||
ListenAddr string `json:"listen_addr,omitempty"`
|
||||
LogFile string `json:"log_file,omitempty"`
|
||||
Version string `json:"-"`
|
||||
Secret string `json:"secret,omitempty"`
|
||||
Foreground bool `json:"foreground,omitempty"`
|
||||
SecureCookie bool `json:"secure_cookie,omitempty"`
|
||||
Debug bool `json:"debug,omitempty"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue