utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLength              = 15
	DefaultExecutionTimeout    = 5
	DefaultConcurrentInserts   = 5
	DefaultConcurrentCsvWrites = 5
	DbPath                     = "psgen.db"
	ConfigPath                 = "config"
	ConfigBaseDirName          = ".psgen"
	LogsPath                   = "logs"
)

Variables

View Source
var ErrMalformedCsv = errors.New("malformed csv file")

Functions

func CreateFolder

func CreateFolder(path string) error

func DecryptAES

func DecryptAES(str string, key string) (string, error)

func EncryptAES

func EncryptAES(str string, key string) (string, error)

func GenerateNewRandomKey

func GenerateNewRandomKey() (string, error)

func GetConfigBasePath

func GetConfigBasePath() string

func GetRandomInt

func GetRandomInt(max int64) (int64, error)

func ReadAllCsv

func ReadAllCsv(path string, delim rune) ([][]string, error)

func WriteToCsv

func WriteToCsv(header []string, body [][]string, path string, delim rune) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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