config

package
v0.0.0-...-f0d068a Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CreateCustomDir

func CreateCustomDir(ctx context.Context, filename string, conf *Config) error

func DefaultConfigFile

func DefaultConfigFile(ctx context.Context) string

func GenerateSelfSignedCert

func GenerateSelfSignedCert(ctx context.Context, filename string, conf *Config) error

func LoadOrCreate

func LoadOrCreate(ctx context.Context, filename string, conf *Config, funcs ...TransformFunc) error

func RenewExpiredSelfSignedCert

func RenewExpiredSelfSignedCert(ctx context.Context, filename string, conf *Config) error

Types

type AppsConfig

type AppsConfig struct {
	Enabled    bool   `json:"enabled"`
	DefaultApp string `json:"defaultApp"`
}

type Config

type Config struct {
	InstanceID     string      `json:"instanceId"`
	HTTP           HTTPConfig  `json:"http"`
	HTTPS          HTTPSConfig `json:"https"`
	Apps           AppsConfig  `json:"apps"`
	AllowedOrigins []string    `json:"allowedOrigins"`
}

func DefaultConfig

func DefaultConfig() *Config

type HTTPConfig

type HTTPConfig struct {
	Address   string `json:"address"`
	CustomDir string `json:"customDir"`
}

type HTTPSConfig

type HTTPSConfig struct {
	Address    string               `json:"address"`
	Cert       []byte               `json:"cert"`
	Key        []byte               `json:"key"`
	SelfSigned SelfSignedCertConfig `json:"selfSigned"`
}

type SelfSignedCertConfig

type SelfSignedCertConfig struct {
	Enabled            bool   `json:"enabled"`
	NetworkFingerprint string `json:"networkFingerprint"`
}

type TransformFunc

type TransformFunc func(ctx context.Context, filename string, conf *Config) error

Jump to

Keyboard shortcuts

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