util

package
v0.0.0-...-6617f65 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(c *gin.Context, obj interface{}) error

func CentralHost

func CentralHost() string

func CheckCreateDataDirectory

func CheckCreateDataDirectory()

func GetLogger

func GetLogger() *zap.Logger

func InitLogger

func InitLogger()

func IsPathDir

func IsPathDir(path string) bool

func IsPathExists

func IsPathExists(path string) bool

func SetAppConfigFilePath

func SetAppConfigFilePath(path string)

Types

type AppConfig

type AppConfig struct {
	ServerPort      int    `json:"server_port"`
	ServerMode      string `json:"server_mode"`
	CentralServer   string `json:"central_server"`
	CentralPort     int    `json:"central_port"`
	CentralProtocol string `json:"central_protocol"`
	DatabasePath    string `json:"database_path"`
}

func GetAppConfig

func GetAppConfig() *AppConfig

func (*AppConfig) GetServerMode

func (config *AppConfig) GetServerMode() string

func (*AppConfig) IsDebugMode

func (config *AppConfig) IsDebugMode() bool

type StorageConfig

type StorageConfig struct {
	StorageRootDir string `json:"storage-root-dir"`
	TempDir        string `json:"temp-dir"`
}

func GetStorageConfig

func GetStorageConfig() *StorageConfig

Jump to

Keyboard shortcuts

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