11package client
22
3- import "github.com/docker/libnetwork/types"
3+ import (
4+ "net"
5+
6+ "github.com/docker/libnetwork/types"
7+ )
48
59/***********
610 Resources
@@ -48,23 +52,24 @@ type networkCreate struct {
4852 NetworkOpts map [string ]string `json:"network_opts"`
4953}
5054
51- // serviceCreate represents the body of the "publish service" http request message
52- type serviceCreate struct {
55+ // ServiceCreate represents the body of the "publish service" http request message
56+ type ServiceCreate struct {
5357 Name string `json:"name"`
5458 MyAliases []string `json:"my_aliases"`
5559 Network string `json:"network_name"`
5660}
5761
58- // serviceDelete represents the body of the "unpublish service" http request message
59- type serviceDelete struct {
62+ // ServiceDelete represents the body of the "unpublish service" http request message
63+ type ServiceDelete struct {
6064 Name string `json:"name"`
6165 Force bool `json:"force"`
6266}
6367
64- // serviceAttach represents the expected body of the "attach/detach sandbox to/from service" http request messages
65- type serviceAttach struct {
66- SandboxID string `json:"sandbox_id"`
67- Aliases []string `json:"aliases"`
68+ // ServiceAttach represents the expected body of the "attach/detach sandbox to/from service" http request messages
69+ type ServiceAttach struct {
70+ SandboxID string `json:"sandbox_id"`
71+ Aliases []string `json:"aliases"`
72+ SandboxKey string `json:"sandbox_key"`
6873}
6974
7075// SandboxCreate is the body of the "post /sandboxes" http request message
@@ -76,6 +81,7 @@ type SandboxCreate struct {
7681 ResolvConfPath string `json:"resolv_conf_path"`
7782 DNS []string `json:"dns"`
7883 ExtraHosts []extraHost `json:"extra_hosts"`
84+ UseExternalKey bool `json:"use_external_key"`
7985 UseDefaultSandbox bool `json:"use_default_sandbox"`
8086 ExposedPorts []types.TransportPort `json:"exposed_ports"`
8187 PortMapping []types.PortBinding `json:"port_mapping"`
@@ -94,3 +100,13 @@ type sandboxParentUpdate struct {
94100 Name string `json:"name"`
95101 Address string `json:"address"`
96102}
103+
104+ // endpointInfo contants the endpoint info for http response message on endpoint creation
105+ type EndpointInfo struct {
106+ ID string `json:"id"`
107+ Address net.IPNet `json:"address"`
108+ AddressIPv6 net.IPNet `json:"address_ipv6"`
109+ MacAddress net.HardwareAddr `json:"mac_address"`
110+ Gateway net.IP `json:"gateway"`
111+ GatewayIPv6 net.IP `json:"gateway_ipv6"`
112+ }
0 commit comments