Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Factory ¶
type Factory interface { Users() UserStore // Users returns an instance of UserStore for user-related data operations. Close() error // Close is responsible for closing any resources used by the factory, e.g., database connections. }
Factory is an interface that abstracts the creation of different stores. It provides methods to access different data stores and to close them.
type UserStore ¶
type UserStore interface { Create(ctx context.Context, user *model.User, opts model.CreateOptions) error Update(ctx context.Context, user *model.User, opts model.UpdateOptions) error Delete(ctx context.Context, userId uint64, opts model.DeleteOptions) error // DeleteCollection(ctx context.Context, userId []uint64, opts model.DeleteOptions) error Get(ctx context.Context, userId uint64, opts model.GetOptions) (*model.User, error) GetByUsername(ctx context.Context, username string, opts model.GetOptions) (*model.User, error) List(ctx context.Context, opts model.ListOptions) (*model.UserList, error) }
UserStore defines the user storage interface.
Directories ¶
Path | Synopsis |
---|---|
Package mock_store is a generated GoMock package.
|
Package mock_store is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.