mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 08:19:12 +00:00
22 lines
509 B
Go
22 lines
509 B
Go
// Copyright (c) 2021 - 2023, 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
|
|
GetKeys(ctx context.Context) ([]APIKey, error)
|
|
}
|
|
|
|
type APIKey struct {
|
|
Name string `json:"name"`
|
|
Key string `json:"key"`
|
|
Scopes []string `json:"scopes"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|