network.go 844 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package provider
  2. import "github.com/docker/engine-api/types"
  3. // NetworkCreateRequest is a request when creating a network.
  4. type NetworkCreateRequest struct {
  5. ID string
  6. types.NetworkCreateRequest
  7. }
  8. // NetworkCreateResponse is a response when creating a network.
  9. type NetworkCreateResponse struct {
  10. ID string `json:"Id"`
  11. }
  12. // VirtualAddress represents a virtual address.
  13. type VirtualAddress struct {
  14. IPv4 string
  15. IPv6 string
  16. }
  17. // PortConfig represents a port configuration.
  18. type PortConfig struct {
  19. Name string
  20. Protocol int32
  21. TargetPort uint32
  22. PublishedPort uint32
  23. }
  24. // ServiceConfig represents a service configuration.
  25. type ServiceConfig struct {
  26. ID string
  27. Name string
  28. Aliases map[string][]string
  29. VirtualAddresses map[string]*VirtualAddress
  30. ExposedPorts []*PortConfig
  31. }