defparse

package
v1.3.0 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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