2023-08-15 08:32:43 -04:00
|
|
|
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
package structs
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
2023-08-21 23:20:34 -04:00
|
|
|
// Secret represents a secret
|
2023-08-15 08:32:43 -04:00
|
|
|
// swagger:model
|
|
|
|
type Secret struct {
|
|
|
|
// the secret's name
|
|
|
|
Name string `json:"name"`
|
|
|
|
// swagger:strfmt date-time
|
|
|
|
Created time.Time `json:"created_at"`
|
|
|
|
}
|
2023-08-21 23:20:34 -04:00
|
|
|
|
|
|
|
// CreateSecretOption options when creating secret
|
|
|
|
// swagger:model
|
|
|
|
type CreateSecretOption struct {
|
|
|
|
// Name of the secret to create
|
|
|
|
//
|
|
|
|
// required: true
|
|
|
|
// unique: true
|
|
|
|
Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(100)"`
|
|
|
|
// Data of the secret to create
|
|
|
|
Data string `json:"data" binding:"Required"`
|
|
|
|
}
|
2023-08-23 22:07:00 -04:00
|
|
|
|
|
|
|
// UpdateSecretOption options when updating secret
|
|
|
|
// swagger:model
|
|
|
|
type UpdateSecretOption struct {
|
|
|
|
// Data of the secret to update
|
|
|
|
//
|
|
|
|
// required: true
|
|
|
|
Data string `json:"data" binding:"Required"`
|
|
|
|
}
|