29513fc519
- 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> Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/661 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
20 lines
557 B
Go
20 lines
557 B
Go
// Copyright 2024 The Forgejo Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// 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 forgejo
|
|
|
|
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"`
|
|
}
|