jobs

package
v0.0.0-...-497e0ad Latest Latest
Warning

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

Go to latest
Published: Nov 20, 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

func CheckConfig(configPath string, removeFlag bool) error

func DeleteFromTmp

func DeleteFromTmp(dirname string)

func IsEmpty

func IsEmpty(name string) bool

func RemoveEmptyFolders

func RemoveEmptyFolders(dirname string)

func RemoveURLFromConfig

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

func ValidateTemplate(data string) (bool, error)

Types

type Config

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

type Error

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

type LintError

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

type Mark

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

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

type TemplateResp

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

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