template_io

package
v0.0.0-...-678dd56 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConnectionString

func BuildConnectionString(host string, user string, password string, dbname string) string

func ParseTemplates

func ParseTemplates(dir string, logFunc func(string)) (*template.Template, map[string][]string, error)

func ReRender

func ReRender(text string, context map[string]interface{}) (string, error)

func RenderGoTemplate

func RenderGoTemplate(tmpl *template.Template, templateName string, context map[string]interface{}) (string, error)

func RenderTemplateToString

func RenderTemplateToString(tmpl *template.Template, name string, data interface{}) string

Types

type Container

type Container struct {
	Name            string
	Image           Image
	Command         []string
	Environment     map[string]string
	HasService      bool
	Ports           []PortMap
	Resources       Resources
	VolumeMounts    []*VolumeMount
	SecurityContext *SecurityContext
	LivenessProbe   *Probe
	ReadinessProbe  *Probe
}

type ExecAction

type ExecAction struct {
	Command []string
}

type HTTPGetAction

type HTTPGetAction struct {
	Path        string
	Port        int32
	Scheme      string
	HttpHeaders map[string]string
}

type Image

type Image struct {
	ImageName string
	Attr      map[string]string
}

type InMemoryLoader

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

func NewInMemoryLoader

func NewInMemoryLoader() *InMemoryLoader

func (*InMemoryLoader) Exists

func (loader *InMemoryLoader) Exists(name string) bool

func (*InMemoryLoader) LoadTemplatesFromDB

func (loader *InMemoryLoader) LoadTemplatesFromDB(connStr string, tableName string) error

func (*InMemoryLoader) Open

func (loader *InMemoryLoader) Open(name string) (io.Reader, error)

type PortMap

type PortMap struct {
	ContainerPort int
	Port          int
	Protocol      string
}

type Probe

type Probe struct {
	Exec                *ExecAction
	HTTPGet             *HTTPGetAction
	TCPSocket           *TCPSocketAction
	InitialDelaySeconds int32
	PeriodSeconds       int32
	FailureThreshold    int32
}

type Resources

type Resources struct {
	Limits   map[string]string
	Requests map[string]string
}

type SecurityContext

type SecurityContext struct {
	RunAsUser          string
	RunAsGroup         string
	FSGroup            string
	SupplementalGroups []string
}

func ExtractSCFromCR

func ExtractSCFromCR(sc *helxv1.SecurityContext) *SecurityContext

func ExtractSCFromMap

func ExtractSCFromMap(data map[string]interface{}) *SecurityContext

type System

type System struct {
	AppClassName    string
	AppName         string
	InstanceName    string
	Environment     map[string]string
	UUID            string
	Host            string
	SecurityContext *SecurityContext
	Containers      []Container
	InitContainers  []Container
	Volumes         map[string]Volume
	UserInfo        map[string]interface{}
	UserName        string
}

type TCPSocketAction

type TCPSocketAction struct {
	Port int32
}

type Volume

type Volume struct {
	Name   string
	Scheme string
	Attr   map[string]string
}

type VolumeMount

type VolumeMount struct {
	Name      string
	MountPath string
	SubPath   string
	ReadOnly  bool
}

Jump to

Keyboard shortcuts

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