utils

package
v0.0.0-...-fbd7fd2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_SECRET_FILENAME = ".secret"

Variables

This section is empty.

Functions

func CreateInstanceDirectory

func CreateInstanceDirectory(instanceDir string, config string)

func Decrypt

func Decrypt(text, secret string) (string, error)

func EachLimit

func EachLimit(length, limit int, work func(int))

func Encrypt

func Encrypt(text, secret string) (string, error)

func GenerateSecret

func GenerateSecret() string

func GetDefaultSecretPath

func GetDefaultSecretPath() string

func GetDefaultY2cHomeDir

func GetDefaultY2cHomeDir() string

func GetSecret

func GetSecret() (string, error)

func GetSecretAndGenerateIfMissing

func GetSecretAndGenerateIfMissing() string

func ResolveAbsolutePathDir

func ResolveAbsolutePathDir(dir string) string

func ResolveAbsolutePathFile

func ResolveAbsolutePathFile(file string) string

Types

type DirectoryProperties

type DirectoryProperties struct {
	ConfigPath   string
	SpaceDir     string
	TemplatesDir string
	HooksDir     string
	SpaceKey     string
}

func GetDirectoryProperties

func GetDirectoryProperties(path string) DirectoryProperties

Jump to

Keyboard shortcuts

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