21 lines
878 B
Go
21 lines
878 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"go.mongodb.org/mongo-driver/v2/bson"
|
|
)
|
|
|
|
type Key struct {
|
|
ID bson.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
|
|
KeyID string `bson:"key_id" json:"key_id"`
|
|
Label string `bson:"label" json:"label"`
|
|
PublicKey string `bson:"public_key" json:"public_key"`
|
|
Fingerprint string `bson:"fingerprint" json:"fingerprint"`
|
|
Source string `bson:"source" json:"source"` // uploaded | generated
|
|
GeneratedByServerID string `bson:"generated_by_server_id,omitempty" json:"generated_by_server_id,omitempty"`
|
|
PrivateKeyEncrypted string `bson:"private_key_enc,omitempty" json:"-"`
|
|
HasPrivateKey bool `bson:"-" json:"has_private_key"`
|
|
CreatedAt time.Time `bson:"created_at" json:"created_at"`
|
|
}
|