dinkerlib

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: ISC Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildImage

func BuildImage(args BuildImageArgs) error

func Def

func Def[T comparable](v T, alt T) T

Types

type AbsPath

type AbsPath string

func MakeAbsPath added in v0.0.4

func MakeAbsPath(relOrAbs string) AbsPath

func (*AbsPath) Exists

func (p *AbsPath) Exists() bool

func (AbsPath) Filename

func (p AbsPath) Filename() string

func (AbsPath) Join

func (p AbsPath) Join(rel string) AbsPath

func (AbsPath) Parent

func (p AbsPath) Parent() AbsPath

func (AbsPath) Raw

func (p AbsPath) Raw() string

func (AbsPath) String

func (p AbsPath) String() string

func (*AbsPath) UnmarshalText

func (s *AbsPath) UnmarshalText(text []byte) error

During json unmarshaling, relative paths are based on the working directory of dinker

type BuildImageArgs

type BuildImageArgs struct {
	FromPath    AbsPath
	Files       []BuildImageArgsFile
	Cmd         []string
	AddEnv      map[string]string
	ClearEnv    bool
	WorkingDir  string
	Ports       []BuildImageArgsPort `json:"ports"`
	DestDirPath AbsPath
}

type BuildImageArgsFile

type BuildImageArgsFile struct {
	Source AbsPath `json:"source"`
	// Defaults to the filename of Source in /. Ex: if source is `a/b/c` the resulting image will have the file at `/c`
	Dest string `json:"dest"`
	// Parsed as octal, defaults to 0644
	Mode string `json:"mode"`
}

type BuildImageArgsPort

type BuildImageArgsPort struct {
	Port int `json:"port"`
	// `tcp`
	Transport string `json:"transport"`
}

Jump to

Keyboard shortcuts

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