Documentation
¶
Index ¶
- type ApiKeyRepository
- type BunApiKeyRepository
- func (r *BunApiKeyRepository) Create(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)
- func (r *BunApiKeyRepository) Delete(ctx context.Context, id string) error
- func (r *BunApiKeyRepository) DeleteAllByOwner(ctx context.Context, ownerType string, ownerID string) error
- func (r *BunApiKeyRepository) DeleteExpired(ctx context.Context) error
- func (r *BunApiKeyRepository) GetAll(ctx context.Context, ownerType *string, ownerID *string, page int, limit int) ([]*types.ApiKey, int, error)
- func (r *BunApiKeyRepository) GetByID(ctx context.Context, id string) (*types.ApiKey, error)
- func (r *BunApiKeyRepository) GetByKeyHash(ctx context.Context, keyHash string) (*types.ApiKey, error)
- func (r *BunApiKeyRepository) Update(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)
- func (r *BunApiKeyRepository) WithTx(tx bun.IDB) ApiKeyRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiKeyRepository ¶
type ApiKeyRepository interface {
Create(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)
GetAll(ctx context.Context, ownerType *string, ownerID *string, page int, limit int) ([]*types.ApiKey, int, error)
GetByID(ctx context.Context, id string) (*types.ApiKey, error)
GetByKeyHash(ctx context.Context, keyHash string) (*types.ApiKey, error)
Update(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)
Delete(ctx context.Context, id string) error
DeleteExpired(ctx context.Context) error
DeleteAllByOwner(ctx context.Context, ownerType string, ownerID string) error
WithTx(tx bun.IDB) ApiKeyRepository
}
func NewBunApiKeyRepository ¶
func NewBunApiKeyRepository(db bun.IDB) ApiKeyRepository
type BunApiKeyRepository ¶
type BunApiKeyRepository struct {
// contains filtered or unexported fields
}
func (*BunApiKeyRepository) Delete ¶
func (r *BunApiKeyRepository) Delete(ctx context.Context, id string) error
func (*BunApiKeyRepository) DeleteAllByOwner ¶
func (*BunApiKeyRepository) DeleteExpired ¶
func (r *BunApiKeyRepository) DeleteExpired(ctx context.Context) error
func (*BunApiKeyRepository) GetByKeyHash ¶
func (*BunApiKeyRepository) WithTx ¶
func (r *BunApiKeyRepository) WithTx(tx bun.IDB) ApiKeyRepository
Click to show internal directories.
Click to hide internal directories.