Documentation
¶
Index ¶
- type App
- func (a *App) Delete(val Storable)
- func (a *App) Find(key string) (val interface{}, found bool)
- func (a *App) List(val Storable) map[string]interface{}
- func (a *App) Load() error
- func (a *App) MarshalJSON() ([]byte, error)
- func (a *App) New(val Storable) (uuid_ string)
- func (a *App) RegisterRoutes(rt *router.Router)
- func (a *App) UnmarshalJSON(by []byte) error
- func (a *App) Update(val Storable)
- type FileStore
- type Storable
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { *sync.RWMutex `json:"-"` GET *route.Route `json:"-"` PATCH *route.Route `json:"-"` POST *route.Route `json:"-"` DELETE *route.Route `json:"-"` INDEX *route.Route `json:"-"` Data map[string]interface{} BeforeDelete func(interface{}) error `json:"-"` // contains filtered or unexported fields }
func NewApp ¶
NewApp creates a new app, storing in store (if not nil). types are pointers to instances of the types that should be stored the types must be in the order of their dependencies, i.e. non dependant types come first. this is important when reloading the data from the store
func (*App) MarshalJSON ¶
func (*App) RegisterRoutes ¶
func (a *App) RegisterRoutes(rt *router.Router)
func (*App) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.