jobs

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConfig added in v1.3.0

func CheckConfig(configPath string, removeFlag bool) error

func DeleteFromTmp

func DeleteFromTmp(dirname string)

func IsEmpty

func IsEmpty(name string) bool

func RemoveDuplicates

func RemoveDuplicates(path string, console bool)

func RemoveEmptyFolders

func RemoveEmptyFolders(dirname string)

func RemoveURLFromConfig added in v1.3.0

func RemoveURLFromConfig(configPath, url string) error

func Start

func Start(_path string, console bool, threads int, defaultTimeout int)

func UpdateRepo

func UpdateRepo(path string, remDirs bool, remFiles bool, printOut bool)

func ValidateTemplate added in v1.3.0

func ValidateTemplate(data string) (bool, error)

Types

type Config added in v1.3.0

type Config struct {
	ExcludeDirs        []string `yaml:"exclude-dirs"`
	ExcludeFiles       []string `yaml:"exclude-files"`
	CommunityTemplates []string `yaml:"community-templates"`
}

type Error added in v1.3.0

type Error struct {
	Name string `json:"name"`
	Mark Mark   `json:"mark"`
}

type LintError added in v1.3.0

type LintError struct {
	Name   string `json:"name,omitempty"`
	Reason string `json:"reason,omitempty"`
	Mark   Mark   `json:"mark,omitempty"`
}

type Mark added in v1.3.0

type Mark struct {
	Name     string `json:"name,omitempty"`
	Position int    `json:"position,omitempty"`
	Line     int    `json:"line,omitempty"`
	Column   int    `json:"column,omitempty"`
	Snippet  string `json:"snippet,omitempty"`
}

type TemplateLintResp added in v1.3.0

type TemplateLintResp struct {
	Input     string    `json:"template_input,omitempty"`
	Lint      bool      `json:"template_lint,omitempty"`
	LintError LintError `json:"lint_error,omitempty"`
}

type TemplateResp added in v1.3.0

type TemplateResp struct {
	Input              string          `json:"template_input,omitempty"`
	Format             bool            `json:"template_format,omitempty"`
	Updated            string          `json:"updated_template,omitempty"`
	Enhance            bool            `json:"template_enhance,omitempty"`
	Enhanced           string          `json:"enhanced_template,omitempty"`
	Lint               bool            `json:"template_lint,omitempty"`
	LintError          LintError       `json:"lint_error,omitempty"`
	Validate           bool            `json:"template_validate,omitempty"`
	ValidateErrorCount int             `json:"validate_error_count,omitempty"`
	ValidateError      []ValidateError `json:"validate_error,omitempty"`
	Error              Error           `json:"error,omitempty"`
}

TemplateResponse from templateman to be used for enhancing and formatting

type ValidateError added in v1.3.0

type ValidateError struct {
	Location string      `json:"location,omitempty"`
	Message  string      `json:"message,omitempty"`
	Name     string      `json:"name,omitempty"`
	Argument interface{} `json:"argument,omitempty"`
	Stack    string      `json:"stack,omitempty"`
	Mark     struct {
		Line   int `json:"line,omitempty"`
		Column int `json:"column,omitempty"`
		Pos    int `json:"pos,omitempty"`
	} `json:"mark,omitempty"`
}

Jump to

Keyboard shortcuts

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