You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

repo_key.go 986B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. import (
  5. "time"
  6. )
  7. // DeployKey a deploy key
  8. type DeployKey struct {
  9. ID int64 `json:"id"`
  10. KeyID int64 `json:"key_id"`
  11. Key string `json:"key"`
  12. URL string `json:"url"`
  13. Title string `json:"title"`
  14. Fingerprint string `json:"fingerprint"`
  15. // swagger:strfmt date-time
  16. Created time.Time `json:"created_at"`
  17. ReadOnly bool `json:"read_only"`
  18. Repository *Repository `json:"repository,omitempty"`
  19. }
  20. // CreateKeyOption options when creating a key
  21. type CreateKeyOption struct {
  22. // Title of the key to add
  23. //
  24. // required: true
  25. // unique: true
  26. Title string `json:"title" binding:"Required"`
  27. // An armored SSH key to add
  28. //
  29. // required: true
  30. // unique: true
  31. Key string `json:"key" binding:"Required"`
  32. // Describe if the key has only read access or read/write
  33. //
  34. // required: false
  35. ReadOnly bool `json:"read_only"`
  36. }