Documentation
¶
Overview ¶
nolint: dupl
Package store defines the storage interface for nightwatch.
nolint: dupl
Index ¶
Constants ¶
This section is empty.
Variables ¶
ProviderSet is a Wire provider set that declares dependency injection rules. It includes the NewStore constructor function to generate datastore instances. wire.Bind is used to bind the IStore interface to the concrete implementation *datastore, allowing automatic injection of *datastore instances wherever IStore is required.
var ( // S is a global variable for convenient access to the initialized datastore // instance from other packages. S *datastore )
Functions ¶
Types ¶
type CronJobExpansion ¶
type CronJobExpansion interface{}
CronJobExpansion is an empty interface provided for extending the CronJobStore interface. Developers can define cronjob-specific additional methods in this interface for future expansion.
type CronJobStore ¶
type CronJobStore interface {
// Create inserts a new CronJob record into the store.
Create(ctx context.Context, obj *model.CronJobM) error
// Update modifies an existing CronJob record in the store based on the given model.
Update(ctx context.Context, obj *model.CronJobM) error
// Delete removes CronJob records that satisfy the given query options.
Delete(ctx context.Context, opts *where.Options) error
// Get retrieves a single CronJob record that satisfies the given query options.
Get(ctx context.Context, opts *where.Options) (*model.CronJobM, error)
// List retrieves a list of CronJob records and their total count based on the given query options.
List(ctx context.Context, opts *where.Options) (int64, []*model.CronJobM, error)
// CronJobExpansion is a placeholder for extension methods for cronjobs,
// to be implemented by additional interfaces if needed.
CronJobExpansion
}
CronJobStore defines the interface for managing cronjob-related data operations.
type IStore ¶
type IStore interface {
// DB returns the *gorm.DB instance of the Store layer, which might be used in rare cases.
DB(ctx context.Context, wheres ...where.Where) *gorm.DB
// TX is used to implement transactions in the Biz layer.
TX(ctx context.Context, fn func(ctx context.Context) error) error
// CronJob returns an implementation of the CronJobStore.
CronJob() CronJobStore
// Job returns an implementation of the JobStore.
Job() JobStore
}
IStore defines the methods that the Store layer needs to implement.
type JobExpansion ¶
type JobExpansion interface{}
JobExpansion is an empty interface provided for extending the JobStore interface. Developers can define job-specific additional methods in this interface for future expansion.
type JobStore ¶
type JobStore interface {
// Create inserts a new Job record into the store.
Create(ctx context.Context, obj *model.JobM) error
// Update modifies an existing Job record in the store based on the given model.
Update(ctx context.Context, obj *model.JobM) error
// Delete removes Job records that satisfy the given query options.
Delete(ctx context.Context, opts *where.Options) error
// Get retrieves a single Job record that satisfies the given query options.
Get(ctx context.Context, opts *where.Options) (*model.JobM, error)
// List retrieves a list of Job records and their total count based on the given query options.
List(ctx context.Context, opts *where.Options) (int64, []*model.JobM, error)
// JobExpansion is a placeholder for extension methods for jobs,
// to be implemented by additional interfaces if needed.
JobExpansion
}
JobStore defines the interface for managing job-related data operations.