util

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearCache

func ClearCache() error

func DocGenFromPipeline

func DocGenFromPipeline(cfg *Config) error

func ExecutePipeline

func ExecutePipeline(cfg *Config) error

func HasRunAlready added in v0.0.2

func HasRunAlready(id string) bool

func IsCached added in v0.0.2

func IsCached(id string) bool

func MarkdownToText

func MarkdownToText(md string) string

func NewTemplateFilter

func NewTemplateFilter(varsFile string) (func([]byte) ([]byte, error), error)

NewTemplateFilter creates a new Template Filter based in the file and inline variables.

func PopFromCache added in v0.0.2

func PopFromCache(id string) (model.GenericYAML, error)

func PushToCache added in v0.0.2

func PushToCache(genericYAML model.GenericYAML) error

func ReadYAML

func ReadYAML(filePath string) (model.GenericYAML, error)

func RenderPipeline

func RenderPipeline(cfg *Config) (int, string, error)

Types

type Config

type Config struct {
	File          string
	Debug         bool
	NoColor       bool
	Vars          string
	OutputDir     string
	NoCache       bool
	ConsoleOutput bool
}

type SafeCounter added in v0.0.2

type SafeCounter struct {
	// contains filtered or unexported fields
}

SafeCounter is safe to use concurrently.

func (*SafeCounter) Inc added in v0.0.2

func (c *SafeCounter) Inc()

Inc increments the counter for the given key.

func (*SafeCounter) Lock added in v0.0.2

func (c *SafeCounter) Lock()

func (*SafeCounter) Unlock added in v0.0.2

func (c *SafeCounter) Unlock()

func (*SafeCounter) Value added in v0.0.2

func (c *SafeCounter) Value() int

Value returns the current value of the counter for the given key.

type TemplateFilter

type TemplateFilter func([]byte) ([]byte, error)

TemplateFilter is the type of the yapl Template Filter which include custom variables and functions.

type TmplVars

type TmplVars struct {
	Vars map[string]interface{}
}

Jump to

Keyboard shortcuts

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