setup

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Canceled = make(chan bool, 1)

Canceled check if setup is canceld

View Source
var Done = make(chan bool, 1)

Done check done

View Source
var SetupPort string = "5099"

SetupPort setup port

View Source
var XGenSetupServer http.Handler = http.FileServer(data.Setup())

XGenSetupServer XGen Setup

Functions

func AdminURL

func AdminURL(cfg config.Config) ([]string, error)

AdminURL get admin url

func Check

func Check() bool

Check if the app is installed true: start setup, false: start app

func Complete

func Complete()

Complete stop the studio api server

func Install

func Install(payload map[string]map[string]string) error

Install app install

{
  "env": {
    "YAO_LANG": "中文",
    "YAO_ENV": "开发模式(推荐)",
    "YAO_PORT": "5099",
    "YAO_STUDIO_PORT": "5077"
  },
  "db": {
    "type": "sqlite",
    "option.file": "db/yao.db"
  }
}

{
	"env": {
	  "YAO_LANG": "中文",
	  "YAO_ENV": "开发模式(推荐)",
	  "YAO_PORT": "5099",
	  "YAO_STUDIO_PORT": "5077"
	},
	"db": {
	  "type": "mysql",
	  "option.db": "yao",
	  "option.host.host": "127.0.0.1",
	  "option.host.port": "3306",
	  "option.host.user": "root",
	  "option.host.pass": "123456"
	}
}

func Ips

func Ips() ([]string, error)

Ips get the local ip list

func Start

func Start() (err error)

Start start the studio api server

func Stop

func Stop()

Stop stop the studio api server

func URLs

func URLs(cfg config.Config) ([]string, error)

URLs get admin url

func ValidateDB

func ValidateDB(option map[string]string) error

ValidateDB db connection

func ValidateHosting

func ValidateHosting(option map[string]string) error

ValidateHosting host ports

Types

This section is empty.

Jump to

Keyboard shortcuts

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