diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2023-08-15 20:32:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-15 14:32:43 +0200 |
commit | 79d74d208fe5cf9a5cdcb701cc48f115569a96d0 (patch) | |
tree | ab709779eb68ad389bde6bc8b61827e274835479 /modules/structs | |
parent | d317c983bc877d3286f9dc3decb53d534a56a6d0 (diff) | |
download | gitea-79d74d208fe5cf9a5cdcb701cc48f115569a96d0.tar.gz gitea-79d74d208fe5cf9a5cdcb701cc48f115569a96d0.zip |
Add API route to list org secrets (#26485)
- Add a new function `CountOrgSecrets` in the file
`models/secret/secret.go`
- Add a new file `modules/structs/secret.go`
- Add a new function `ListActionsSecrets` in the file
`routers/api/v1/api.go`
- Add a new file `routers/api/v1/org/action.go`
- Add a new function `listActionsSecrets` in the file
`routers/api/v1/org/action.go`
go-sdk: https://gitea.com/gitea/go-sdk/pulls/629
---------
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/secret.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/structs/secret.go b/modules/structs/secret.go new file mode 100644 index 0000000000..6a41db4cd2 --- /dev/null +++ b/modules/structs/secret.go @@ -0,0 +1,15 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package structs + +import "time" + +// User represents a secret +// swagger:model +type Secret struct { + // the secret's name + Name string `json:"name"` + // swagger:strfmt date-time + Created time.Time `json:"created_at"` +} |