gitea源码

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright 2024 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. // CreateVariableOption the option when creating variable
  5. // swagger:model
  6. type CreateVariableOption struct {
  7. // Value of the variable to create
  8. //
  9. // required: true
  10. Value string `json:"value" binding:"Required"`
  11. // Description of the variable to create
  12. //
  13. // required: false
  14. Description string `json:"description"`
  15. }
  16. // UpdateVariableOption the option when updating variable
  17. // swagger:model
  18. type UpdateVariableOption struct {
  19. // New name for the variable. If the field is empty, the variable name won't be updated.
  20. Name string `json:"name"`
  21. // Value of the variable to update
  22. //
  23. // required: true
  24. Value string `json:"value" binding:"Required"`
  25. // Description of the variable to update
  26. //
  27. // required: false
  28. Description string `json:"description"`
  29. }
  30. // ActionVariable return value of the query API
  31. // swagger:model
  32. type ActionVariable struct {
  33. // the owner to which the variable belongs
  34. OwnerID int64 `json:"owner_id"`
  35. // the repository to which the variable belongs
  36. RepoID int64 `json:"repo_id"`
  37. // the name of the variable
  38. Name string `json:"name"`
  39. // the value of the variable
  40. Data string `json:"data"`
  41. // the description of the variable
  42. Description string `json:"description"`
  43. }