Versions in this module Expand all Collapse all v0 v0.1.0 Mar 26, 2021 Changes in this version + func GetMux(req *http.Request) http.Handler + func GetPath(req *http.Request) riposo.Path + func Parse(r *http.Request, v interface{}) error + func Render(w http.ResponseWriter, v interface{}) + func WithTxn(ctx context.Context, txn *Txn) context.Context + type Config struct + Guard Guard + Pagination struct{ ... } + type Guard map[string][]string + func (v Guard) Verify(tx permission.Transaction, principals []string, target []permission.ACE) (bool, error) + type HandlerFunc func(out http.Header, req *http.Request) interface + func (f HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Middleware func(http.Handler) http.Handler + type Model interface + Create func(txn *Txn, path riposo.Path, payload *schema.Resource) error + Delete func(txn *Txn, path riposo.Path) (*schema.Object, error) + DeleteAll func(txn *Txn, path riposo.Path, objIDs ...string) (riposo.Epoch, error) + Get func(txn *Txn, path riposo.Path) (*schema.Resource, error) + Patch func(txn *Txn, path riposo.Path, hs storage.UpdateHandle, payload *schema.Resource) error + Update func(txn *Txn, path riposo.Path, hs storage.UpdateHandle, payload *schema.Resource) error + func StdModel() Model + type Routes struct + func NewRoutes(cfg *Config) *Routes + func (r *Routes) Handle(pattern string, handler http.Handler) + func (r *Routes) Method(method, pattern string, handler http.Handler) + func (r *Routes) Mux() http.Handler + func (r *Routes) Resource(prefix string, model Model) + func (r *Routes) Use(middleware Middleware) + type Txn struct + Cache cache.Transaction + Data map[string]interface{} + Helpers *riposo.Helpers + Perms permission.Transaction + Store storage.Transaction + User *User + func GetTxn(req *http.Request) *Txn + func NewTxn(ctx context.Context, cns *conn.Set, hlp *riposo.Helpers) (*Txn, error) + func (t *Txn) Abort() error + func (t *Txn) Commit() error + type User struct + ID string + Principals []string + func (u *User) IsAuthenticated() bool