Documentation
¶
Overview ¶
Package common for all common functionality and utilities
Index ¶
- Variables
- func BackupDB(writer io.Writer) error
- func BeginTarnsaction(db *sql.DB) (*sql.Tx, error)
- func ClearDB()
- func CloseDB()
- func CopyFile(src, dst string) error
- func Decrypt(encryptedB64 string, password string) (string, error)
- func Encrypt(plaintext string, password string) (string, error)
- func EqualStringPtrs(s1, s2 *string) bool
- func EqualTimePtrs(t1, t2 *time.Time) bool
- func Fail(message string, args ...any)
- func FailOn(err error)
- func FormatTimePtr(t *time.Time) *string
- func GetDB() (*sql.DB, error)
- func GetDBPath() string
- func GetDefaultBackupPath() string
- func GetVersion() string
- func NormalizePath(path string) string
- func Quiet(enable bool)
- func SetVersion(v string)
- func ValidateSqliteFile(path string) error
- func Warn(msg string)
- type Config
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func EqualStringPtrs ¶
func EqualTimePtrs ¶
func FormatTimePtr ¶
func GetDefaultBackupPath ¶ added in v0.3.0
func GetDefaultBackupPath() string
func GetVersion ¶
func GetVersion() string
GetVersion returns the version string. If version was set via SetVersion (goreleaser build), it returns that. Otherwise, it attempts to get the version from git tags.
func NormalizePath ¶ added in v0.2.0
NormalizePath fills in home directory if needed, and make path into absolute path
func SetVersion ¶
func SetVersion(v string)
SetVersion sets the version string (typically injected by goreleaser at build time)
func ValidateSqliteFile ¶ added in v0.2.0
Types ¶
Click to show internal directories.
Click to hide internal directories.