Documentation ¶
Overview ¶
Package store defines the storage interface for nightwatch.
Index ¶
Constants ¶
This section is empty.
Variables ¶
ProviderSet contains providers for creating instances of the datastore struct using Google Wire.
View Source
var (
// S is a global variable that holds the initialized instance of datastore for convenient access by other packages.
S *datastore
)
Functions ¶
Types ¶
type CronJobExpansion ¶
type CronJobExpansion interface{}
CronJobExpansion defines additional methods for cronjob operations.
type CronJobStore ¶
type CronJobStore interface { // Create inserts a new cron job into the database. Create(ctx context.Context, cronJob *model.CronJobM) error // Update modifies an existing cron job in the database. Update(ctx context.Context, cronJob *model.CronJobM) error // Delete removes cron jobs with the specified options. Delete(ctx context.Context, opts *where.WhereOptions) error // Get retrieves a cron job with the specified options. Get(ctx context.Context, opts *where.WhereOptions) (*model.CronJobM, error) // List returns a list of cron jobs with the specified options. List(ctx context.Context, opts *where.WhereOptions) (int64, []*model.CronJobM, error) CronJobExpansion }
CronJobStore defines the interface for managing cron jobs in the database.
type IStore ¶
type IStore interface { DB(ctx context.Context) *gorm.DB TX(ctx context.Context, fn func(ctx context.Context) error) error CronJobs() CronJobStore Jobs() JobStore }
IStore defines the interface for the store layer, specifying the methods that need to be implemented.
type JobExpansion ¶
type JobExpansion interface{}
JobExpansion defines additional methods for job operations.
type JobStore ¶
type JobStore interface { // Create inserts a new job into the database. Create(ctx context.Context, job *model.JobM) error // Update modifies an existing job in the database. Update(ctx context.Context, job *model.JobM) error // Delete removes jobs with the specified options. Delete(ctx context.Context, opts *where.WhereOptions) error // Get retrieves a job with the specified options.. Get(ctx context.Context, opts *where.WhereOptions) (*model.JobM, error) // List returns a list of jobs with the specified options. List(ctx context.Context, opts *where.WhereOptions) (int64, []*model.JobM, error) JobExpansion }
JobStore defines the interface for managing jobs in the database.
Click to show internal directories.
Click to hide internal directories.