Documentation
¶
Index ¶
- func LoadModInfo(m *Mod) error
- func NewImporter(ctx context.Context, resolver Resolver) jsonnet.Importer
- func WithOpts(ctx context.Context, fns ...OptFn) context.Context
- func WriteMod(m *Mod) error
- type ImportPath
- type Importer
- type Mod
- type ModCache
- func (c *ModCache) Get(ctx context.Context, importPath string, version string, ...) (*Mod, error)
- func (c *ModCache) LookupReplace(importPath string, version string) (matched PathIdentity, replace PathIdentity, exists bool)
- func (c *ModCache) ModuleVersion(repo string) (version string)
- func (c *ModCache) Set(mod *Mod)
- func (c *ModCache) SetModuleVersion(module string, version string)
- type OptFn
- type Opts
- type PathIdentity
- type Require
- type Resolver
- type VMod
- func (v *VMod) Get(ctx context.Context, i string) error
- func (v *VMod) ListJsonnet(fromPath string) ([]string, error)
- func (v *VMod) MakeVM(ctx context.Context) *jsonnet.VM
- func (v *VMod) Resolve(ctx context.Context, importPath string, importedFrom string) (string, error)
- func (v *VMod) SetRequireFromImportPath(p *ImportPath, indirect bool) error
- type VersionFixer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadModInfo ¶
func NewImporter ¶
Types ¶
type ImportPath ¶
func ImportPathFor ¶
func ImportPathFor(mod *Mod, importPath string) *ImportPath
func (*ImportPath) FullPath ¶
func (i *ImportPath) FullPath() string
type Mod ¶
type Mod struct { // Module name Module string // JPath JSONNET_PATH // when not empty, symlinks will be created for JSONNET_PATH JPath string // Replace // version limit Replace map[PathIdentity]PathIdentity // Require same as go root // require { module: version } // indirect require { module:: version } Require map[string]Require // Version Version string // Dir Dir string // Sum Sum string Comments map[string][]string }
func ModFromDir ¶
func (*Mod) ResolveImportPath ¶
type ModCache ¶
type ModCache struct {
// contains filtered or unexported fields
}
func NewModCache ¶
func NewModCache() *ModCache
func (*ModCache) LookupReplace ¶
func (c *ModCache) LookupReplace(importPath string, version string) (matched PathIdentity, replace PathIdentity, exists bool)
func (*ModCache) ModuleVersion ¶
func (*ModCache) SetModuleVersion ¶
type Opts ¶
type Opts struct {
Upgrade bool `name:"upgrade,u" usage:"need upgrade dependencies"`
}
func OptsFromContext ¶
type PathIdentity ¶ added in v0.0.3
func ParsePathIdentity ¶
func ParsePathIdentity(v string) (*PathIdentity, error)
func (PathIdentity) IsLocalReplace ¶ added in v0.0.3
func (r PathIdentity) IsLocalReplace() bool
func (PathIdentity) MarshalText ¶ added in v0.0.3
func (r PathIdentity) MarshalText() (text []byte, err error)
func (PathIdentity) String ¶ added in v0.0.3
func (r PathIdentity) String() string
func (*PathIdentity) UnmarshalText ¶ added in v0.0.3
func (r *PathIdentity) UnmarshalText(text []byte) error
type VMod ¶
type VMod struct { *Mod // contains filtered or unexported fields }
func (*VMod) SetRequireFromImportPath ¶
func (v *VMod) SetRequireFromImportPath(p *ImportPath, indirect bool) error
type VersionFixer ¶
Click to show internal directories.
Click to hide internal directories.