profile

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 8 Imported by: 15

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" or "demo"
	Mode string `json:"mode"`
	// Addr is the binding address for server
	Addr string `json:"-"`
	// Port is the binding port for server
	Port int `json:"-"`
	// Data is the data directory
	Data string `json:"-"`
	// DSN points to where memos 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"`
	// Frontend indicate the frontend is enabled or not
	Frontend bool `json:"-"`
	// Origins is the list of allowed origins
	Origins []string `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 added in v0.11.1

func (p *Profile) IsDev() bool

Jump to

Keyboard shortcuts

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