code.gitea.io/gitea@v1.21.7/services/convert/secret.go (about) 1 // Copyright 2023 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package convert 5 6 import ( 7 secret_model "code.gitea.io/gitea/models/secret" 8 api "code.gitea.io/gitea/modules/structs" 9 ) 10 11 // ToSecret converts Secret to API format 12 func ToSecret(secret *secret_model.Secret) *api.Secret { 13 result := &api.Secret{ 14 Name: secret.Name, 15 } 16 17 return result 18 }