Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LineReader ¶
type LineReader struct {
// contains filtered or unexported fields
}
LineReader represents a reader that reads from the underlying reader line by line, separated by '\n'.
func NewReader ¶
func NewReader(r *bufio.Reader) *LineReader
NewReader returns a new reader, using the underlying io.Reader as input.
func (*LineReader) Read ¶
func (r *LineReader) Read() ([]byte, error)
Read returns a single line (with '\n' ended) from the underlying reader. An error is returned iff there is an error with the underlying reader.
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
Package is the set of metadata and objects in a package.
func (*Package) GetImageMeta ¶
GetImageMeta gets the ImageMeta from the package.
func (*Package) GetObjects ¶
GetObjects gets objects from the package.
type PackageParser ¶
type PackageParser struct {
// contains filtered or unexported fields
}
PackageParser is a Parser implementation for parsing packages. Specifically, is used to parse packages from NDJSON files.
func (*PackageParser) Parse ¶
func (p *PackageParser) Parse(ctx context.Context, reader io.ReadCloser) (*Package, error)
Parse is the underlying logic for parsing packages. It first attempts to decode objects recognized by the object scheme, then attempts to decode objects recognized by the meta scheme. Objects not recognized by either scheme return an error rather than being skipped.