profile

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	// Mode can be "prod" or "dev"
	Mode string `json:"mode"`
	// Port is the binding port for server
	Port int `json:"-"`
	// Data is the data directory
	Data string `json:"-"`
	// DSN points to where slash stores its own data
	DSN string `json:"-"`
	// Driver is the database driver
	// sqlite, mysql
	Driver string `json:"-"`
	// Version is the current version of server
	Version string `json:"version"`
	// Metric indicate the metric collection is enabled or not
	Metric bool `json:"-"`
}

Profile is the configuration to start main server.

func GetProfile

func GetProfile() (*Profile, error)

GetProfile will return a profile for dev or prod.

func (*Profile) IsDev

func (p *Profile) IsDev() bool

Jump to

Keyboard shortcuts

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