Documentation
¶
Overview ¶
Package auth provides functionality for authentication and authorization, including operations for managing application entities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo interface { // GetApp retrieves an application by its properties. GetApp(ctx context.Context, app *auth.App) (*auth.App, error) // Create inserts a new application into the database. Create(ctx context.Context, app *auth.App) (uint, error) // ExistAppByName checks if an application with the given name exists. ExistAppByName(ctx context.Context, name string) (bool, error) }
Repo defines the interface for application-related database operations.
func NewAppRepo ¶
NewAppRepo creates a new instance of the application repository.
Parameters:
- db: A pointer to the gorm.DB instance for database operations.
- redis: A pointer to the redis.Manager for caching operations.
Returns:
- Repo: An implementation of the Repo interface.
Example:
db := // initialize gorm.DB redisManager := // initialize redis.Manager appRepo := NewAppRepo(db, redisManager)
Click to show internal directories.
Click to hide internal directories.