utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalBucket  = "pigil_storage"
	ConfigBucket = "pigil_config"
	CliDb        = "db"
	CliAuth      = "auth"
	CliChannels  = "channels"
	CliStatus    = "status"
	CliLogout    = "logout"
	CliHelp      = "help"
	CliDiscord   = "discord"
	DbFirstTime  = "isFirst"
	DbDiscordUrl = "discord_url"
	DbFalse      = "false"
	DbTrue       = "true"
	DatabaseName = "pigil.database"
	UserEmail    = "user_email"
	UserAT       = "access_token"
	UserRT       = "refresh_token"
	Discord      = "discord"
	Email        = "email"
)
View Source
const (
	Red    = "\033[31m"
	Reset  = "\033[0m"
	Green  = "\033[32m"
	Yellow = "\033[33m"
)

Variables

View Source
var (
	GoogleClientId     = ""
	GoogleClientSecret = ""
	Channels           = []string{Email, Discord}
)

Functions

func Contains added in v0.2.0

func Contains(slice []string, item string) bool

func ErrorInformation

func ErrorInformation(information string)

func ErrorLogger

func ErrorLogger(err error, place string)

func GenerateDiscordMessage added in v0.2.0

func GenerateDiscordMessage(information types.CommandInformation) *bytes.Buffer

func GenerateEmailTemplate

func GenerateEmailTemplate(information types.CommandInformation) (string, error)

func GenerateHelp added in v0.1.4

func GenerateHelp(version string) string

func GreenPrinter

func GreenPrinter(information string)

func InformationLogger

func InformationLogger(information string)

func PrintInformation

func PrintInformation(data *[]types.CommandInformation)

func StatusPrinter

func StatusPrinter(data *[]types.ConfigurationInformation)

func Stba

func Stba(input string) []byte

Stba String to ByteArray

Types

This section is empty.

Jump to

Keyboard shortcuts

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