structs.go 669 B

1234567891011121314151617181920212223242526272829303132
  1. package structs
  2. import (
  3. "github.com/docker/docker/api/types/container"
  4. )
  5. // incoming websocket payloads
  6. type WsPayload struct {
  7. Type string `json:"type"`
  8. Action string `json:"action"`
  9. }
  10. // eventbus event payloads
  11. type Event struct {
  12. Type string
  13. Data interface{}
  14. }
  15. // for keeping track of container desired/actual state
  16. type ContainerState struct {
  17. ID string
  18. Name string
  19. Type string
  20. Image string
  21. ActualStatus string // on/off
  22. DesiredStatus string
  23. ActualNetwork string // bridge/wireguard
  24. DesiredNetwork string
  25. CreatedAt string
  26. Config container.Config
  27. Host container.HostConfig
  28. }