Go to file
Evan Chen 46bf05acf1 build: add npm 2021-10-19 14:32:10 +08:00
configui fix #4, #1 2021-10-18 23:53:49 +08:00
public build: add npm 2021-10-19 14:32:10 +08:00
src build: add npm 2021-10-19 14:32:10 +08:00
templates update 2021-10-19 02:38:28 +08:00
.dockerignore build: add npm 2021-10-19 14:32:10 +08:00
.gitignore build: add npm 2021-10-19 14:32:10 +08:00
Dockerfile first commit 2021-10-18 16:49:16 +08:00
Makefile fix #4, #1 2021-10-18 23:53:49 +08:00
README.md fix #4, #1 2021-10-18 23:53:49 +08:00
api.go feat: #8, #9, #10 2021-10-19 12:34:01 +08:00
go.mod first commit 2021-10-18 16:49:16 +08:00
insomnia.json fix #4, #1 2021-10-18 23:53:49 +08:00
main.go update 2021-10-19 02:38:28 +08:00
netutil.go feat: #8, #9, #10 2021-10-19 12:34:01 +08:00
package-lock.json build: add npm 2021-10-19 14:32:10 +08:00
package.json build: add npm 2021-10-19 14:32:10 +08:00
release.sh first commit 2021-10-18 16:49:16 +08:00
route.go feat: #8, #9, #10 2021-10-19 12:34:01 +08:00
util.go feat: #8, #9, #10 2021-10-19 12:34:01 +08:00

README.md

Config UI

a web app to edit and action on update

Usage: configui [options]
  -bind string
        address to bind (default "localhost:8000")
  -c string
        cmd to apply
  -f string
        path to config file
  -log string
        log to file
  -n string
        alias of file
  -p string
        path to file, precedence over config
  -v    show version

Config

[
	{
		"path": "configui.log",
		"ro": true
	},
	{
		"path": "etc/test.ini",
		"name": "test",
		"action": "myip local -P"
	}
]

configui -f PATH/TO/CONFIG

Api

Files

GET /api/files

res:

{
  "test": {
    "path": "test",
    "name": "test",
    "action": "myip local -P",
    "data": ""
  }
}

File

GET /api/file?name=ALIAS

res:

{
  "action": "myip local -P",
  "data": "test",
  "name": "test",
  "path": "test"
}

Update

POST /api/file

req:

{
  "data": "test",
  "name": "test",
}

Apply

POST /api/apply?name=ALIAS