2018-07-08 22:50:01 +02:00
|
|
|
package models
|
|
|
|
|
2018-07-10 14:02:23 +02:00
|
|
|
// CRUDable defines the crud methods
|
2018-07-08 22:50:01 +02:00
|
|
|
type CRUDable interface {
|
2018-07-11 02:13:53 +02:00
|
|
|
Create(*User, int64) error
|
2018-07-08 22:50:01 +02:00
|
|
|
ReadOne(int64) error
|
|
|
|
ReadAll(*User) (interface{}, error)
|
2018-07-12 23:07:03 +02:00
|
|
|
Update(int64) error
|
2018-07-12 22:42:41 +02:00
|
|
|
Delete(int64) error
|
2018-07-14 17:34:59 +02:00
|
|
|
|
|
|
|
// This method is needed, because old values would otherwise remain in the struct.
|
|
|
|
// TODO find a way of not needing an extra function
|
|
|
|
Empty()
|
2018-07-08 22:50:01 +02:00
|
|
|
}
|