Bo-Yi Wu
88267d8477
- Add `bytes` and `encoding/json` imports to `org_action.go` - Implement `CreateSecretOption` struct with validation in `org_action.go` - Add `CreateOrgActionSecret` function to create or update organization secrets in `org_action.go` - Create new test file `org_action_test.go` with tests for creating and updating organization secrets - Add `Data` field to `Secret` struct in `secret.go` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
17 lines
390 B
Go
17 lines
390 B
Go
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package gitea
|
|
|
|
import "time"
|
|
|
|
type Secret struct {
|
|
// the secret's name
|
|
Name string `json:"name"`
|
|
// the secret's data
|
|
Data string `json:"data"`
|
|
// Date and Time of secret creation
|
|
Created time.Time `json:"created_at"`
|
|
}
|