Documentation
¶
Overview ¶
Package authclient provides repository access for authentication client management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClient ¶ added in v0.4.0
type AuthClient = models.AuthClient
type AuthSession ¶ added in v0.4.0
type AuthSession = models.AuthSession
type ListOptions ¶ added in v0.4.0
type ListOptions = repository.ListOptions
Type aliases for common repository types.
type Pagination ¶ added in v0.4.0
type Pagination = repository.Pagination
Type aliases for common repository types.
type QOption ¶ added in v0.4.0
type QOption = repository.QOption
Type aliases for common repository types.
type Repository ¶
type Repository interface {
// Get retrieves an AuthClient by ID.
Get(ctx context.Context, id string) (*AuthClient, error)
// FetchList retrieves a list of AuthClients with optional query parameters.
FetchList(ctx context.Context, opts ...QOption) ([]*AuthClient, error)
// Count returns the total number of AuthClients matching the query options.
Count(ctx context.Context, opts ...QOption) (int64, error)
// Create adds a new AuthClient and returns its ID.
Create(ctx context.Context, authClient *AuthClient, opts ...QOption) (string, error)
// Update modifies an existing AuthClient by ID.
Update(ctx context.Context, id string, authClient *AuthClient, opts ...QOption) error
// Delete removes an AuthClient by ID.
Delete(ctx context.Context, id string, opts ...QOption) error
}
Repository defines the interface for AuthClient data access operations.
type SessionFilter ¶ added in v0.5.2
type SessionFilter struct {
ID []uint64
ClientID []string
Username []string
Subject []string
Active *bool
Query string
}
SessionFilter of the auth_session list
func (*SessionFilter) PrepareQuery ¶ added in v0.5.2
func (fl *SessionFilter) PrepareQuery(query *gorm.DB) *gorm.DB
PrepareQuery applies filter conditions to a GORM query
type SessionListOrder ¶ added in v0.5.2
type SessionListOrder struct {
ID models.Order
ClientID models.Order
CreatedAt models.Order
AccessTokenExpiresAt models.Order
}
SessionListOrder defines sort order for session query results
func (*SessionListOrder) PrepareQuery ¶ added in v0.5.2
func (ord *SessionListOrder) PrepareQuery(query *gorm.DB) *gorm.DB
PrepareQuery applies sort order to a GORM query
type SessionRepository ¶ added in v0.5.2
type SessionRepository interface {
Get(ctx context.Context, id uint64, opts ...QOption) (*AuthSession, error)
FetchList(ctx context.Context, opts ...QOption) ([]*AuthSession, error)
Count(ctx context.Context, opts ...QOption) (int64, error)
Delete(ctx context.Context, id uint64, opts ...QOption) error
}
SessionRepository defines data access for OAuth auth_session rows.
type SessionUsecase ¶ added in v0.5.2
type SessionUsecase interface {
Get(ctx context.Context, id uint64, opts ...QOption) (*AuthSession, error)
FetchList(ctx context.Context, opts ...QOption) ([]*AuthSession, error)
Count(ctx context.Context, opts ...QOption) (int64, error)
Delete(ctx context.Context, id uint64, opts ...QOption) error
}
SessionUsecase defines business logic for OAuth auth_session rows.
type Usecase ¶
type Usecase interface {
// Get retrieves a single AuthClient by ID.
Get(ctx context.Context, id string) (*AuthClient, error)
// FetchList retrieves multiple AuthClients with optional query parameters.
FetchList(ctx context.Context, opts ...QOption) ([]*AuthClient, error)
// Count returns the total number of AuthClients matching the query options.
Count(ctx context.Context, opts ...QOption) (int64, error)
// Create adds a new AuthClient and records the change message.
Create(ctx context.Context, authClient *AuthClient, opts ...QOption) (string, error)
// Update modifies an existing AuthClient by ID with a change message.
Update(ctx context.Context, id string, authClient *AuthClient, opts ...QOption) error
// Delete removes an AuthClient by ID with a change message.
Delete(ctx context.Context, id string, opts ...QOption) error
}
Usecase defines the business logic operations for AuthClient management.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
delivery
|
|
|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
Package repository implements methods of working with the repository objects
|
Package repository implements methods of working with the repository objects |
|
Package usecase account implementation
|
Package usecase account implementation |