Documentation ¶
Index ¶
- func AlterItems(handler AlterItemHandler) feathers.Hook
- func CheckContext(ctx *feathers.Context, hookName string, allowedTypes []feathers.HookType, ...) error
- func CheckPermissions(requiredPermissions ...string) feathers.Hook
- func Combine(ctx *feathers.Context, chain ...feathers.Hook) error
- func Disallow(providers ...string) feathers.Hook
- func Discard(fields ...string) feathers.Hook
- func DiscardQuery(fields ...string) feathers.Hook
- func Every(checks ...feathers.BoolHook) feathers.BoolHook
- func GetItems(ctx *feathers.Context) interface{}
- func GetItemsNormalized(ctx *feathers.Context) ([]map[string]interface{}, bool)
- func Iff(pred feathers.BoolHook, trueHooks ...feathers.Hook) feathers.Hook
- func IffElse(pred feathers.BoolHook, trueHooks []feathers.Hook, falseHooks []feathers.Hook) feathers.Hook
- func IffNot(pred feathers.BoolHook, trueHooks ...feathers.Hook) feathers.Hook
- func IsNot(check feathers.BoolHook) feathers.BoolHook
- func IsProvider(provider string) feathers.BoolHook
- func Join(joinConfig map[string]JoinOperator) feathers.Hook
- func Keep(keep ...string) feathers.Hook
- func KeepQuery(keep ...string) feathers.Hook
- func LowerCase(fields ...string) feathers.Hook
- func NormalizeSlice(data interface{}) (interface{}, bool)
- func PreventChanges(retError bool, fields ...string) feathers.Hook
- func ReplaceItems(ctx *feathers.Context, data interface{})
- func ReplaceItemsNormalized(ctx *feathers.Context, data interface{}, normalized bool)
- func Required(fields ...string) feathers.Hook
- func RequiredQuery(fields ...string) feathers.Hook
- func SetNow(fields ...string) feathers.Hook
- func Some(checks ...feathers.BoolHook) feathers.BoolHook
- func UnormalizeSlice(data interface{}, normalized bool) interface{}
- type AlterItemHandler
- type JoinOperator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlterItems ¶
func AlterItems(handler AlterItemHandler) feathers.Hook
AlterItems alters the items (either data or result) different to the original feathers-hook returning nil will remove the item from items Returning error in handler will immediatly cancel execution and return error
func CheckContext ¶
func CheckContext(ctx *feathers.Context, hookName string, allowedTypes []feathers.HookType, allowedMethods []feathers.RestMethod) error
CheckContext checks the context for required properties. returns error if requirement not set.
func CheckPermissions ¶
func Disallow ¶
*
Disallow throws error if user is any of these providers If no providers are passed route is completely disabled
func DiscardQuery ¶
func GetItemsNormalized ¶
func IsProvider ¶
IsProvider BoolHook checks if is provider of specific type
func NormalizeSlice ¶
func NormalizeSlice(data interface{}) (interface{}, bool)
func ReplaceItems ¶
func ReplaceItemsNormalized ¶
func RequiredQuery ¶
Required checks if all passed fields are set
func UnormalizeSlice ¶
func UnormalizeSlice(data interface{}, normalized bool) interface{}
Types ¶
type AlterItemHandler ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.