Documentation ¶
Index ¶
- Variables
- func AlreadyExists(path, node string) error
- func CannotDoSth(act, doc string, err error) error
- func ChooseNodePrompt(node, act string, options []string) *survey.Select
- func ChooseRemotePrompt(services []string) *survey.Select
- func GenerateBanner(banner string, slog string) string
- func NewNamePrompt(d string) *survey.Input
- func NotExists(path, node string) error
Constants ¶
This section is empty.
Variables ¶
var ( SameTitles = errors.New( `Provided "current" and "new" title are the same, please provide a different title`, ) EmptyWorkingDirectory = errors.New(`Empty working directory, couldn't found any file`) InvalidSettingsData = errors.New(`Invalid settings data, cannot complete operation`) NotAvailableForFirebase = errors.New(`This functionality isn't available for firebase service`) InvalidFirebaseProjectID = errors.New(`Provided firebase-project-id is invalid(or empty)`) FirebaseServiceKeyNotExists = errors.New(`Firebase service key file doesn't exists at given path`) InvalidFirebaseCollection = errors.New(`Provided firebase-collection-id is invalid`) InvalidPathForAct = errors.New(`Generated or provided path is invalid for this action`) )
Constant and non modifiable errors.
var CreatePromptQuestion = []*survey.Question{
{
Prompt: &survey.Input{
Message: "Title",
Help: "Append to your note any title you want, and then complete file name with special file name type | e.g: new_note.md",
},
Validate: survey.MinLength(1),
},
}
CreatePromptQuestion is a question list for create command.
var FirebaseRemoteConnectPromptQuestion = []*survey.Question{
{
Name: "fire_project_id",
Prompt: &survey.Input{
Message: "Firebase Project ID",
Help: "The project ID of your Firebase project.",
},
Validate: survey.MinLength(1),
},
{
Name: "fire_account_key",
Prompt: &survey.Input{
Message: "Firebase Account Key",
Help: "The Firebase Admin SDK private key file path. Must be given a full path, like: /Users/john-doe/notya/account_key.json.",
},
Validate: survey.MinLength(5),
},
{
Name: "fire_collection",
Prompt: &survey.Input{
Message: "Firebase Collection",
Help: "A name of collection for notes, from your firebase project's firestore.",
},
Validate: survey.MinLength(1),
},
}
FirebaseRemoteConnectPromptQuestion is a question list that fills up required values for firebase remote connection. Used in Remote command's connect subcommand.
var MinimalisticBanner = `` /* 211-byte string literal not displayed */
MinimalisticBanner is a first banner of notya.
var MkdirPromptQuestion = []*survey.Question{
{
Prompt: &survey.Input{Message: "Title"},
Validate: survey.MinLength(1),
},
}
Mkdir is a question list for mkdir command.
var MoveNotesPrompt = &survey.Confirm{ Message: "Move notes", Help: "Do you wanna move old notes to new path?", Default: false, }
MoveNotesPrompt is a confirm prompt for setting's move-note functionality.
var OpenViaEditorPromt = &survey.Confirm{ Message: "Wanna open with editor?", Help: "Do you want to open note with your editor?", Default: false, }
OpenViaEditorPromt is a confirm prompt for editor editing.
var ShortSlog = "📝 Take notes quickly and expeditiously"
ShortSlog is a main slogan of notya.
Functions ¶
func AlreadyExists ¶
AlreadyExists returns a formatted error message as data-already-exists error.
func CannotDoSth ¶
CannotDoSth generates a extre informative error via migrating with actual error.
func ChooseNodePrompt ¶
ChooseNodePrompt is a prompt interface for tui file or folder choosing bar.
func ChooseRemotePrompt ¶
func ChooseRemotePrompt(services []string) *survey.Select
ChooseRemotePrompt is a prompt interface for tui remote service choosing bar.
func GenerateBanner ¶
GenerateBanner merges slog and banner together, to get final result of application banner.ƒ
func NewNamePrompt ¶
func NewNamePrompt(d string) *survey.Input
NewNamePrompt is a input prompt for rename command.
Types ¶
This section is empty.