Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AfterFetcher ¶
type AfterFetcher interface {
//AfterFetch one of the lifecycle hooks, returns bool if response was closed (i.e. response.WriteHeader())
//or just an error if it is needed to stop the routers flow.
//view is type of *[]T or *[]*T
AfterFetch(data interface{}, response http.ResponseWriter, request *http.Request) (responseClosed bool, err error)
}
AfterFetcher represents Lifecycle hook with is called after view was read from Database. It is important to specify View type for assertion type purposes.
type BeforeFetcher ¶
type BeforeFetcher interface {
//BeforeFetch one of the lifecycle hooks, returns bool if response was closed (i.e. response.WriteHeader())
//or just an error if it is needed to stop the routers flow.
BeforeFetch(response http.ResponseWriter, request *http.Request) (responseClosed bool, err error)
}
BeforeFetcher represents Lifecycle hook which is called before view was read from the Database.
type LifecycleVisitor ¶
type LifecycleVisitor interface{}
LifecycleVisitor visitor can implement BeforeFetcher and/or AfterFetcher
Click to show internal directories.
Click to hide internal directories.