mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-16 21:58:40 +00:00
6529549289
* implement custom http handler interface * implement trace_id * normalize http method spacing for consistent logs * fix failing test * fix linter errors * cleanup old dead code * more route cleanup * cleanup some inconsistent errors * update and generate code * make taskfile more consistent * update task calls * run tidy * drop `@` tag for version * use relative paths * tidy * fix auto-setting variables * update build paths * add contributing guide * tidy
19 lines
441 B
Go
19 lines
441 B
Go
package server
|
|
|
|
type Result struct {
|
|
Error bool `json:"error,omitempty"`
|
|
Details interface{} `json:"details,omitempty"`
|
|
Message string `json:"message,omitempty"`
|
|
Item interface{} `json:"item,omitempty"`
|
|
}
|
|
|
|
type Results struct {
|
|
Items any `json:"items"`
|
|
}
|
|
|
|
// Wrap creates a Wrapper instance and adds the initial namespace and data to be returned.
|
|
func Wrap(data interface{}) Result {
|
|
return Result{
|
|
Item: data,
|
|
}
|
|
}
|