server

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_BIND_ADDRESS = "127.0.0.1"
View Source
const DEFAULT_HTTPS_PORT = 10080
View Source
const DEFAULT_SHUTDOWN_TIMEOUT_SECONDS = 5
View Source
const Version = "1.1.16"

Variables

View Source
var Debug bool
View Source
var Verbose bool

Functions

func CheckErr added in v1.1.0

func CheckErr(err error)

func CobraAddCommand added in v1.1.0

func CobraAddCommand(cobraRootCmd, parentCmd, cobraCmd CobraCommand)

func CobraInit added in v1.1.0

func CobraInit(cobraRootCmd CobraCommand)

func ConfigEdit added in v1.1.0

func ConfigEdit()

func ConfigInit added in v1.1.0

func ConfigInit(allowClobber bool) string

func ConfigString added in v1.1.0

func ConfigString(header bool) string

func Confirm added in v1.1.0

func Confirm(prompt string) bool

func Expand added in v1.1.0

func Expand(pathname string) string

func Fatal added in v1.1.0

func Fatal(err error) error

func Fatalf added in v1.1.0

func Fatalf(format string, args ...interface{}) error

func FormatJSON added in v1.1.0

func FormatJSON(v any) string

func HexDump added in v1.1.0

func HexDump(data []byte) string

func Init added in v1.1.0

func Init(name, version, configFile string)

func IsDir added in v1.1.0

func IsDir(path string) bool

func IsFile added in v1.1.0

func IsFile(pathname string) bool

func OptionKey added in v1.1.0

func OptionKey(cobraCmd CobraCommand, key string) string

func OptionString added in v1.1.0

func OptionString(cobraCmd CobraCommand, name, flag, defaultValue, description string)

func OptionSwitch added in v1.1.0

func OptionSwitch(cobraCmd CobraCommand, name, flag, description string)

func ProgramName added in v1.1.0

func ProgramName() string

func ProgramVersion added in v1.1.0

func ProgramVersion() string

func Shutdown added in v1.1.0

func Shutdown()

func TildePath added in v1.1.0

func TildePath(path string) (string, error)

func ViperGet added in v1.1.3

func ViperGet(key string) any

func ViperGetBool added in v1.1.0

func ViperGetBool(key string) bool

func ViperGetInt added in v1.1.0

func ViperGetInt(key string) int

func ViperGetInt64 added in v1.1.0

func ViperGetInt64(key string) int64

func ViperGetString added in v1.1.0

func ViperGetString(key string) string

func ViperGetStringMapString added in v1.1.3

func ViperGetStringMapString(key string) map[string]string

func ViperGetStringSlice added in v1.1.0

func ViperGetStringSlice(key string) []string

func ViperKey added in v1.1.0

func ViperKey(key string) string

func ViperSet added in v1.1.0

func ViperSet(key string, value any)

func ViperSetDefault added in v1.1.0

func ViperSetDefault(key string, value any)

func Warning added in v1.1.0

func Warning(format string, args ...interface{})

Types

type APIClient added in v1.1.0

type APIClient interface {
	Close()
	Get(path string, response interface{}) (string, error)
	Post(path string, request, response interface{}, headers *map[string]string) (string, error)
	Put(path string, request, response interface{}, headers *map[string]string) (string, error)
	Delete(path string, response interface{}) (string, error)
}

func NewAPIClient added in v1.1.0

func NewAPIClient(prefix, url, certFile, keyFile, caFile string, headers *map[string]string) (APIClient, error)

type CobraCommand added in v1.1.0

type CobraCommand interface {
}

type Daemon

type Daemon struct {
	Name    string
	Address string
	Version string
	Port    int
	// contains filtered or unexported fields
}

func NewWinexecServer added in v1.1.7

func NewWinexecServer() (*Daemon, error)

func (*Daemon) GetConfig added in v1.0.8

func (d *Daemon) GetConfig() map[string]any

func (*Daemon) Run added in v1.0.8

func (d *Daemon) Run(message string) error

func (*Daemon) Start

func (d *Daemon) Start() error

func (*Daemon) Stop

func (d *Daemon) Stop() error
type Menu struct {
	Title string
	// contains filtered or unexported fields
}

func NewMenu

func NewMenu(title string, shutdown, complete chan struct{}) (*Menu, error)

type Sendmail added in v1.1.0

type Sendmail interface {
	Send(to, from, subject string, body []byte) error
}

func NewSendmail added in v1.1.0

func NewSendmail(hostname string, port int, username, password, CAFile string) (Sendmail, error)

type Task added in v1.1.11

type Task struct {
	Name       string
	Username   string
	Uid        string
	Executable string
	Args       string
	Dir        string
	LogFile    string
}

func NewTask added in v1.1.11

func NewTask(taskName string) (*Task, error)

func (*Task) Delete added in v1.1.11

func (t *Task) Delete() error

func (*Task) GetConfig added in v1.1.11

func (t *Task) GetConfig() (string, error)

func (*Task) Install added in v1.1.11

func (t *Task) Install() error

func (*Task) Query added in v1.1.11

func (t *Task) Query() (bool, error)

func (*Task) Start added in v1.1.11

func (t *Task) Start() error

func (*Task) Stop added in v1.1.11

func (t *Task) Stop() error

Jump to

Keyboard shortcuts

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