Documentation ¶
Index ¶
- Constants
- func BuildConfig(optionFns ...OptionFunc) *load.Config
- func InjectContext(c context.Context, cc *Context) context.Context
- func WithOpts(ctx context.Context, fns ...OptFn) context.Context
- type Context
- func (r *Context) Build(ctx context.Context, files []string, options ...OptionFunc) *build.Instance
- func (r *Context) BuildConfig(ctx context.Context, options ...OptionFunc) *cueload.Config
- func (r *Context) Cleanup() error
- func (r *Context) CompletePath(p string) string
- func (r *Context) CueModRoot() string
- 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
- type OptFn
- type OptionFunc
- type Opts
- type Path
- func (i *Path) ImportPath() string
- func (i Path) ImportPathRoot() string
- func (i Path) ImportPathRootDir() string
- func (i *Path) ResolvedImportPath() string
- func (i Path) String() string
- func (i *Path) SymlinkOrImport(ctx context.Context, root string) error
- func (i Path) WithReplace(from string, replaceTarget modfile.ReplaceTarget) *Path
- type ReplaceRule
Constants ¶
View Source
const ModSumFilename = "cue.mod/module.sum"
Variables ¶
This section is empty.
Functions ¶
func BuildConfig ¶ added in v0.3.4
func BuildConfig(optionFns ...OptionFunc) *load.Config
func InjectContext ¶ added in v0.2.0
Types ¶
type Context ¶
type Context struct { Mod *Mod // contains filtered or unexported fields }
func ContextFor ¶
func FromContext ¶ added in v0.2.0
func (*Context) BuildConfig ¶ added in v0.3.4
func (*Context) CompletePath ¶ added in v0.3.1
func (*Context) CueModRoot ¶
type ImportFunc ¶
type OptionFunc ¶
func OptImportFunc ¶
func OptImportFunc(importFunc ImportFunc) OptionFunc
func OptOverlay ¶ added in v0.2.0
func OptOverlay(overlay map[string]load.Source) OptionFunc
func OptRoot ¶
func OptRoot(dir string) OptionFunc
type Opts ¶
func OptsFromContext ¶
type Path ¶
type Path struct { Mod SubPath string Replace *ReplaceRule }
func (*Path) ImportPath ¶
func (Path) ImportPathRoot ¶ added in v0.4.0
func (Path) ImportPathRootDir ¶ added in v0.4.0
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 }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.