Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{ Log: Log{ Level: "debug", Dir: "./logs", FileFormat: "2006-01-02.log", }, Server: Server{ Address: ":3000", Header: "CatSync", }, Actions: []Action{ { Route: "/", Action: action.String, ActionData: "Hello from CatSync!", }, { Route: "/json", Action: action.JSON, ActionData: fiber.Map{ "msg": "Hello from CatSync!", "data": fiber.Map{ "version": version.GetFormatVersion(), }, }, }, }, }
View Source
var ErrConfigNotFound = errors.New("config file not found")
View Source
var Path string
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
Route string `json:"route" yaml:"route"`
Action action.Type `json:"action" yaml:"action"`
ActionData action.Data `json:"actionData" yaml:"actionData"`
ResponseHeader http.Header `json:"responseHeader" optional:"true" yaml:"responseHeader"`
Auth ActionAuth `json:"auth" optional:"true" yaml:"auth"`
}
type ActionAuth ¶
type ActionAuth struct {
UA string `json:"ua" optional:"true" yaml:"ua"`
Query ActionAuthQuery `json:"query" optional:"true" yaml:"query"`
}
type ActionAuthQuery ¶
type Config ¶
Click to show internal directories.
Click to hide internal directories.