mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00

* chore: update copyright year in license headers * Revert "chore: update copyright year in license headers" This reverts commit 3e58129c431b9a491089ce36b908f9bb6ba38ed3. * chore: update copyright year in license headers * fix: sort go imports * fix: add missing license headers
23 lines
573 B
Go
23 lines
573 B
Go
// Copyright (c) 2021 - 2025, Ludvig Lundgren and the autobrr contributors.
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
package domain
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
type APIRepo interface {
|
|
Store(ctx context.Context, key *APIKey) error
|
|
Delete(ctx context.Context, key string) error
|
|
GetAllAPIKeys(ctx context.Context) ([]APIKey, error)
|
|
GetKey(ctx context.Context, key string) (*APIKey, error)
|
|
}
|
|
|
|
type APIKey struct {
|
|
Name string `json:"name"`
|
|
Key string `json:"key"`
|
|
Scopes []string `json:"scopes"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|