Description
There are several types and other definitions in api/types/... which are out of scope of the Engine API. These are primarily struct types which are referenced by the client and/or daemon, but are not marshaled or unmarshaled. These types should be moved out of the API module before we stabilize it.
Client and/or daemon machinery
Daemon internals
Options types
These types are consumed by the client to either control client behaviour or fill in GET query parameters for the API call. In some cases the daemon API-server handlers reconstruct the structs from the GET parameters. Some of the structs contain non-serializable func and interface (e.g. io.Reader) fields. None of them describe the shape of Engine API requests or responses in any way that would be useful to consumers of the api module without the client module.
Misc
Description
There are several types and other definitions in
api/types/...which are out of scope of the Engine API. These are primarily struct types which are referenced by the client and/or daemon, but are not marshaled or unmarshaled. These types should be moved out of the API module before we stabilize it.Client and/or daemon machinery
types.HijackedResponseDaemon internals
build.DiskUsagecontainer.DiskUsageimage.DiskUsagevolume.DiskUsageregistry.DecodeAuthConfig()registry.DecodeAuthConfigBody()Options types
These types are consumed by the client to either control client behaviour or fill in GET query parameters for the API call. In some cases the daemon API-server handlers reconstruct the structs from the GET parameters. Some of the structs contain non-serializable
funcand interface (e.g.io.Reader) fields. None of them describe the shape of Engine API requests or responses in any way that would be useful to consumers of the api module without the client module.build.CachePruneOptionsbuild.ImageBuildOptions- used to get/set query args: split to client and backendbuild.ImageBuildOutput- used as field for the above: split to client and backendbuild.ImageBuildResponse- is not a response, but constructed by client. move to client, and remove eventuallyCreateOptions- duplicate toCreateRequest(api) andCreateOptionsin clientListOptions- also duplicate to backendDeleteOptions- also duplicate to backendcontainer.ResizeOptionscontainer.AttachOptionscontainer.CommitOptionscontainer.CopyToContainerOptionscontainer.RemoveOptionscontainer.StartOptionscontainer.LogsOptions(needs to be duplicated client + backend)container.ListOptionscontainer.LogsOptionscontainer.ExecCreateResponseconsider making this a concrete type instead of an aliascontainer.ExecOptionssplit / duplicate toclient.ExecCreateOptionsandcontainer.ExecCreateRequestcontainer.ExecStartOptionsdittocontainer.ExecAttachOptionsdittocontainer.ExecInspectmove to client, but explicitly map toExecInspectResponsecontainer.ExecInspectResponseconsider merging fields into the above (i.e., don't discard fields?)events.ListOptionsimage.ImportSource-- has an io.Reader fieldimage.ImportOptionsimage.CreateOptionsimage.PullOptions-- func fieldimage.PushOptions-- func fieldimage.ListOptionsimage.RemoveOptionsimage.HistoryOptions-- client sets it with functional optionsimage.LoadOptions-- dittoimage.InspectOptions-- dittoimage.SaveOptions-- dittoimage. LoadResponseis not a response, but a wrapper used by the clientnetwork.ListOptionsnetwork.InspectOptionsnetwork.CreateOptionsnetwork.ConnectOptionsnetwork.DisconnectOptionsregistry.SearchOptions-- func fieldswarm.ConfigListOptionsswarm.NodeListOptionsswarm.NodeRemoveOptionsswarm.ServiceCreateOptionsswarm.ServiceUpdateOptionsswarm.ServiceListOptionsswarm.ServiceInspectOptionsswarm.UpdateFlagsswarm.TaskListOptionsswarm.SecretListOptionssystem.DiskUsageOptionssystem.SecurityOptsystem.DecodeSecurityOptions()volume.ListOptionsMisc
registry.EncodeAuthConfig()-- not used anywhere?registry.ServiceConfig.MarshalJSON()-- legacy?