Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
ProviderSet is a Wire provider set that initializes new datastore instances and binds the IStore interface to the actual datastore type.
View Source
var (
S *datastore
)
Singleton instance variables.
Functions ¶
Types ¶
type ByOrder ¶
type ByOrder []*model.ConfigurationM
type IStore ¶
type IStore interface { TX(context.Context, func(ctx context.Context) error) error Users() UserStore }
IStore is an interface that represents methods required to be implemented by a Store implementation.
type UserStore ¶
type UserStore interface { // Create adds a new user record to the database. Create(ctx context.Context, user *model.UserM) error // List returns a slice of user records based on the specified query conditions. List(ctx context.Context, opts ...meta.ListOption) (int64, []*model.UserM, error) // Get retrieves a user record by userID and username. Get(ctx context.Context, userID string, username string) (*model.UserM, error) // Update modifies an existing user record. Update(ctx context.Context, user *model.UserM) error // Delete removes a user record using the provided filters. Delete(ctx context.Context, filters map[string]any) error // Extensions // Fetch retrieves a user record using provided filters. Fetch(ctx context.Context, filters map[string]any) (*model.UserM, error) // GetByUsername retrieves a user record using username as the query condition. GetByUsername(ctx context.Context, username string) (*model.UserM, error) }
UserStore defines the interface for managing user data storage.
Click to show internal directories.
Click to hide internal directories.