assets

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
var MinimalisticBanner = `` /* 211-byte string literal not displayed */

MinimalisticBanner is a first banner of notya.

View Source
var MkdirPromptQuestion = []*survey.Question{
	{
		Prompt:   &survey.Input{Message: "Title"},
		Validate: survey.MinLength(1),
	},
}

Mkdir is a question list for mkdir command.

View Source
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.

View Source
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.

View Source
var ShortSlog = "📝 Take notes quickly and expeditiously"

ShortSlog is a main slogan of notya.

Functions

func AlreadyExists

func AlreadyExists(path, node string) error

AlreadyExists returns a formatted error message as data-already-exists error.

func CannotDoSth

func CannotDoSth(act, doc string, err error) error

CannotDoSth generates a extre informative error via migrating with actual error.

func ChooseNodePrompt

func ChooseNodePrompt(node, act string, options []string) *survey.Select

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

func GenerateBanner(banner string, slog string) string

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.

func NotExists

func NotExists(path, node string) error

NotExists returns a formatted error message as data-not-exists error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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