reports

package
v0.75.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// CONDITIONREPORTTEMPLATE defines
	CONDITIONREPORTTEMPLATE string = `` /* 190-byte string literal not displayed */

	// TARGETREPORTTEMPLATE ...
	TARGETREPORTTEMPLATE string = `` /* 172-byte string literal not displayed */

	// SOURCEREPORTTEMPLATE ...
	SOURCEREPORTTEMPLATE string = `` /* 169-byte string literal not displayed */

	// REPORTTEMPLATE ...
	REPORTTEMPLATE string = `` /* 833-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func MergeFromString added in v0.49.0

func MergeFromString(old, new string) string

Types

type Action added in v0.49.0

type Action struct {
	ID            string         `xml:"id,attr"`
	Title         string         `xml:"-"`
	PipelineTitle string         `xml:"h3,omitempty"`
	Description   string         `xml:"p,omitempty"`
	Targets       []ActionTarget `xml:"details,omitempty"`
	// using a pointer to avoid empty tag
	PipelineUrl *PipelineURL `xml:"a,omitempty"`
}

Action is a struct used to store the result of an action. It is used to generate pullrequest body

func (*Action) Merge added in v0.49.0

func (a *Action) Merge(sourceAction *Action)

func (*Action) String added in v0.49.0

func (a *Action) String() string

String show an action report formatted as a string

func (Action) ToActionsString added in v0.49.0

func (a Action) ToActionsString() string

ToActionsString show an action report formatted as a string

func (*Action) UpdatePipelineURL added in v0.66.0

func (a *Action) UpdatePipelineURL()

UpdatePipelineURL analyze the local environment to guess if Updatecli is executed from a CI pipeline

type ActionTarget added in v0.49.0

type ActionTarget struct {
	ID          string                  `xml:"id,attr"`
	Title       string                  `xml:"summary,omitempty"`
	Description string                  `xml:"p,omitempty"`
	Changelogs  []ActionTargetChangelog `xml:"details,omitempty"`
}

ActionTarget holds target data to describe an action report

func (*ActionTarget) Merge added in v0.49.0

func (a *ActionTarget) Merge(sourceActionTarget *ActionTarget)

type ActionTargetChangelog added in v0.49.0

type ActionTargetChangelog struct {
	Title       string `xml:"summary,omitempty"`
	Description string `xml:"pre,omitempty"`
}

ActionTargetChangelog is a struct used to store a target changelog

type Actions added in v0.49.0

type Actions struct {
	Actions []Action `xml:"action"`
}

func (*Actions) Merge added in v0.49.0

func (a *Actions) Merge(sourceActions *Actions)

func (*Actions) String added in v0.49.0

func (a *Actions) String() string

String show an action report formatted as a string

type PipelineURL added in v0.66.0

type PipelineURL struct {
	URL  string `xml:"href,attr"`
	Name string `xml:",chardata"`
}

PipelineURL is a struct used to store a pipeline URL

type Report

type Report struct {
	Name   string
	Err    string
	Result string
	// ID defines the report ID
	ID         string
	Sources    map[string]*result.Source
	Conditions map[string]*result.Condition
	Targets    map[string]*result.Target
	ReportURL  string
}

Report contains a list of Rules

func (*Report) Init

func (r *Report) Init(name string, sourceNbr, conditionNbr, targetNbr int)

Init initializes a new report for a specific configuration

func (*Report) String

func (r *Report) String(mode string) (report string, err error)

String returns a report as a string

func (*Report) UpdateID added in v0.55.0

func (r *Report) UpdateID() error

type Reports

type Reports []Report

Reports contains a list of report

func (*Reports) Show

func (r *Reports) Show() error

Show return a small reports of what has been changed

func (*Reports) Summary

func (r *Reports) Summary() (successCounter, changedCounter, failedCounter, skippedCounter int)

Summary display a summary of

type Stage

type Stage struct {
	Name   string
	Kind   string
	Result string
}

Stage contains the information if specific stage reported a success, a change, an error

Jump to

Keyboard shortcuts

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