repositories

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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) Create

func (r *BunApiKeyRepository) Create(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)

func (*BunApiKeyRepository) Delete

func (r *BunApiKeyRepository) Delete(ctx context.Context, id string) error

func (*BunApiKeyRepository) DeleteAllByOwner

func (r *BunApiKeyRepository) DeleteAllByOwner(ctx context.Context, ownerType string, ownerID string) error

func (*BunApiKeyRepository) DeleteExpired

func (r *BunApiKeyRepository) DeleteExpired(ctx context.Context) error

func (*BunApiKeyRepository) GetAll

func (r *BunApiKeyRepository) GetAll(ctx context.Context, ownerType *string, ownerID *string, page int, limit int) ([]*types.ApiKey, int, error)

func (*BunApiKeyRepository) GetByID

func (r *BunApiKeyRepository) GetByID(ctx context.Context, id string) (*types.ApiKey, error)

func (*BunApiKeyRepository) GetByKeyHash

func (r *BunApiKeyRepository) GetByKeyHash(ctx context.Context, keyHash string) (*types.ApiKey, error)

func (*BunApiKeyRepository) Update

func (r *BunApiKeyRepository) Update(ctx context.Context, apiKey *types.ApiKey) (*types.ApiKey, error)

func (*BunApiKeyRepository) WithTx

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL