config

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Port int `json:"port"`
}

type Config

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

func NewConfig

func NewConfig() *Config

func (*Config) GetBooleanOrDefault

func (config *Config) GetBooleanOrDefault(section string, name string, defaultValue bool) bool

func (*Config) GetInt

func (config *Config) GetInt(section, name string) int

func (*Config) GetIntOrDefault

func (config *Config) GetIntOrDefault(section string, name string, defaultValue int) int

func (*Config) GetString

func (config *Config) GetString(section, name string) string

func (*Config) GetStringOrDefault

func (config *Config) GetStringOrDefault(section string, name string, defaultValue string) string

func (*Config) Init

func (config *Config) Init(webPort int, apiPort int, rootPath string) error

func (*Config) ReadSetInfo

func (config *Config) ReadSetInfo() *SetInfo

func (*Config) UpdateSetInfo

func (config *Config) UpdateSetInfo(setInfo *SetInfo) error

type Manage

type Manage struct {
	Port            int    `json:"port"`
	WebPath         string `json:"webPath"`
	Username        string `json:"username"`
	Password        string `json:"password"`
	ConfirmPassword string `json:"confirmPassword"`
}

type Mysql

type Mysql struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Dbname   string `json:"dbname"`
	Username string `json:"username"`
	Password string `json:"password"`
	Charset  string `json:"charset"`
}

type Schedule

type Schedule struct {
	Start bool `json:"start"`
}

type SetInfo

type SetInfo struct {
	HasInit   bool      `json:"hasInit"`
	DbType    string    `json:"dbType"`
	CachePath string    `json:"cachePath"`
	Sqlite    *Sqlite   `json:"sqlite"`
	Mysql     *Mysql    `json:"mysql"`
	Manage    *Manage   `json:"manage"`
	Api       *Api      `json:"api"`
	IsDocker  bool      `json:"isDocker"`
	Schedule  *Schedule `json:"schedule"`
}

type Sqlite

type Sqlite struct {
	Filename string `json:"filename"`
}

type System

type System struct {
	HasInit  bool `json:"hasInit"`
	HasLogin bool `json:"hasLogin"`
	IsDocker bool `json:"isDocker"`
}

Jump to

Keyboard shortcuts

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