use

package
v1.0.4-0...-8bba0e1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Repositories map[string]map[string]string
}

Context represents the use context

func New

func New(repositories map[string]map[string]string) *Context

New creates a USE instruction backed by the given repositories

func (*Context) Extension

func (c *Context) Extension(file *dockerfile.Dockerfile, line int, tokens *dockerfile.Tokens) dockerfile.Statement

Extension func for parser

type Origin

type Origin struct {
	Host    string
	Vendor  string
	Name    string
	Version string
	Dir     string
	Uri     string
}

Origin represents the parsed components of a USE reference

func (*Origin) String

func (o *Origin) String() string

String creates a string representation of an origin

type Statement

type Statement struct {
	Context   *Context
	Line      int
	Reference string
}

Statement represents a single USE statement

func (*Statement) Emit

func (s *Statement) Emit(out io.Writer)

Emit writes the USE statement

func (*Statement) Origin

func (s *Statement) Origin() (origin *Origin, err error)

Origin parses origin from reference

Jump to

Keyboard shortcuts

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