config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureConfigDirectory

func EnsureConfigDirectory(path string) error

EnsureConfigDirectory ensures the configuration directory exists

func LoadDefaultTemplates

func LoadDefaultTemplates(db *database.DB) error

LoadDefaultTemplates loads the default middleware templates

func SaveTemplateFile

func SaveTemplateFile(templatesDir string) error

SaveTemplateFile saves the default templates file if it doesn't exist

Types

type DefaultMiddleware

type DefaultMiddleware struct {
	ID     string                 `yaml:"id"`
	Name   string                 `yaml:"name"`
	Type   string                 `yaml:"type"`
	Config map[string]interface{} `yaml:"config"`
}

DefaultMiddleware represents a default middleware template

type DefaultTemplates

type DefaultTemplates struct {
	Middlewares []DefaultMiddleware `yaml:"middlewares"`
}

DefaultTemplates represents the structure of the templates.yaml file

Jump to

Keyboard shortcuts

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