Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetRefFunc ¶
GetRefFunc is a function which used by Inspect to fetch an object from a reference
type IndentedInspector ¶
type IndentedInspector struct {
// contains filtered or unexported fields
}
IndentedInspector uses a buffer to stop the indented representation of an element.
func (*IndentedInspector) Flush ¶
func (i *IndentedInspector) Flush() error
Flush writes the result of inspecting all elements into the output stream.
func (*IndentedInspector) Inspect ¶
func (i *IndentedInspector) Inspect(typedElement interface{}) error
Inspect writes the raw element with an indented json format.
type Inspector ¶
Inspector defines an interface to implement to process elements.
func NewIndentedInspector ¶
NewIndentedInspector generates a new IndentedInspector.
func NewTemplateInspector ¶
NewTemplateInspector creates a new inspector with a template.
type TemplateInspector ¶
type TemplateInspector struct {
// contains filtered or unexported fields
}
TemplateInspector uses a template to inspect elements.
func (*TemplateInspector) Flush ¶
func (i *TemplateInspector) Flush() error
Flush writes the result of inspecting all elements into output stream.
func (*TemplateInspector) Inspect ¶
func (i *TemplateInspector) Inspect(typedElement interface{}) error
Inspect executes the inspect template.