Documentation
¶
Index ¶
- Variables
- func Check(err error)
- func ClearScreen()
- func Colorize(color, text string) string
- func CutDaCommands(dir string, cmds map[int][2]string, order []int) error
- func CutDir(dir string, conf *Config, ans Data) error
- func CutFiles(dir string, conf *Config, ans Data) error
- func CutTheQuestions(ans *map[string]string, conf *Config) error
- func GetToken() (*string, error)
- func Input(ques string, def string, ans *string, validate func(string) error) error
- func LoggedIn() (*string, bool, error)
- func Login()
- func Logout() error
- func MakeItSpin(f func(), suffix string)
- func ParseCommands(cmds map[int][2]string, ans Data) ([]int, error)
- func ParseQuery(str string) (url.Values, error)
- func ParseUserJSON(body string) (..., error)
- func PathExists(path string) (bool, error)
- func RemoveItemFromSlice(slice []string, s int) []string
- type Config
- type Data
Constants ¶
This section is empty.
Variables ¶
View Source
var BackendURL = "https://cakes.run/api"
Functions ¶
func ClearScreen ¶
func ClearScreen()
func CutDaCommands ¶ added in v0.1.1
func CutTheQuestions ¶ added in v0.1.1
func MakeItSpin ¶
func MakeItSpin(f func(), suffix string)
func ParseCommands ¶ added in v0.2.8
func ParseUserJSON ¶
func PathExists ¶
func RemoveItemFromSlice ¶
Types ¶
type Config ¶
type Config struct { Metadata struct { Name string Description string } `toml:"metadata"` Content map[string]string `toml:"content"` FileStructure map[string]string `toml:"filestructure"` Commands map[int][2]string `toml:"toppings"` CommandsBefore map[int][2]string `toml:"batter"` Questions map[string][]struct { Question string `toml:"ques"` Type string `toml:"type"` Options []string `toml:"options"` Default string `toml:"default"` } `toml:"questions"` }
func ParseFromFile ¶
Click to show internal directories.
Click to hide internal directories.