2023-06-19 14:42:47 -07:00
|
|
|
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2020-03-01 17:38:29 -08:00
|
|
|
|
2023-08-10 19:46:45 -07:00
|
|
|
package model // import "miniflux.app/v2/internal/model"
|
2020-03-01 17:38:29 -08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
// APIKey represents an application API key.
|
|
|
|
type APIKey struct {
|
2025-05-25 15:37:37 -07:00
|
|
|
ID int64 `json:"id"`
|
|
|
|
UserID int64 `json:"user_id"`
|
|
|
|
Token string `json:"token"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
LastUsedAt *time.Time `json:"last_used_at"`
|
|
|
|
CreatedAt time.Time `json:"created_at"`
|
2020-03-01 17:38:29 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// APIKeys represents a collection of API Key.
|
|
|
|
type APIKeys []*APIKey
|
2025-05-25 15:37:37 -07:00
|
|
|
|
|
|
|
// APIKeyCreationRequest represents the request to create a new API Key.
|
|
|
|
type APIKeyCreationRequest struct {
|
|
|
|
Description string `json:"description"`
|
|
|
|
}
|