logic

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToCamelCase

func ConvertToCamelCase(input interface{}, params ...interface{}) (interface{}, error)

ConvertToCamelCase converts a string to CamelCase

func ConvertToKebabCase

func ConvertToKebabCase(input interface{}, params ...interface{}) (interface{}, error)

ConvertToKebabCase converts a string to kebab-case

func ConvertToPascaleCase

func ConvertToPascaleCase(input interface{}, params ...interface{}) (interface{}, error)

ConvertToPascalCase converts a string to PascalCase

func ConvertToSnakeCase

func ConvertToSnakeCase(input interface{}, params ...interface{}) (interface{}, error)

ConvertToSnakeCase converts a string to snake_case

func DownloadFile added in v0.0.2

func DownloadFile(item models.Item) error

func Generate16bitSecret

func Generate16bitSecret(input interface{}, params ...interface{}) (interface{}, error)

GenerateSecret generates a 16-byte hexadecimal secret

func Generate64BitSecret

func Generate64BitSecret(input interface{}, params ...interface{}) (interface{}, error)

Generate64BitSecret generates an 8-byte (64-bit) hexadecimal secret

func GenerateFile added in v0.0.2

func GenerateFile(item models.Item)

func GenerateUUID

func GenerateUUID(input interface{}, params ...interface{}) (interface{}, error)

func JoinPath

func JoinPath(input interface{}, params ...interface{}) (interface{}, error)

JoinPath joins strings into a path using the OS separator

func LowerFirst

func LowerFirst(input interface{}, params ...interface{}) (interface{}, error)

LowerFirst converts the first letter of a string to lower case

func Pluralize

func Pluralize(input interface{}, params ...interface{}) (interface{}, error)

func ReadEnvValue

func ReadEnvValue(input interface{}, params ...interface{}) (interface{}, error)

ReadEnvValue reads a value from a specified .env file

func ReadFile added in v0.0.2

func ReadFile(filename string) string

readFile reads the content of a file

func ReadJSON added in v0.0.2

func ReadJSON(filename string) map[string]interface{}

readJSON reads and parses the JSON data file

func RunCommand added in v0.0.2

func RunCommand(item models.Item)

func WriteFileWithCustomSeparator added in v0.0.2

func WriteFileWithCustomSeparator(filePath string, data []byte, perm os.FileMode) error

Types

type Config added in v0.0.2

type Config struct {
	Items []models.Item `yaml:"items"`
}

Config holds the filenames for data, template, and output

func ReadConfig added in v0.0.2

func ReadConfig(filename string) Config

readConfig reads and parses the YAML configuration file

Jump to

Keyboard shortcuts

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