app

package
Version: v0.0.0-...-cf6f8db Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApp

func AddApp(app App, validate bool) error

func CheckAppExist

func CheckAppExist(name string) bool

func DeleteApp

func DeleteApp(name string) error

func EditApp

func EditApp(app App, validate bool) error

func ReloadAppConfig

func ReloadAppConfig()

func SaveAppConfig

func SaveAppConfig(app App) error

Types

type App

type App struct {
	Name             string                 `json:"name"`
	CaddyConfig      caddyManager.APPConfig `json:"caddyConfig" binding:"required"`
	Type             Type                   `json:"type" binding:"required"`
	BackendType      BackendType            `json:"backendType"`
	BackendConfigRaw json.RawMessage        `json:"backendConfig"`
	Version          string                 `json:"version"`

	// Deprecated: use ExecBackendConfig instead. To be removed in 1.0.0 release.
	AutoReboot bool `json:"autoReboot,omitempty"`
	// Deprecated: use ExecBackendConfig instead. To be removed in 1.0.0 release.
	Path string `json:"path,omitempty"`
	// Deprecated: use ExecBackendConfig instead. To be removed in 1.0.0 release.
	BootArgument string `json:"bootArgument,omitempty"`
}

func GetApp

func GetApp(name string) (App, error)

func GetApps

func GetApps() []App

func LoadAppConfig

func LoadAppConfig(name string) (App, error)

type BackendType

type BackendType string
const (
	NoneBackend BackendType = "none"
	ExecBackend BackendType = "exec"
)

type ExecBackendConfig

type ExecBackendConfig struct {
	WorkingDirectory string `json:"workingDirectory"`
	AutoReboot       bool   `json:"autoReboot"`
	Path             string `json:"path"`
	Argument         string `json:"argument"`
}

type Type

type Type int
const (
	GoType Type = iota + 1
	JavaType
	PHPType
	OtherType
	ReverseProxyType
	StaticWebType
)

Source Files

Jump to

Keyboard shortcuts

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