tccUtils

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractProjectID

func ExtractProjectID(validations []engine.NextValidation) (string, error)

ExtractProjectID returns the project ID from validations (no validation performed).

func GenerateProject

func GenerateProject(projectId string, resources ...interface{}) (afero.Fs, projectLib.Project, error)

GenerateProject creates a project in memfs with the provided resources It uses schema's SetWithStruct which internally uses yasser to write YAML files Returns both the filesystem and the project so the fs can be used for TCC compilation

func Logs

func Logs(err error) io.ReadSeeker

Logs converts an error to an io.ReadSeeker, similar to the old compiler.Logs() behavior

func MapToTCCObject

func MapToTCCObject(m any) object.Object[object.Refrence]

MapToTCCObject converts a map to a TCC object.Object[object.Refrence] This is needed because TCC decompiler expects an object, but TNS returns a map The map structure from TNS matches the Flat() output structure Handles both map[string]any and map[any]any

func ProcessDNSValidations

func ProcessDNSValidations(
	validations []engine.NextValidation,
	generatedDomainRegExp *regexp.Regexp,
	devMode bool,
	dvPublicKey []byte,
) error

ProcessDNSValidations runs DNS validations from TCC compiler.

func ProcessProjectIDValidation

func ProcessProjectIDValidation(
	validations []engine.NextValidation,
	expectedProjectID string,
) (string, error)

ProcessProjectIDValidation runs project ID validation from TCC compiler.

func Publish

func Publish(
	tns tnsIface.Client,
	object map[string]interface{},
	indexes map[string]interface{},
	projectID string,
	branch string,
	commit string,
) error

Publish publishes the compiled object and indexes to TNS

Types

This section is empty.

Jump to

Keyboard shortcuts

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