lockfile

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name(s string) string

func Sha256

func Sha256(path string) (string, error)

Types

type Lock

type Lock struct {
	Name            string             `json:"name"`
	LockfileVersion int                `json:"lockfileVersion"`
	Packages        map[string]Package `json:"packages"`
}

func Read

func Read(ctx context.Context, cfgPath string) (*Lock, error)

func (*Lock) SortedKeys

func (l *Lock) SortedKeys() []string

SortedKeys returns package names sorted alphabetically.

func (*Lock) Validate

func (l *Lock) Validate(cfg v1.BuildSpec) error

Validate checks that the configuration file lines up with what we expect from the lockfile and vice versa

type Package

type Package struct {
	Name      string         `json:"-"`
	Type      v1.PackageType `json:"type"`
	Version   string         `json:"version"`
	Resolved  string         `json:"resolved"`
	Integrity string         `json:"integrity"`
	Direct    bool           `json:"direct"`
}

Jump to

Keyboard shortcuts

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