defparse

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package defparse reads a build definition file: a small JSON document that points a project at its Dockerfile or a prebuilt image.

Index

Constants

View Source
const FileName = "levelrail-definition.json"

FileName is the one place the definition file name is spelled out.

View Source
const MaxBytes = 64 << 10

MaxBytes bounds the file so a hostile checkout cannot make the CLI or server buffer it all.

View Source
const SchemaVersion = 2

SchemaVersion is the only layout this parser accepts.

Variables

This section is empty.

Functions

This section is empty.

Types

type Def

type Def struct {
	DockerfilePath  string
	DockerfileLines []string
	ImageName       string
}

Def is the parsed definition file.

func Parse

func Parse(b []byte) (Def, error)

Parse validates b as a definition file. The path is returned clean and relative, so callers can join it to a project directory without a second check.

Jump to

Keyboard shortcuts

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