spec

package
v0.0.0-...-4d61859 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Version = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	Name      string `json:"name"`
	Source    Source `json:"source"`
	Version   string `json:"version"`
	Sum       string `json:"sum,omitempty"`
	DepSource string `json:"-"`
}

type GitSource

type GitSource struct {
	Remote string `json:"remote"`
	Subdir string `json:"subdir"`
}

type JsonnetFile

type JsonnetFile struct {
	Dependencies map[string]Dependency
}

JsonnetFile is the structure of a `.json` file describing a set of jsonnet dependencies. It is used for both, the jsonnetFile and the lockFile.

func New

func New() JsonnetFile

New returns a new JsonnetFile with the dependencies map initialized

func (JsonnetFile) MarshalJSON

func (jf JsonnetFile) MarshalJSON() ([]byte, error)

MarshalJSON serializes a JsonnetFile into json of the format of a `jsonFile`

func (*JsonnetFile) UnmarshalJSON

func (jf *JsonnetFile) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a `jsonFile`'s json into a JsonnetFile

type LocalSource

type LocalSource struct {
	Directory string `json:"directory"`
}

type Source

type Source struct {
	GitSource   *GitSource   `json:"git,omitempty"`
	LocalSource *LocalSource `json:"local,omitempty"`
}

Jump to

Keyboard shortcuts

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