Documentation
¶
Index ¶
- Variables
- func Start(platform platforms.Platform, cfg *config.Instance, st *state.State, ...)
- type MethodMap
- func (m *MethodMap) AddMethod(name string, handler func(requests.RequestEnv) (any, error)) error
- func (m *MethodMap) GetMethod(name string) (func(requests.RequestEnv) (any, error), bool)
- func (m *MethodMap) ListMethods() []string
- func (m *MethodMap) Load(key any) (any, bool)
- func (m *MethodMap) Range(f func(key, value any) bool)
- func (m *MethodMap) Store(key, value any)
Constants ¶
This section is empty.
Variables ¶
View Source
var JSONRPCErrorInternalError = models.ErrorObject{
Code: -32603,
Message: "Internal error",
}
View Source
var JSONRPCErrorInvalidParams = models.ErrorObject{
Code: -32602,
Message: "Invalid params",
}
View Source
var JSONRPCErrorInvalidRequest = models.ErrorObject{
Code: -32600,
Message: "Invalid Request",
}
View Source
var JSONRPCErrorMethodNotFound = models.ErrorObject{
Code: -32601,
Message: "Method not found",
}
View Source
var JSONRPCErrorParseError = models.ErrorObject{
Code: -32700,
Message: "Parse error",
}
Functions ¶
func Start ¶
func Start( platform platforms.Platform, cfg *config.Instance, st *state.State, inTokenQueue chan<- tokens.Token, db *database.Database, limitsManager *playtime.LimitsManager, notifications <-chan models.Notification, mdnsHostname string, )
Start starts the API web server and blocks until it shuts down.
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package validation provides validation for API request parameters using go-playground/validator with custom validators for Zaparoo-specific types.
|
Package validation provides validation for API request parameters using go-playground/validator with custom validators for Zaparoo-specific types. |
Click to show internal directories.
Click to hide internal directories.