Versions in this module Expand all Collapse all v1 v1.6.0 Sep 11, 2023 Changes in this version type AppContext + AppVersion int v1.3.2 Oct 4, 2023 Changes in this version + var ErrorStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#d8292f")) + var SuccessStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#2d9f44")) + var WarningStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#fcba19")) + func AppId(length int) string + func ArgumentsSliceToString(args []string, separator string) string + func Checkmark() string + func ClientCredentialLogin(tokenEndpoint string, clientId string, clientSecret string) error + func ClientCredentialsLogin(ctx *AppContext, clientId string, clientSecret string) error + func DeviceLogin(ctx *AppContext) error + func Indeterminate() string + func KebabCase(str string) string + func LookupKind(data []byte) string + func NewSpinner() *spinner.Spinner + func NewTemplate() *template.Template + func PrintError(output string) string + func PrintSuccess(output string) string + func PrintWarning(output string) string + func RefreshToken(ctx *AppContext) error + func SaveConfig(data *TokenResponse) error + func SplitYAML(resources []byte) ([][]byte, error) + func StartCase(str string) string + func Times() string + type ApiErrorResponse struct + Details struct{ ... } + Error string + ErrorMessage string + Message string + Results string + func (e *ApiErrorResponse) GetError() error + type ApiResponse struct + Data T + StatusCode int + type AppContext struct + ApiHost string + ApiKey string + ApiVersion string + Auth AuthDetails + ClientId string + Cwd string + Host string + Namespace string + Scheme string + Version string + func (a *AppContext) CreateUrl(path string, params interface{}) (string, error) + type AuthDetails struct + Token string + type DeviceData struct + DeviceCode string + UserCode string + VerificationUri string + VerificationUriComplete string + type FS struct + func (*FS) Stat(name string) (os.FileInfo, error) + func (*FS) WriteFile(name string, data []byte, perm os.FileMode) error + type NewApi struct + Request *http.Request + func NewApiDelete[T any](ctx *AppContext, url string) (*NewApi[T], error) + func NewApiGet[T any](ctx *AppContext, url string) (*NewApi[T], error) + func NewApiPost[T any](ctx *AppContext, url string, body io.Reader) (*NewApi[T], error) + func NewApiPut[T any](ctx *AppContext, url string, body io.Reader) (*NewApi[T], error) + func (m *NewApi[T]) Do() (ApiResponse[T], error) + func (m *NewApi[T]) New() (*NewApi[T], error) + type OpenApi struct + Components struct{ ... } + type T struct + Kind string + type TokenRequestError struct + Error string + ErrorDescription string + type TokenResponse struct + AccessToken string + ExpiresIn int16 + RefreshExpiresIn int32 + RefreshToken string + Scope string + SessionState string + TokenType string + type WellKnownConfig struct + ClientCredentials string + DeviceAuthorizationEndpoint string + TokenEndpoint string