Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteAllPaths(path string) error
- func DeletePath(path string) error
- func GetIcon(unicode, colour string) string
- func Init(config Config)
- func PathExists(filePath string) bool
- func PortAvailable(port string) bool
- func Rel(path string) string
- type Config
- type Status
- func (s *Status) Clean()
- func (s *Status) Error(text string)
- func (s *Status) Errorln(text string)
- func (s *Status) Executing(text string)
- func (s *Status) Executingln(text string)
- func (s *Status) Fatal(text string)
- func (s *Status) Increment(value int)
- func (s *Status) Info(text string)
- func (s *Status) Infoln(text string)
- func (s *Status) Print()
- func (s *Status) Reset()
- func (s *Status) Set(text string)
- func (s *Status) Success(text string)
- func (s *Status) Successln(text string)
- func (s *Status) Suppressed(text string)
- func (s *Status) Suppressedln(text string)
- func (s *Status) Update(value int)
- func (s *Status) Warn(text string)
- func (s *Status) Warnln(text string)
Constants ¶
View Source
const ( GEAR = "⚙" CHECK = "✔" CANCEL = "✘" INFO = "ℹ" WARN = "⚠" ERROR = "✖" HOURGLASS = "⌛" )
View Source
const ( Bold = "\033[1m" Reset = "\033[0m" Green = "\033[32m" Blue = "\033[34m" Yellow = "\033[33m" Cyan = "\033[36m" Red = "\033[31m" Gray = "\033[37;2m" )
Initialize console colours
View Source
const ( API_VERSION = "v1" // initiaze webhook-secret for Hasura Authentication WEBHOOK_SECRET = "nhost-webhook-secret" // initiaze admin-secret for Hasura Authentication ADMIN_SECRET = "nhost-admin-secret" )
Variables ¶
View Source
var JWT_KEY = "0f987876650b4a085e64594fae9219e7781b17506bec02489ad061fba8cb22db"
Initiaze JWT key for Hasura Authentication JWT_KEY = generateRandomKey(32)
View Source
var (
WORKING_DIR string
)
Functions ¶
func DeleteAllPaths ¶
deletes all the paths leading to the given file/folder and unlink from filesystem
func DeletePath ¶
deletes the given file/folder path and unlink from filesystem
func PathExists ¶
validates whether a given folder/file path exists or not
func PortAvailable ¶ added in v0.6.2
Types ¶
type Status ¶ added in v0.5.9
type Status struct { Value int Total int Text string Icon string // contains filtered or unexported fields }
Status is an in-line output structure that holds the status text and icon
var ( // New base writer for all tasks Writer Status )
func (*Status) Clean ¶ added in v0.5.9
func (s *Status) Clean()
Delete all text from line, and shift cursor back to beginning of line
func (*Status) Executing ¶ added in v0.5.9
Change the status icon to yellow coloured gear, and set the text
func (*Status) Executingln ¶ added in v0.5.9
Print the execution status in a new line
func (*Status) Suppressed ¶ added in v0.5.9
Change the status icon to gray coloured gear, and set the text
func (*Status) Suppressedln ¶ added in v0.5.9
Print the supressed status in a new line
Click to show internal directories.
Click to hide internal directories.