cli

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultApp

func DefaultApp(version string) *cli.App

func GetCommandReleases

func GetCommandReleases() *cli.Command

func QueryReleases

func QueryReleases(context *CliContextWrapper) ([]*core.Release, error)

Types

type CliContextWrapper

type CliContextWrapper struct {
	// contains filtered or unexported fields
}

func (*CliContextWrapper) Debugf

func (c *CliContextWrapper) Debugf(format string, a ...any)

func (*CliContextWrapper) Debugln

func (c *CliContextWrapper) Debugln(a ...any)

func (*CliContextWrapper) Error

func (c *CliContextWrapper) Error(err error)

func (*CliContextWrapper) IgnorePattern added in v0.0.2

func (c *CliContextWrapper) IgnorePattern() (*regexp.Regexp, error)

func (*CliContextWrapper) Option added in v0.0.2

func (c *CliContextWrapper) Option() (*core.Option, error)

func (*CliContextWrapper) Repository

func (c *CliContextWrapper) Repository() (*git.Repository, error)

func (*CliContextWrapper) Since

func (c *CliContextWrapper) Since() time.Time

func (*CliContextWrapper) StartTimer added in v1.1.0

func (c *CliContextWrapper) StartTimer(key string)

func (*CliContextWrapper) StopTimer added in v1.1.0

func (c *CliContextWrapper) StopTimer(key string)

func (*CliContextWrapper) Until

func (c *CliContextWrapper) Until() time.Time

func (*CliContextWrapper) Write

func (c *CliContextWrapper) Write(p []byte)

type DefaultCliOutput

type DefaultCliOutput struct {
	Option              *core.Option         `json:"option"`
	DeploymentFrequency float64              `json:"deploymentFrequency"`
	LeadTimeForChanges  DurationWithTimeUnit `json:"leadTimeForChanges"`
	TimeToRestore       DurationWithTimeUnit `json:"timeToRestore"`
	ChangeFailureRate   float64              `json:"changeFailureRate"`
}

type DurationOutput added in v0.0.3

type DurationOutput struct {
	Value float64 `json:"value"`
	Unit  string  `json:"unit"`
}

type DurationWithTimeUnit added in v0.0.3

type DurationWithTimeUnit struct {
	*time.Duration
	// contains filtered or unexported fields
}

func (*DurationWithTimeUnit) MarshalJSON added in v0.0.3

func (p *DurationWithTimeUnit) MarshalJSON() ([]byte, error)

func (*DurationWithTimeUnit) Present added in v0.0.3

func (p *DurationWithTimeUnit) Present() float64

func (*DurationWithTimeUnit) UnmarshalJSON added in v0.0.3

func (p *DurationWithTimeUnit) UnmarshalJSON(data []byte) error

type ReleaseCliOutput added in v0.0.2

type ReleaseCliOutput struct {
	Tag                string                 `json:"tag"`
	Date               time.Time              `json:"date"`
	LeadTimeForChanges DurationWithTimeUnit   `json:"leadTimeForChanges"`
	Result             ReleaseResultCliOutput `json:"result"`
}

type ReleaseResultCliOutput added in v0.0.3

type ReleaseResultCliOutput struct {
	IsSuccess     bool                  `json:"isSuccess"`
	TimeToRestore *DurationWithTimeUnit `json:"timeToRestore"`
}

type ReleasesCliOutput

type ReleasesCliOutput struct {
	Option   *core.Option        `json:"option"`
	Releases []*ReleaseCliOutput `json:"releases"`
}

type TimeUnit added in v0.0.2

type TimeUnit string
const (
	TimeUnitDay TimeUnit = "day"
)

Jump to

Keyboard shortcuts

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