Documentation
¶
Index ¶
- func NewImporter(ctx context.Context, resolver Resolver) jsonnet.Importer
- func WithOpts(ctx context.Context, fns ...OptFn) context.Context
- type ImportPath
- type Importer
- type Mod
- func (m *Mod) LoadInfo() (bool, error)
- func (m *Mod) ResolveImportPath(ctx context.Context, cache *ModCache, importPath string, version string) (*ImportPath, error)
- func (m *Mod) Resolved() bool
- func (m *Mod) SetRequire(module string, modVersion modfile.ModVersion, indirect bool)
- func (m *Mod) String() string
- type ModCache
- func (c *ModCache) Collect(ctx context.Context, mod *Mod)
- func (c *ModCache) Get(ctx context.Context, importPath string, version string, ...) (*Mod, error)
- func (c *ModCache) LookupReplace(importPath string) (matched modfile.PathIdentity, replace modfile.PathIdentity, exists bool)
- func (c *ModCache) RepoVersion(repo string) modfile.ModVersion
- func (c *ModCache) SetRepoVersion(module string, version modfile.ModVersion)
- type OptFn
- type Opts
- 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 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 { modfile.ModFile modfile.ModVersion // Repo Repo string // RepoSum RepoSum string // Dir Dir string }
func (*Mod) ResolveImportPath ¶
func (*Mod) SetRequire ¶
func (m *Mod) SetRequire(module string, modVersion modfile.ModVersion, indirect bool)
type ModCache ¶
type ModCache struct {
// contains filtered or unexported fields
}
func NewModCache ¶
func NewModCache() *ModCache
func (*ModCache) LookupReplace ¶
func (c *ModCache) LookupReplace(importPath string) (matched modfile.PathIdentity, replace modfile.PathIdentity, exists bool)
func (*ModCache) RepoVersion ¶ added in v0.0.4
func (c *ModCache) RepoVersion(repo string) modfile.ModVersion
func (*ModCache) SetRepoVersion ¶ added in v0.0.4
func (c *ModCache) SetRepoVersion(module string, version modfile.ModVersion)
type Opts ¶
type Opts struct {
Upgrade bool `name:"upgrade,u" usage:"need upgrade dependencies"`
}
func OptsFromContext ¶
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 ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.