template

package
v0.0.0-...-205da4a Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotMatch = errors.New("not match")
)

Functions

This section is empty.

Types

type EnumerateOptions

type EnumerateOptions struct {
	Templates []string
}

type Enumerator

type Enumerator interface {
	Enumerate(ctx context.Context, source expr.Source, options *EnumerateOptions) error
}

func Compile

func Compile(templates ...string) (Enumerator, error)

type Framework

type Framework struct {
	Name       string `yaml:"name"`
	Maintainer string `yaml:"maintainer"`
	License    string `yaml:"license"`
	Category   string `yaml:"category"`
	Expr       string `yaml:"expr"`
	// contains filtered or unexported fields
}

type Kind

type Kind uint8
const (
	KindUnknown Kind = iota
	KindApplication
	KindFramework
)

type Metadata

type Metadata struct {
	Name     string       `yaml:"name"`
	Value    string       `yaml:"value"`
	Expr     string       `yaml:"expr"`
	Exec     string       `yaml:"exec"`
	Request  *httpRequest `yaml:"http"`
	Defaults []string     `yaml:"defaults"` // defaults absolute file paths
	Bases    []string     `yaml:"bases"`    // defaults absolute base file paths, without filename
	Files    []string     `yaml:"files"`    // file paths, related to Bases or captured config path
	// contains filtered or unexported fields
}

type Service

type Service struct {
	Expr     string      `yaml:"expr"`
	Exec     string      `yaml:"exec"`
	Keyword  string      `yaml:"keyword"`
	Metadata []*Metadata `yaml:"metadata"`
	Web      []*WebApp   `yaml:"webapp"`
	// contains filtered or unexported fields
}

type Template

type Template struct {
	Name        string            `yaml:"template"`
	Brief       string            `yaml:"brief"`
	Author      string            `yaml:"author"`
	Category    string            `yaml:"category"`
	Annotations map[string]string `yaml:"annotations"`

	Service    *Service     `yaml:"service"`
	Frameworks []*Framework `yaml:"frameworks"`
}

type WebApp

type WebApp struct {
	Name    string    `yaml:"name"`
	Expr    string    `yaml:"expr"`
	Exec    string    `yaml:"exec"`
	Version *Metadata `yaml:"version"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis
jar

Jump to

Keyboard shortcuts

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