utils

package
v0.0.0-...-11ae3f5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: GPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Database

func Database() *gorm.DB

func GetCustomFunctions

func GetCustomFunctions(c *gin.Context, tpl *template.Template) template.FuncMap

func NewFileStore

func NewFileStore(config *Config) *minio.Client

func RemoveRecursive

func RemoveRecursive(client *minio.Client, bucketName string, prefix string) error

func TokenCleaner

func TokenCleaner(db *gorm.DB)

Types

type Config

type Config struct {
	Port                 int
	EnableAPIAuth        bool
	MinioConfig          MinioConfig
	BaseURL              *url.URL
	GrubSupportEnabled   bool
	TFTPEnabled          bool
	DefaultBootentryName string
}

func GetConfig

func GetConfig() *Config

type MinioConfig

type MinioConfig struct {
	Endpoint   string
	AccessKey  string
	SecretKey  string
	BucketName string
	Secure     bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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