Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRStore ¶
type GRStore interface { ThingGetByID(ctx context.Context, id string) (*Thing, error) ThingSave(ctx context.Context, thing *Thing) error ThingDeleteByID(ctx context.Context, id string) error ThingsFind(ctx context.Context, qp *queryp.QueryParameters) ([]*Thing, *int64, error) WidgetGetByID(ctx context.Context, id string) (*Widget, error) WidgetSave(ctx context.Context, thing *Widget) error WidgetDeleteByID(ctx context.Context, id string) error WidgetsFind(ctx context.Context, qp *queryp.QueryParameters) ([]*Widget, *int64, error) }
GRStore is the persistent store of things
type Thing ¶
type Thing struct { // ID (Auto-Generated) ID string `json:"id"` // Created Timestamp Created time.Time `json:"created,omitempty"` // Updated Timestamp Updated time.Time `json:"updated,omitempty"` // Name Name string `json:"name"` // Description Description string `json:"description"` }
Thing
type ThingExample ¶
type ThingExample struct { // Name Name string `json:"name"` // Description Description string `json:"description"` }
ThingExample
type Widget ¶
type Widget struct { // ID (Auto-Generated) ID string `json:"id"` // Created Timestamp Created time.Time `json:"created,omitempty"` // Updated Timestamp Updated time.Time `json:"updated,omitempty"` // Name Name string `json:"name"` // Description Description string `json:"description"` // ThingID ThingID *string `json:"thing_id,omitempty" db:"thing_id"` // Loaded Structs Thing *Thing `json:"thing,omitempty" db:"thing"` }
Widget swagger:model gorestapi_Widget
type WidgetExample ¶
type WidgetExample struct { // Name Name string `json:"name"` // Description Description string `json:"description"` // ThingID ThingID *string `json:"thing_id,omitempty" db:"thing_id"` }
WidgetExample swagger:model gorestapi_WidgetExample
Click to show internal directories.
Click to hide internal directories.