Documentation ¶
Index ¶
- type Filter
- type Item
- type Model
- func (m *Model) Create(ctx context.Context, item *Item) (*uuid.UUID, error)
- func (m *Model) Delete(ctx context.Context, id *uuid.UUID) error
- func (m *Model) Get(ctx context.Context, filter *Filter) (*Item, error)
- func (m *Model) List(ctx context.Context, filter *Filter) (*map[uuid.UUID]Item, error)
- func (m *Model) MaxSortOrder(ctx context.Context) (*uint64, error)
- func (m *Model) Patch(ctx context.Context, id *uuid.UUID, fields *map[string]interface{}) error
- func (m *Model) TableIndexCount(ctx context.Context) (*uint64, error)
- func (m *Model) Update(ctx context.Context, item *Item) error
- func (m *Model) UpdatedAt(ctx context.Context, id *uuid.UUID) (*time.Time, error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter = db.FileFilter
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is a struct that contains the SQL statement builder and the PostgreSQL client.
func NewStorage ¶
NewStorage is a constructor function that returns a new instance of the Model.
func (*Model) TableIndexCount ¶
type Storage ¶
type Storage interface { Get(context.Context, *Filter) (*Item, error) List(context.Context, *Filter) (*map[uuid.UUID]Item, error) Create(context.Context, *Item) (*uuid.UUID, error) Update(context.Context, *Item) error Patch(context.Context, *uuid.UUID, *map[string]interface{}) error UpdatedAt(context.Context, *uuid.UUID) (*time.Time, error) MaxSortOrder(context.Context) (*uint64, error) TableIndexCount(context.Context) (*uint64, error) Delete(context.Context, *uuid.UUID) error // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.