Documentation ¶
Index ¶
- Constants
- Variables
- func CheckArguments()
- func HTMLizeMessage(message string) (htmlMessage string)
- func LoadEnv()
- func ProviderList() (providers map[string][]string, err error)
- func SanitizeMessage(message string) (messageParts []string, err error)
- func SendPushoverMessage(token string, user string, message string, asOf time.Time) (err error)
- func SetupFlags()
Constants ¶
View Source
const ( // ToolName contains the name of the application. ToolName string = "Coinspy" // ToolVersion contains the version number of the application. ToolVersion string = "2.0.0-dev" // ToolID contains a user-agent-style representation of ToolName/ToolVersion. ToolID string = ToolName + "/" + ToolVersion // ToolURL contains the URL where the application can be found. ToolURL string = "https://gitlab.com/rbrt-weiler/coinspy" // EnvFileName contains the expected name for the env file. EnvFileName string = ".coinspyenv" // LineBreak defines the format of linebreaks in the Pushover message. LineBreak string = "\r\n" // PushoverMessageLength defines the maximum length of a Pushover message. PushoverMessageLength int = 1024 // ErrSuccess means no error. ErrSuccess int = 0 // ErrGeneric represents an generic error. ErrGeneric int = 1 // ErrUsage is thrown when the usage message is shown. ErrUsage int = 2 )
Variables ¶
View Source
var ( // Config stores the parsed CLI arguments. Config types.AppConfig // Cons is a helper variable used for printing output. Cons consolehelper.ConsoleHelper )
Functions ¶
func CheckArguments ¶
func CheckArguments()
CheckArguments performs a sanity check on the parsed CLI arguments.
func HTMLizeMessage ¶
HTMLizeMessage adds HTML links to Yahoo finance charts to each line.
func ProviderList ¶
ProviderList returns a map containing all possible providers. The key of the map is the provider name, while the value - an array - contains all possible markets for that provider.
func SanitizeMessage ¶
SanitizeMessage checks the length of a message and returns an array of strings, each containing a part that will go through Pushover without being cut off.
func SendPushoverMessage ¶
SendPushoverMessage is used to send a Pushover notification.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.