factory

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Regexp     = `\$\{(\w|\.)+}`
	FormatJson = "json"
	FormatYaml = "yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Compare

type Compare struct {
	Type string `json:"type"`
	Key  string `json:"key"`
	Old  string `json:"old"`
	Cur  string `json:"cur"`
}

type Factory

type Factory interface {
	TemplateVersion(body []byte) string
	CheckTemplate(ctx kratosx.Context, srvId uint32, template string) error
	ParseByContent(ctx kratosx.Context, req *ParseByContentRequest) (string, error)
}

func New

func New(bsRepo business.Repo, rsRepo resource.Repo) Factory

type ParseByContentRequest

type ParseByContentRequest struct {
	EnvId    uint32 `json:"env_id"`
	ServerId uint32 `json:"server_id"`
	Format   string `json:"format"`
	Content  string `json:"content"`
}

type TemplateValue

type TemplateValue struct {
	Value   string
	Exclude bool
}

Jump to

Keyboard shortcuts

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