Documentation
¶
Index ¶
- func DurationAsText(d time.Duration) string
- func ListAsText(items []string) string
- type ActionResult
- type AuthStatusView
- type CreatedRepoValue
- type DisplayedResource
- type DisplayedResourceState
- type DoneMessage
- type EnvironmentDetails
- type ErrorWithSuggestion
- type GitHubValueKind
- type LoggedIn
- type LoginType
- type MessageTitle
- type MultilineMessage
- type OperationType
- type PreflightReport
- type PreflightReportItem
- type PreviewProvision
- type PropertyDelta
- type Resource
- type Show
- type ShowEnvironment
- type ShowResource
- type ShowService
- type SkippedMessage
- type UxItem
- type WarningAltMessage
- type WarningMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationAsText ¶
DurationAsText provides a slightly nicer string representation of a duration when compared to default formatting in go, by spelling out the words hour, minute and second and providing some spacing and eliding the fractional component of the seconds part.
func ListAsText ¶
generates text from a list of strings, for example: ["foo"] => "foo" ["foo", "bar"] => "foo and bar" ["foo", "bar", "axe"] => "foo, bar and axe" ["foo", "bar", ..., ..., "axe"] => "foo, bar, ..., ... and axe"
Types ¶
type ActionResult ¶
func (*ActionResult) MarshalJSON ¶
func (ar *ActionResult) MarshalJSON() ([]byte, error)
func (*ActionResult) ToString ¶
func (ar *ActionResult) ToString(currentIndentation string) (result string)
type AuthStatusView ¶
type AuthStatusView struct {
Result *contracts.StatusResult
// AuthMode indicates the current authentication mode.
// When set to a non-built-in mode, the unauthenticated message adjusts guidance accordingly.
AuthMode string
}
AuthStatusView renders a contracts.StatusResult for console output.
func (*AuthStatusView) MarshalJSON ¶
func (v *AuthStatusView) MarshalJSON() ([]byte, error)
func (*AuthStatusView) ToString ¶
func (v *AuthStatusView) ToString(currentIndentation string) string
type CreatedRepoValue ¶
type CreatedRepoValue struct {
Name string
Kind GitHubValueKind
Action string
}
func (*CreatedRepoValue) MarshalJSON ¶
func (cr *CreatedRepoValue) MarshalJSON() ([]byte, error)
func (*CreatedRepoValue) ToString ¶
func (cr *CreatedRepoValue) ToString(currentIndentation string) string
type DisplayedResource ¶
type DisplayedResource struct {
Type string
Name string
State DisplayedResourceState
Duration time.Duration
}
func (*DisplayedResource) MarshalJSON ¶
func (cr *DisplayedResource) MarshalJSON() ([]byte, error)
func (*DisplayedResource) ToString ¶
func (cr *DisplayedResource) ToString(currentIndentation string) string
type DisplayedResourceState ¶
type DisplayedResourceState string
const ( SucceededState DisplayedResourceState = "Succeeded" FailedState DisplayedResourceState = "Failed" )
type DoneMessage ¶
type DoneMessage struct {
Message string
}
func (*DoneMessage) MarshalJSON ¶
func (d *DoneMessage) MarshalJSON() ([]byte, error)
func (*DoneMessage) ToString ¶
func (d *DoneMessage) ToString(currentIndentation string) string
type EnvironmentDetails ¶
func (*EnvironmentDetails) MarshalJSON ¶
func (t *EnvironmentDetails) MarshalJSON() ([]byte, error)
func (*EnvironmentDetails) ToString ¶
func (t *EnvironmentDetails) ToString(currentIndentation string) string
type ErrorWithSuggestion ¶
type ErrorWithSuggestion struct {
// Err is the original underlying error
Err error
// Message is a user-friendly explanation of what went wrong
Message string
// Suggestion is actionable next steps to resolve the issue
Suggestion string
// Links is an optional list of reference links
Links []errorhandler.ErrorLink
}
ErrorWithSuggestion displays an error with user-friendly messaging. Layout:
- User-friendly message (red ERROR: line)
- Suggestion (actionable next steps)
- Reference links (optional, as a list)
- Original error (grey, de-emphasized technical details)
func (*ErrorWithSuggestion) MarshalJSON ¶
func (e *ErrorWithSuggestion) MarshalJSON() ([]byte, error)
func (*ErrorWithSuggestion) ToString ¶
func (e *ErrorWithSuggestion) ToString(currentIndentation string) string
type GitHubValueKind ¶
type GitHubValueKind string
const ( GitHubSecret GitHubValueKind = "secret" GitHubVariable GitHubValueKind = "variable" )
type LoggedIn ¶
func (*LoggedIn) MarshalJSON ¶
type MessageTitle ¶
func (*MessageTitle) MarshalJSON ¶
func (t *MessageTitle) MarshalJSON() ([]byte, error)
func (*MessageTitle) ToString ¶
func (t *MessageTitle) ToString(currentIndentation string) string
type MultilineMessage ¶
type MultilineMessage struct {
Lines []string
}
func (*MultilineMessage) MarshalJSON ¶
func (mm *MultilineMessage) MarshalJSON() ([]byte, error)
func (*MultilineMessage) ToString ¶
func (mm *MultilineMessage) ToString(currentIndentation string) string
type OperationType ¶
type OperationType string
OperationType defines the valid options for a resource change.
const ( OperationTypeCreate OperationType = "Create" OperationTypeDelete OperationType = "Delete" OperationTypeDeploy OperationType = "Deploy" OperationTypeIgnore OperationType = "Ignore" OperationTypeModify OperationType = "Modify" OperationTypeNoChange OperationType = "NoChange" OperationTypeUnsupported OperationType = "Unsupported" )
func (OperationType) String ¶
func (op OperationType) String() (displayName string)
type PreflightReport ¶
type PreflightReport struct {
Items []PreflightReportItem
}
PreflightReport displays the results of local preflight validation. Warnings are shown first, followed by errors. Each entry is separated by a blank line.
func (*PreflightReport) HasErrors ¶
func (r *PreflightReport) HasErrors() bool
HasErrors returns true if the report contains at least one error-level item.
func (*PreflightReport) HasWarnings ¶
func (r *PreflightReport) HasWarnings() bool
HasWarnings returns true if the report contains at least one warning-level item.
func (*PreflightReport) MarshalJSON ¶
func (r *PreflightReport) MarshalJSON() ([]byte, error)
func (*PreflightReport) ToString ¶
func (r *PreflightReport) ToString(currentIndentation string) string
type PreflightReportItem ¶
type PreflightReportItem struct {
// IsError is true for blocking errors, false for warnings.
IsError bool
// DiagnosticID is a unique, stable identifier for this finding type (e.g.
// "role_assignment_missing"). Used in telemetry for error correlation.
DiagnosticID string
// Message describes the finding.
Message string
}
PreflightReportItem represents a single finding from preflight validation.
type PreviewProvision ¶
type PreviewProvision struct {
Operations []*Resource
}
PreviewProvision defines a ux item for displaying a provision preview.
func (*PreviewProvision) MarshalJSON ¶
func (pp *PreviewProvision) MarshalJSON() ([]byte, error)
func (*PreviewProvision) ToString ¶
func (pp *PreviewProvision) ToString(currentIndentation string) string
type PropertyDelta ¶
PropertyDelta represents a property-level change in a resource
type Resource ¶
type Resource struct {
Operation OperationType
Name string
Type string
PropertyDeltas []PropertyDelta
}
Resource provides a basic structure for an Azure resource.
type Show ¶
type Show struct {
AppName string
Services []*ShowService
Environments []*ShowEnvironment
AzurePortalLink string
}
func (*Show) MarshalJSON ¶
type ShowEnvironment ¶
type ShowResource ¶
func (*ShowResource) MarshalJSON ¶
func (s *ShowResource) MarshalJSON() ([]byte, error)
func (*ShowResource) ToString ¶
func (s *ShowResource) ToString(currentIndentation string) string
type ShowService ¶
func (*ShowService) MarshalJSON ¶
func (s *ShowService) MarshalJSON() ([]byte, error)
func (*ShowService) ToString ¶
func (s *ShowService) ToString(currentIndentation string) string
type SkippedMessage ¶
type SkippedMessage struct {
Message string
}
func (*SkippedMessage) MarshalJSON ¶
func (d *SkippedMessage) MarshalJSON() ([]byte, error)
func (*SkippedMessage) ToString ¶
func (d *SkippedMessage) ToString(currentIndentation string) string
type WarningAltMessage ¶
type WarningAltMessage struct {
Message string
}
Warning message with the prefix "(!) Warning: "
func (*WarningAltMessage) MarshalJSON ¶
func (d *WarningAltMessage) MarshalJSON() ([]byte, error)
func (*WarningAltMessage) ToString ¶
func (d *WarningAltMessage) ToString(currentIndentation string) string
type WarningMessage ¶
type WarningMessage struct {
Description string
HidePrefix bool
// Hints are optional additional lines displayed as bullets below the warning
Hints []string
}
Warning message with hidable prefix "WARNING: "
func (*WarningMessage) MarshalJSON ¶
func (t *WarningMessage) MarshalJSON() ([]byte, error)
func (*WarningMessage) ToString ¶
func (t *WarningMessage) ToString(currentIndentation string) string