Documentation ¶
Index ¶
- Constants
- func WithOpts(ctx context.Context, fns ...OptFn) context.Context
- type Context
- func (r *Context) Build(ctx context.Context, filename string) *build.Instance
- func (r *Context) Cleanup() error
- func (r *Context) CueModRoot() string
- func (r *Context) Eval(ctx context.Context, filename string, encoding cuex.Encoding) ([]byte, error)
- func (r *Context) Get(ctx context.Context, i string) error
- func (r *Context) ListCue(fromPath string) ([]string, error)
- func (r *Context) Resolve(ctx context.Context, importPath string, importedAt string) (string, error)
- type ImportFunc
- type Instance
- type Mod
- func (m *Mod) LoadInfo(ctx context.Context) (bool, error)
- func (m *Mod) ResolveImportPath(ctx context.Context, cache *cache, importPath string, version string) (*Path, error)
- func (m *Mod) Resolved() bool
- func (m *Mod) SetRequire(module string, modVersion modfile.ModVersion, indirect bool)
- func (m *Mod) String() string
- type OptFn
- type OptionFunc
- type Opts
- type Path
- func (i *Path) ImportPath() string
- func (i *Path) ImportPathDir() string
- func (i *Path) RepoRootDir() string
- func (i *Path) ResolvedImportPath() string
- func (i *Path) SymlinkOrImport(ctx context.Context, root string) error
- func (i Path) WithReplace(from string, replaceTarget modfile.ReplaceTarget) *Path
- type ReplaceRule
- type VersionFixer
Constants ¶
View Source
const ModSumFilename = "cue.mod/module.sum"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func ContextFor ¶
func (*Context) CueModRoot ¶
type ImportFunc ¶
type Mod ¶
type Mod struct { modfile.ModFile modfile.ModVersion // Repo where module in vcs root Repo string // Sum repo absolute dir sum Sum string // Lang if set, will trigger extractor like `go` Lang string // Dir module absolute dir Dir string }
func (*Mod) ResolveImportPath ¶
func (*Mod) SetRequire ¶
func (m *Mod) SetRequire(module string, modVersion modfile.ModVersion, indirect bool)
type OptionFunc ¶
func OptImportFunc ¶
func OptImportFunc(importFunc ImportFunc) OptionFunc
func OptRoot ¶
func OptRoot(dir string) OptionFunc
type Opts ¶
type Opts struct { Upgrade bool `name:"upgrade,u" usage:"need upgrade dependencies"` Verbose bool `name:"verbose,v" usage:"verbose"` }
func OptsFromContext ¶
type Path ¶
type Path struct { *Mod SubPath string Replace *ReplaceRule }
func (*Path) ImportPath ¶
func (*Path) ImportPathDir ¶
func (*Path) RepoRootDir ¶
func (*Path) ResolvedImportPath ¶
func (*Path) SymlinkOrImport ¶
func (Path) WithReplace ¶
func (i Path) WithReplace(from string, replaceTarget modfile.ReplaceTarget) *Path
type ReplaceRule ¶
type ReplaceRule struct { From string modfile.ReplaceTarget }
type VersionFixer ¶
Click to show internal directories.
Click to hide internal directories.