Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffResponse ¶
type DiffResponse struct { *Response Colorize bool DeviceDiff string Candidate string Current string Difflines []string Additions []string Subtractions []string SideBySideW int // contains filtered or unexported fields }
DiffResponse is a special response object specifically for `GetDiff` operations.
func NewDiffResponse ¶
func NewDiffResponse(host string, opts ...util.Option) *DiffResponse
NewDiffResponse returns a new DiffResponse object.
func (*DiffResponse) RecordDiff ¶
func (r *DiffResponse) RecordDiff(device, candidate, current string)
RecordDiff records the outcome of a GetDiff result.
func (*DiffResponse) SideBySideDiff ¶
func (r *DiffResponse) SideBySideDiff() string
SideBySideDiff returns the diff in a side-by-side output.
func (*DiffResponse) UnifiedDiff ¶
func (r *DiffResponse) UnifiedDiff() string
UnifiedDiff returns the diff in a unified output.
type PlatformResponse ¶
PlatformResponse is a simple response objects that platform implementations return to the Cfg instance.
type Response ¶
type Response struct { Result string Op string Host string StartTime time.Time EndTime time.Time ElapsedTime float64 ScrapliResponses []*response.Response Failed error }
Response is similar to the scrapligo response.Response object, but is tailored for scrapligocfg uses. The Result field is the primary result of the given operation -- for example if the operation was GetVersion, then the Result is the parsed version string. The Op field is the human-readable name of the operation.
func NewResponse ¶
NewResponse returns a new Response object with the StartTime set to now.