clienv

package
v1.0.0-beta4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANSIColorWhite  = lipgloss.Color("15")
	ANSIColorCyan   = lipgloss.Color("14")
	ANSIColorPurple = lipgloss.Color("13")
	ANSIColorBlue   = lipgloss.Color("12")
	ANSIColorYellow = lipgloss.Color("11")
	ANSIColorGreen  = lipgloss.Color("10")
	ANSIColorRed    = lipgloss.Color("9")
	ANSIColorGray   = lipgloss.Color("8")
)
View Source
const (
	IconInfo = "ℹ️"
	IconWarn = "⚠"
)

Variables

View Source
var ErrNoContent = fmt.Errorf("no content")

Functions

func Flags

func Flags() ([]cli.Flag, error)

func MarshalFile

func MarshalFile(v any, filepath string, fn func(any) ([]byte, error)) error

func PathExists

func PathExists(path string) bool

func PathStateHome

func PathStateHome() string

func Table

func Table(columns ...Column) string

func UnmarshalFile

func UnmarshalFile(filepath string, v any, f func([]byte, any) error) error

Types

type CliEnv

type CliEnv struct {
	Path *PathStructure
	// contains filtered or unexported fields
}

func New

func New(cCtx *cli.Context) *CliEnv

func (*CliEnv) Domain

func (ce *CliEnv) Domain() string

func (*CliEnv) GetAppInfo

func (*CliEnv) GetNhostClient

func (ce *CliEnv) GetNhostClient() *nhostclient.Client

func (*CliEnv) Infoln

func (ce *CliEnv) Infoln(msg string, a ...any)

func (*CliEnv) LoadSession

func (ce *CliEnv) LoadSession(
	ctx context.Context,
) (credentials.Session, error)

func (*CliEnv) Login

func (ce *CliEnv) Login(
	ctx context.Context,
	email string,
	password string,
) (credentials.Credentials, error)

func (*CliEnv) Println

func (ce *CliEnv) Println(msg string, a ...any)

func (*CliEnv) ProjectName

func (ce *CliEnv) ProjectName() string

func (*CliEnv) PromptInput

func (ce *CliEnv) PromptInput(hide bool) (string, error)

func (*CliEnv) PromptMessage

func (ce *CliEnv) PromptMessage(msg string, a ...any)

func (*CliEnv) Warnln

func (ce *CliEnv) Warnln(msg string, a ...any)

type Column

type Column struct {
	Header string
	Rows   []string
}

type PathStructure

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

func NewPathStructure

func NewPathStructure(
	root, dotNhostFolder, dataFolder, nhostFolder string,
) *PathStructure

func (PathStructure) AuthFile

func (p PathStructure) AuthFile() string

func (PathStructure) DataFolder

func (p PathStructure) DataFolder() string

func (PathStructure) DockerCompose

func (p PathStructure) DockerCompose() string

func (PathStructure) DotNhostFolder

func (p PathStructure) DotNhostFolder() string

func (PathStructure) EnvDevelopment

func (p PathStructure) EnvDevelopment() string

func (PathStructure) HasuraConfig

func (p PathStructure) HasuraConfig() string

func (PathStructure) NhostFolder

func (p PathStructure) NhostFolder() string

func (PathStructure) NhostToml

func (p PathStructure) NhostToml() string

func (PathStructure) ProjectFile

func (p PathStructure) ProjectFile() string

func (PathStructure) Root

func (p PathStructure) Root() string

func (PathStructure) Secrets

func (p PathStructure) Secrets() string

Jump to

Keyboard shortcuts

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