cli

package
v0.180.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Color     = lipgloss.AdaptiveColor{Light: "#4C4452", Dark: "#FAFAFA"}
	Primary   = lipgloss.Color("#a855f7")
	Red       = lipgloss.Color("#852A56")
	White     = lipgloss.Color("#ffffff")
	Purple100 = lipgloss.AdaptiveColor{Light: "#9162bd", Dark: "#eeddfd"}
	Purple300 = lipgloss.AdaptiveColor{Light: "#6a359c", Dark: "#dcbbfc"}
	Purple600 = lipgloss.AdaptiveColor{Light: "#2f1845", Dark: "#c288f9"}
	Feint     = lipgloss.AdaptiveColor{Light: "#5f6771", Dark: "#9FACBD"}
	Help      = lipgloss.AdaptiveColor{Light: "#9ea4ac", Dark: "#909090"}
	Disabled  = lipgloss.AdaptiveColor{Light: "#d0d7de", Dark: "#d0d7de"}
	Seperator = lipgloss.AdaptiveColor{Light: "#d0d7de", Dark: "#d0d7de"}

	TextStyle         = lipgloss.NewStyle().Foreground(Color)
	HeadlineTextStyle = lipgloss.NewStyle().Bold(true).Foreground(Primary)
	DisabledStyle     = lipgloss.NewStyle().Foreground(Disabled)
	FeintStyle        = TextStyle.Copy().Foreground(Feint)
	HelpStyle         = TextStyle.Copy().Foreground(Help)
	BoldStyle         = TextStyle.Copy().Bold(true)
	SpinnerStyle      = lipgloss.NewStyle().Foreground(lipgloss.Color("#763bad"))
	SeparatorStyle    = lipgloss.NewStyle().Foreground(Seperator)

	PassStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#ffffff")).Background(lipgloss.Color("#5AD900")).Padding(0, 1)
	FailStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#ffffff")).Background(lipgloss.Color("#b91c1c")).Padding(0, 1)
)

Functions

func NewModel

func NewModel(ctx context.Context, options *Options) *tea.Program

func OpenURL

func OpenURL(serverURL string) tea.Cmd

func RenderError

func RenderError(msg string) string

RenderError returns a formatted error string.

func RenderWarning

func RenderWarning(msg string) string

RenderWarning returns a formatted warning string.

Types

type Error

type Error struct {
	Err error
}

type Options

type Options struct {
	ServerVersion string
}

type ServerConfigLoaded

type ServerConfigLoaded struct {
	ServerURL                string
	Webhooks                 int32
	Operations               int32
	DatasourceConfigurations int32
	WunderctlVersion         string
	SdkVersion               string
	Authentication           bool
	FileUploads              bool
	PlaygroundEnabled        bool
}

type TaskEnded

type TaskEnded struct {
	Label string
	Err   error
}

type TaskStarted

type TaskStarted struct {
	Label string
}

Jump to

Keyboard shortcuts

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