utils

package
v0.0.0-...-c67dadd Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = logrus.New()

Functions

func Copy

func Copy(src, dst string) (int64, error)

func DownloadFile

func DownloadFile(filepath string, url string) error

func ExpandPath

func ExpandPath(path string) string

func FileExists

func FileExists(name string) bool

func FileToString

func FileToString(filePath string) string

func GetBuildsDir

func GetBuildsDir() (string, error)

func GetConfigDir

func GetConfigDir() (string, error)

func GetWorkflowsDir

func GetWorkflowsDir() (string, error)

func IsDirectory

func IsDirectory(path string) (bool, error)

func LinesCount

func LinesCount(s string) int

func ListBuildRecipes

func ListBuildRecipes() ([]string, error)

func ListWorkflows

func ListWorkflows() ([]string, error)

func MakeFolder

func MakeFolder(path string)

func MatchesFleetName

func MatchesFleetName(label, name string) bool

MatchesFleetName determines if a box label matches the given fleet name. If the name ends with -{number}, only exact matches are returned (e.g., "droplet-2" only matches "droplet-2"). Otherwise, prefix matching is used (e.g., "droplet" matches "droplet-1", "droplet-2", etc.).

func ReadBuildFile

func ReadBuildFile(nameOrPath string) (*models.BuildRecipe, error)

func ReadModuleFile

func ReadModuleFile(path string) (*models.Module, error)

func ReadWorkflowFile

func ReadWorkflowFile(nameOrPath string) (*models.Workflow, error)

func ReplaceBuildVars

func ReplaceBuildVars(text string, vars map[string]string) string

func ReplaceWorkflowVars

func ReplaceWorkflowVars(text string, vars map[string]string) string

func RunCommand

func RunCommand(command string, background bool)

func SaveBuildRecipe

func SaveBuildRecipe(recipe *models.BuildRecipe) error

func SaveWorkflow

func SaveWorkflow(workflow *models.Workflow) error

func SetLogLevel

func SetLogLevel(level string)

func SetProxy

func SetProxy(proxyURL string)

func StringToFile

func StringToFile(filePath, text string)

func Unzip

func Unzip(src, dest string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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