data

package
v0.0.0-...-5eba800 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DiginfraCodeVersion is a git tag used to pull the code of
	// diginfra/diginfra and extract the test data files used in the
	// legacy Python regression tests
	DiginfraCodeVersion = "0.34.1"
	DiginfraCodeDir     = "diginfra-" + DiginfraCodeVersion
)

Variables

View Source
var (
	DownloadDir     = ""
	DiginfraCodeURL = fmt.Sprintf("https://github.com/diginfra/diginfra/archive/refs/tags/%s.zip", DiginfraCodeVersion)
)

Functions

func Download

func Download(url, outPath string) error

func DownloadAndListDiginfraCodeFiles

func DownloadAndListDiginfraCodeFiles() ([]string, error)

func GenSourceFile

func GenSourceFile(w io.Writer, info *GenTemplateInfo) error

func ListDirFiles

func ListDirFiles(dirPath string, recursive bool) ([]string, error)

func Unzip

func Unzip(zipFile, outDir string) error

func VarNameFromFilePath

func VarNameFromFilePath(path, prefix string) string

Types

type GenTemplateInfo

type GenTemplateInfo struct {
	Timestamp   time.Time
	PackageName string
	LargeFiles  []*LargeFileVarInfo
	StringFiles []*StringFileVarInfo
}

type LargeFileVarInfo

type LargeFileVarInfo struct {
	VarName  string
	FileName string
	FilePath string
}

type StringFileVarInfo

type StringFileVarInfo struct {
	VarName     string
	FileName    string
	FileContent string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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