Documentation ¶
Index ¶
- Constants
- func AcceptJSON() gin.HandlerFunc
- func ApplyPatch(changes []PatchChange, fields []PatchFieldInfo, fallback *map[string]string) (bool, error)
- func DecodePatchPath(path string) ([]string, error)
- func RequiresFormat(ctype string) gin.HandlerFunc
- func StringListAdd(vals []string, val string) []string
- func StringListDel(vals []string, val string) []string
- type LinkInfo
- type PatchChange
- type PatchFieldInfo
- type Service
- type ServiceList
Constants ¶
View Source
const ( OP_ADD = "add" OP_REMOVE = "remove" OP_REPLACE = "replace" )
Variables ¶
This section is empty.
Functions ¶
func AcceptJSON ¶
func AcceptJSON() gin.HandlerFunc
Recovery returns a middleware that recovers from any panics and writes a 500 if there was one.
func ApplyPatch ¶
func ApplyPatch(changes []PatchChange, fields []PatchFieldInfo, fallback *map[string]string) (bool, error)
func DecodePatchPath ¶
func RequiresFormat ¶
func RequiresFormat(ctype string) gin.HandlerFunc
func StringListAdd ¶
func StringListDel ¶
Types ¶
type PatchChange ¶
type PatchFieldInfo ¶
type PatchFieldInfo struct { Name []string String *string StringPtr **string Boolean *bool UInt64 *uint64 UInt64Ptr **uint64 StringList *[]string }
func GetPatchField ¶
func GetPatchField(name []string, fields []PatchFieldInfo) (PatchFieldInfo, error)
type ServiceList ¶
type ServiceList struct {
Services []Service
}
func (*ServiceList) AddService ¶
func (svcs *ServiceList) AddService(svc Service)
func (*ServiceList) RegisterRoutes ¶
func (svcs *ServiceList) RegisterRoutes(router *gin.Engine)
Click to show internal directories.
Click to hide internal directories.