{"modulePath":"github.com/rancher/docker-cli","version":"v0.0.0-20190201110649-896ff57b300c","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package inspect\n\n## Functions\n\n```go\nfunc Inspect(out io.Writer, references []string, tmplStr string, getRef GetRefFunc) error\n```\nInspect fetches objects by reference using GetRefFunc and writes the json representation to the output writer.\n\n## Types\n\n```go\ntype GetRefFunc func(ref string) (interface{}, []byte, error)\n```\nGetRefFunc is a function which used by Inspect to fetch an object from a reference\n\n```go\ntype IndentedInspector struct {\n\t// contains filtered or unexported fields\n}\n```\nIndentedInspector uses a buffer to stop the indented representation of an element.\n\n```go\nfunc (i *IndentedInspector) Flush() error\n```\nFlush writes the result of inspecting all elements into the output stream.\n\n```go\nfunc (i *IndentedInspector) Inspect(typedElement interface{}, rawElement []byte) error\n```\nInspect writes the raw element with an indented json format.\n\n```go\ntype Inspector interface {\n\tInspect(typedElement interface{}, rawElement []byte) error\n\tFlush() error\n}\n```\nInspector defines an interface to implement to process elements\n\n```go\nfunc NewIndentedInspector(outputStream io.Writer) Inspector\n```\nNewIndentedInspector generates a new IndentedInspector.\n\n```go\nfunc NewTemplateInspector(outputStream io.Writer, tmpl *template.Template) Inspector\n```\nNewTemplateInspector creates a new inspector with a template.\n\n```go\nfunc NewTemplateInspectorFromString(out io.Writer, tmplStr string) (Inspector, error)\n```\nNewTemplateInspectorFromString creates a new TemplateInspector from a string which is compiled into a template.\n\n```go\ntype TemplateInspector struct {\n\t// contains filtered or unexported fields\n}\n```\nTemplateInspector uses a text template to inspect elements.\n\n```go\nfunc (i *TemplateInspector) Flush() error\n```\nFlush writes the result of inspecting all elements into the output stream.\n\n```go\nfunc (i *TemplateInspector) Inspect(typedElement interface{}, rawElement []byte) error\n```\nInspect executes the inspect template. It decodes the raw element into a map if the initial execution fails. This allows docker cli to parse inspect structs injected with Swarm fields.\n\n","path":"github.com/rancher/docker-cli/cli/command/inspect","name":"inspect","synopsis":"","isRedistributable":true}
