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 1.0KB

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