report

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	OrgName   string
	SpaceName string
	AppName   string
	Message   string
}

Result is a specific app migration result: success or failure

type Summary

type Summary struct {
	TableWriter io.Writer
	// contains filtered or unexported fields
}

Summary is a thread safe sink of execution results for app migrations

func NewSummary

func NewSummary(w io.Writer) *Summary

NewSummary creates a new initialized summary instance

func (*Summary) AddFailedApp

func (s *Summary) AddFailedApp(org, space, app string, err error)

AddFailedApp adds a failed app along with its error to the summary result

func (*Summary) AddSuccessfulApp

func (s *Summary) AddSuccessfulApp(org, space, app string)

AddSuccessfulApp adds a successful app and increments the count of successful apps

func (*Summary) AppFailureCount

func (s *Summary) AppFailureCount() int

AppFailureCount is the number of total app failures that have occurred

func (*Summary) AppSuccessCount

func (s *Summary) AppSuccessCount() int

AppSuccessCount is the number of total app successes that have occurred

func (*Summary) Display

func (s *Summary) Display()

func (*Summary) Duration

func (s *Summary) Duration() time.Duration

func (*Summary) Results

func (s *Summary) Results() []Result

Results returns a copy of all the app migrations that have occurred

func (*Summary) SetDuration

func (s *Summary) SetDuration(duration time.Duration)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL