Help us shape the future of Go! Take the 2026 Go Developer Survey

v1

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "v1"

Variables

View Source
var ErrInvalidBundle = errors.New("invalid bundle")
View Source
var ErrInvalidManifest = errors.New("invalid manifest")

Functions

func BuildBundle

func BuildBundle(p base.FileProducer, opts ...ManifestOption) (base.Bundle, error)

func ReadBundle

func ReadBundle(p base.FileProducer) (base.Bundle, error)

Types

type Bundle

type Bundle struct {
	// contains filtered or unexported fields
}

func (*Bundle) BundleFormatVersion

func (b *Bundle) BundleFormatVersion() string

func (*Bundle) Document

func (b *Bundle) Document() map[string]interface{}

func (*Bundle) Manifest

func (b *Bundle) Manifest() interface{}

func (*Bundle) Modules

func (b *Bundle) Modules() map[string]*ast.Module

func (*Bundle) Provider

func (b *Bundle) Provider() data.Provider

func (*Bundle) SourceInfo

func (b *Bundle) SourceInfo() base.SourceInfo

func (*Bundle) Validate

func (b *Bundle) Validate() error

type Manifest

type Manifest struct {
	base.Manifest
	PolicyEngineVersion string      `json:"policy_engine_version"`
	Revision            string      `json:"revision"`
	VCS                 VCSMetadata `json:"vcs"`
}

func (*Manifest) Validate

func (m *Manifest) Validate() error

type ManifestOption

type ManifestOption func(m *Manifest)

func WithRevision

func WithRevision(r string) ManifestOption

func WithVCSType

func WithVCSType(t string) ManifestOption

func WithVCSURI

func WithVCSURI(u string) ManifestOption

type VCSMetadata

type VCSMetadata struct {
	Type string `json:"type"`
	URI  string `json:"uri"`
}

Jump to

Keyboard shortcuts

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