The (Hlist-like) collection of ancestor keys has this type.
The (Hlist-like) collection of ancestor keys has this type.
The (HList-like) collection of all keys that identifies a single element of this collection.
The (HList-like) collection of all keys that identifies a single element of this collection.
A references to the parent resource (used to construct the path key parser).
A references to the parent resource (used to construct the path key parser).
Must be implemented in the resources that this trait is mixed into, typically with a val param.
class MyNestedResource @Inject() ( val parentResource: MyParentResource) extends CollectionResource[KeyType, ElemType] with NestedCollection[MyParentResource, KeyType] { // ... }
Helper to easily construct Naptime actions.
Helper to easily construct Naptime actions.
Typically, all actions in a naptime resource will all use the same auth parser and policy, or will want to use the same error handling function for all requests. These resources should do something similar to the following:
class MyResource extends TopLevelCollectionResource[MyKeyType, MyValueType] { def Rest[RACType, ResponseType] = Nap[RACType, ResponseType].auth(myAuthPolicy).catching(errorFn) ... }
Provide a default pagination configuration for the resource that users can override and configure as needed.
Provide a default pagination configuration for the resource that users can override and configure as needed.
If the resource is a courier model, extending from NestedCourierCollectionResource removes some boilerplate.
Aside from automating some of the boilerplate away, it functions the same as a standard CollectionResource. If the resource is a top level resource, check out the CourierCollectionResource abstract class.
To configure customized fields, use the following snippet:
The parent resource (for nesting purposes). If it is a top level, check out: CourierCollectionResource
The key type of the resource.
The "value" type of the resource.