mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 08:52:24 +00:00
Compare commits
3 Commits
166c8470d4
...
b601962354
| Author | SHA1 | Date | |
|---|---|---|---|
| b601962354 | |||
| 38f784b850 | |||
| 6d2bf5cdd2 |
10
com/List.lua
10
com/List.lua
@@ -1,5 +1,15 @@
|
|||||||
-- com/List.lua
|
-- com/List.lua
|
||||||
|
|
||||||
|
if In.Params and In.Params.about then
|
||||||
|
Out.Result = {
|
||||||
|
description = "Returns a list of available methods",
|
||||||
|
params = {
|
||||||
|
layer = "select which layer list to display"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local function isValidCommand(name)
|
local function isValidCommand(name)
|
||||||
return name:match("^[%w]+$") ~= nil
|
return name:match("^[%w]+$") ~= nil
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
if In.Params and In.Params.about then
|
||||||
|
Out.Result = {
|
||||||
|
description = "Echo of the message",
|
||||||
|
params = {
|
||||||
|
msg = "just message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local function validate()
|
local function validate()
|
||||||
if not In.Params.msg or In.Params.msg == "" then
|
if not In.Params.msg or In.Params.msg == "" then
|
||||||
Out.Error = {
|
Out.Error = {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
Log.Event("got ping")
|
if In.Params and In.Params.about then
|
||||||
Log.EventWarn("got ping")
|
Out.Result = {
|
||||||
Log.EventError("got ping")
|
description = "Just ping"
|
||||||
|
}
|
||||||
Log.Error("mm")
|
return
|
||||||
|
end
|
||||||
|
|
||||||
Out.Result.answer = "pong"
|
Out.Result.answer = "pong"
|
||||||
@@ -32,12 +32,6 @@ type HTTPServer struct {
|
|||||||
Port string `mapstructure:"port"`
|
Port string `mapstructure:"port"`
|
||||||
Timeout time.Duration `mapstructure:"timeout"`
|
Timeout time.Duration `mapstructure:"timeout"`
|
||||||
IdleTimeout time.Duration `mapstructure:"idle_timeout"`
|
IdleTimeout time.Duration `mapstructure:"idle_timeout"`
|
||||||
HTTPServer_Api HTTPServer_Api `mapstructure:"api"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type HTTPServer_Api struct {
|
|
||||||
LatestVer string `mapstructure:"latest-version"`
|
|
||||||
Layers []string `mapstructure:"layers"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type TLS struct {
|
type TLS struct {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package config
|
|||||||
|
|
||||||
import "os"
|
import "os"
|
||||||
|
|
||||||
|
// TODO: Need to make a more harmonious and understandable way of storing global variables
|
||||||
|
|
||||||
// UUIDLength is uuids length for sessions. By default it is 16 bytes.
|
// UUIDLength is uuids length for sessions. By default it is 16 bytes.
|
||||||
var UUIDLength int = 16
|
var UUIDLength int = 16
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user