gitea源码

mirror.go 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. import "time"
  5. // CreatePushMirrorOption represents need information to create a push mirror of a repository.
  6. type CreatePushMirrorOption struct {
  7. // The remote repository URL to push to
  8. RemoteAddress string `json:"remote_address"`
  9. // The username for authentication with the remote repository
  10. RemoteUsername string `json:"remote_username"`
  11. // The password for authentication with the remote repository
  12. RemotePassword string `json:"remote_password"`
  13. // The sync interval for automatic updates
  14. Interval string `json:"interval"`
  15. // Whether to sync on every commit
  16. SyncOnCommit bool `json:"sync_on_commit"`
  17. }
  18. // PushMirror represents information of a push mirror
  19. // swagger:model
  20. type PushMirror struct {
  21. // The name of the source repository
  22. RepoName string `json:"repo_name"`
  23. // The name of the remote in the git configuration
  24. RemoteName string `json:"remote_name"`
  25. // The remote repository URL being mirrored to
  26. RemoteAddress string `json:"remote_address"`
  27. // swagger:strfmt date-time
  28. CreatedUnix time.Time `json:"created"`
  29. // swagger:strfmt date-time
  30. LastUpdateUnix *time.Time `json:"last_update"`
  31. // The last error message encountered during sync
  32. LastError string `json:"last_error"`
  33. // The sync interval for automatic updates
  34. Interval string `json:"interval"`
  35. // Whether to sync on every commit
  36. SyncOnCommit bool `json:"sync_on_commit"`
  37. }