go-sdk/gitea/secret.go
Bo-Yi Wu 88267d8477
All checks were successful
testing / testing (push) Successful in 3m9s
testing / testing (pull_request) Successful in 2m33s
feat: enhance organization secrets management
- 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>
2024-05-03 14:18:10 +08:00

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"`
}