common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SilentError

func SilentError(v ...any)

func StrIsInSlice

func StrIsInSlice(element string, slice []string) bool

func StrRemoveProtocol

func StrRemoveProtocol(url string) (string, error)

func StrRemoveSpaces

func StrRemoveSpaces(input string) string

Types

type Config

type Config struct {
	Host      string   `yaml:"host"`
	Port      int      `yaml:"listen"`
	ImgTheme  string   `yaml:"img_yheme"`
	Cors      bool     `yaml:"cors"`
	Hostnames []string `yaml:"hostnames"`
	ErrorLog  string   `yaml:"error_log"`
	DBCfg     DBConfig `yaml:"db"`
}

type DBConfig

type DBConfig struct {
	Type     string `yaml:"type"`
	Dbname   string `yaml:"dbname"`
	Host     string `yaml:"host"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func (Logger) InitLogger

func (l Logger) InitLogger(path string)

Jump to

Keyboard shortcuts

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