template

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateConfigAttr

func GenerateConfigAttr(cfg []ConfigFiles) (*string, error)

GenerateConfigAttr generates the Nix attribute set for config files

func GenerateFlake

func GenerateFlake(fl Flake, wr io.Writer, conf *hcl2nix.Config) error

GenerateFlake generates default flake

func GenerateGoModule

func GenerateGoModule(fl *hcl2nix.GoModule, wr io.Writer) error

GenerateGoModule generates default flake

func GenerateNpmApp

func GenerateNpmApp(fl *hcl2nix.JsNpmApp, wr io.Writer) error

GenerateNpmApp generates default flake

func GenerateOCIAttr

func GenerateOCIAttr(artifacts []OCIArtifact) (*string, error)

GenerateOCIAttr generates the Nix attribute set for oci artifacts

func GeneratePoetryApp

func GeneratePoetryApp(fl *hcl2nix.PoetryApp, wr io.Writer) error

GeneratePoetryApp generates default flake

func GenerateRemoteFlake added in v0.2.1

func GenerateRemoteFlake(fl RemoteFile, wr io.Writer) error

GenerateRemoteFlake generates a flake to fetch remote files

func GenerateRustApp

func GenerateRustApp(fl *hcl2nix.RustApp, wr io.Writer) error

GenerateRustApp generates default flake

Types

type ConfigFiles

type ConfigFiles struct {
	// Name of the config
	Name string

	// DestinationDir is the directory to copy config files to in the container
	// This directory will be created in the root of the image.
	// default: /
	DestinationDir string

	// Name of files to copy from root of project
	Files []string
}

ConfigFiles holds config files to export

type Flake

type Flake struct {
	Description         string
	Language            string
	NixPackageRevisions []string
	DevPackages         map[string]string
	RuntimePackages     map[string]string
	RustArguments       RustApp
	OCIAttribute        *string
	ConfigAttribute     *string
	IsBase              bool
}

Flake holds flake parameters

type OCIArtifact

type OCIArtifact struct {
	Artifact            string
	Name                string
	Layers              []string
	Cmd                 []string
	Entrypoint          []string
	EnvVars             []string
	ImportConfigs       []string
	ExposedPorts        []string
	Base                bool
	NixPackageRevisions []string
}

OCIArtifact holds parameters for OCI artifacts

type RemoteFile added in v0.2.1

type RemoteFile struct {
	Name           string
	Version        string
	PlatformURLs   map[string]string
	PlatformHashes map[string]string
	Binaries       []string
}

RemoteFile holds remote flake parameters

type RustApp

type RustApp struct {
	WorkspaceSrc                  string
	CrateName                     string
	RustVersion                   string
	RustToolChain                 string
	RustChannel                   string
	RustProfile                   string
	ExtraRustComponents           []string
	Release                       bool
	RootFeatures                  []string
	FetchCrateAlternativeRegistry string
	HostPlatformCPU               string
	HostPlatformFeatures          []string
	CargoUnstableFlags            []string
	RustcLinkFlags                []string
	RustcBuildFlags               []string
}

RustApp is the representation of a Rust application

Jump to

Keyboard shortcuts

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