constants

package
v0.1.36 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package constants consists of constants used throughout the `dev` tool. This can be stuff like application assets that need to be bundled with the application or phrases to support i18n in future- hopefully this goes multilingual but ¯\_(ツ)_/¯

Index

Constants

View Source
const (
	// DefaultGitlabHostname is the default Gitlab hostname when it's not specified
	DefaultGitlabHostname = "gitlab.com"

	// DefaultNetworkCheckMethod is the default method to use when issuing HTTP calls
	DefaultNetworkCheckMethod = "GET"

	// DefaultPathToSQLite3DB is the default location of the database
	DefaultPathToSQLite3DB = "~/dev.db"

	// DefaultRedactedString is the default string used to replace access tokens/secrets
	DefaultRedactedString = "[REDACTED]"
)
View Source
const (
	// ExitOK indicates there are no errors
	ExitOK = 0

	// ExitErrorSystem indicates the error is because of the system
	ExitErrorSystem = 1

	// ExitErrorUser indicates the error is because of the user
	ExitErrorUser = 2

	// ExitErrorInput indicates the error is because of the user's input
	ExitErrorInput = 4

	// ExitErrorConfiguration indicates the error is because of the
	// configuration
	ExitErrorConfiguration = 8

	// ExitErrorApplication indicates the error is a logical bug with the
	// code
	ExitErrorApplication = 16

	// ExitErrorValidation indicates the error is related to validation
	ExitErrorValidation = 32
)
View Source
const (
	// CheckSuccessFormat is the standardised format used to print messages
	// where the check was successful
	CheckSuccessFormat = "\033[32m✅\033[0m \033[32m%s\033[0m "

	// CheckFailureFormat is the standardised format used to print messsages
	// where the check failed
	CheckFailureFormat = "\033[31m❌ \033[31m%s\033[0m "

	// CheckSkippedFormat is the standardised format used to print messages
	// where the check was skipped
	CheckSkippedFormat = "\033[33m👀\033[0m \033[33m%s\033[0m "
)
View Source
const (
	// DevTimeFormat is the printed time format for messages intended for logging from the `dev` application
	DevTimeFormat = "20060102_150405"

	// DevHumanTimeFormat is the printed time format for messages intended for human reading from the `dev` application
	DevHumanTimeFormat = "2006-01-02 15:04:05"

	// DateOnlyTimeFormat is the time format when printing just the date
	DateOnlyTimeFormat = "2006-01-02"

	// GithubAPITimeFormat defines the timestamp format of timestamps returned by the Github API
	GithubAPITimeFormat = "2006-01-02T15:04:05.99Z"

	// GitlabAPITimeFormat defines the timestamp format of timestamps returned by the Gitlab API
	GitlabAPITimeFormat = "2006-01-02T15:04:05.999Z"

	// PivotalTrackerAPITimeFormat defines the timestampformat of timestamps returned by the Pivotal Tracker API
	PivotalTrackerAPITimeFormat = "2006-01-02T15:04:05Z"
)
View Source
const (
	// CanonicalRepositoryURL defines the working repository for `dev`'s code
	CanonicalRepositoryURL = "https://gitlab.com/zephinzer/dev"

	// RepositoryURLConfiguration defines a URL to the working repository for `dev`'s configuration
	RepositoryURLConfiguration = "https://gitlab.com/zephinzer/dev/-/blob/master/docs/configuration.md"
)
View Source
const (
	// GithubClientID is the client ID of the cloud hosted Dev instance
	GithubClientID = "cfd66cdb0d6593dc586c"
)

Variables

View Source
var (
	AccountCanonicalNoun        = "account"
	AccountAliases              = []string{"accounts", "acct", "accts", "acc", "accs", "a"}
	AddCanonicalVerb            = "add"
	AddAliases                  = []string{"+"}
	CheckCanonicalVerb          = "check"
	CheckAliases                = []string{"c", "verify"}
	ClientCanonicalNoun         = "client"
	ClientAliases               = []string{"cl", "c"}
	DebugCanonicalVerb          = "debug"
	DebugAliases                = []string{"test"}
	ConfigurationCanonicalNoun  = "configuration"
	ConfigurationAliases        = []string{"config", "conf", "cf", "c"}
	DatabaseCanonicalNoun       = "database"
	DatabaseAliases             = []string{"db"}
	GetCanonicalVerb            = "get"
	GetAliases                  = []string{"retrieve", "g"}
	GitlabCanonicalNoun         = "gitlab"
	GitlabAliases               = []string{"gl"}
	GithubCanonicalNoun         = "github"
	GithubAliases               = []string{"gh"}
	GotoCanonicalVerb           = "goto"
	GotoAliases                 = []string{"go", "go2"}
	InitialiseCanonicalNoun     = "initialise"
	InitialiseAliases           = []string{"initialize", "init", "i"}
	InstallCanonicalVerb        = "install"
	InstallAliases              = []string{"setup"}
	NetworkCanonicalNoun        = "network"
	NetworkAliases              = []string{"networks", "net", "nets", "nw"}
	NotificationsCanonicalNoun  = "notifications"
	NotificationsAliases        = []string{"notification", "notif", "notifs", "n"}
	OpenCanonicalVerb           = "open"
	OpenAliases                 = []string{"op", "o"}
	PivotalTrackerCanonicalNoun = "pivotaltracker"
	PivotalTrackerAliases       = []string{"pivotal", "pt"}
	RepositoryCanonicalNoun     = "repository"
	RepositoryAliases           = []string{"repositories", "repo", "repos", "rp", "r"}
	ServerCanonicalNoun         = "server"
	ServerAliases               = []string{"syncer"}
	SoftwareCanonicalNoun       = "software"
	SoftwareAliases             = []string{"softwares", "sw", "apps", "s"}
	StartCanonicalVerb          = "start"
	StartAliases                = []string{"st", "s"}
	SystemInfoCanonicalNoun     = "sysinfo"
	SystemInfoAliases           = []string{"system-info", "system", "si"}
	TelegramCanonicalNoun       = "telegram"
	TelegramAliases             = []string{"tg", "t.me"}
	ThisCanonicalNoun           = "this"
	ThisAliases                 = []string{"t"}
	TrelloCanonicalNoun         = "trello"
	TrelloAliases               = []string{"tr"}
	WorkCanonicalNoun           = "work"
	WorkAliases                 = []string{"stories", "tasks", "tickets", "w"}
	WorkspaceCanonicalNoun      = "workspace"
	WorkspaceAliases            = []string{"ws"}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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