Documentation ¶
Index ¶
- type DB
- func (db *DB) Create(ctx context.Context, s *Schedule) (*Schedule, error)
- func (db *DB) CreateScheduleTx(ctx context.Context, tx *sql.Tx, s *Schedule) (*Schedule, error)
- func (db *DB) Delete(ctx context.Context, id string) error
- func (db *DB) DeleteManyTx(ctx context.Context, tx *sql.Tx, ids []string) error
- func (db *DB) DeleteTx(ctx context.Context, tx *sql.Tx, id string) error
- func (db *DB) FindAll(ctx context.Context) ([]Schedule, error)
- func (db *DB) FindMany(ctx context.Context, ids []string) ([]Schedule, error)
- func (db *DB) FindOne(ctx context.Context, id string) (*Schedule, error)
- func (db *DB) FindOneForUpdate(ctx context.Context, tx *sql.Tx, id string) (*Schedule, error)
- func (db *DB) Search(ctx context.Context, opts *SearchOptions) ([]Schedule, error)
- func (db *DB) Update(ctx context.Context, s *Schedule) error
- func (db *DB) UpdateTx(ctx context.Context, tx *sql.Tx, s *Schedule) error
- type ReadStore
- type Schedule
- type SearchCursor
- type SearchOptions
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CreateScheduleTx ¶
func (*DB) DeleteManyTx ¶
func (*DB) FindOneForUpdate ¶
type Schedule ¶
type SearchCursor ¶
type SearchCursor struct {
Name string `json:"n,omitempty"`
}
SearchCursor is used to indicate a position in a paginated list.
type SearchOptions ¶
type SearchOptions struct { Search string `json:"s,omitempty"` After SearchCursor `json:"a,omitempty"` // Omit specifies a list of schedule IDs to exclude from the results. Omit []string `json:"o,omitempty"` Limit int `json:"-"` }
SearchOptions allow filtering and paginating the list of schedules.
type Store ¶
type Store interface { ReadStore Create(context.Context, *Schedule) (*Schedule, error) CreateScheduleTx(context.Context, *sql.Tx, *Schedule) (*Schedule, error) Update(context.Context, *Schedule) error UpdateTx(context.Context, *sql.Tx, *Schedule) error Delete(context.Context, string) error DeleteTx(context.Context, *sql.Tx, string) error DeleteManyTx(context.Context, *sql.Tx, []string) error FindMany(context.Context, []string) ([]Schedule, error) FindOneForUpdate(ctx context.Context, tx *sql.Tx, id string) (*Schedule, error) Search(context.Context, *SearchOptions) ([]Schedule, error) }
Click to show internal directories.
Click to hide internal directories.