projectcontext

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotRegistered = errors.New("project is not registered with devvault")

ErrNotRegistered is the sentinel behind NotRegisteredError, so callers can branch on the condition with errors.Is instead of matching on the message.

Functions

func RequireRegistered added in v0.2.0

func RequireRegistered(ctx Context) error

RequireRegistered is the gate in front of everything that runs inside the container. Read-only commands must not use it; they report the missing credential mount instead of refusing (see the doc comment of applyTrustedCredentials).

Types

type Context

type Context struct {
	Path      string
	ID        string
	FromLocal bool
	// Registered reports whether this directory has an entry in the user-owned
	// registry. Registration is the only moment the *user* states which
	// customer and credential set a directory belongs to, so it is the
	// precondition for devvault choosing any credentials for it. It is set by
	// LoadTrustedConfig, not by Resolve: Resolve only locates the directory.
	Registered bool
}

func LoadTrustedConfig

func LoadTrustedConfig(projectKey string) (Context, config.Config, error)

func Resolve

func Resolve(projectKey string) (Context, error)

type NotRegisteredError added in v0.2.0

type NotRegisteredError struct{}

NotRegisteredError explains why devvault refuses to run something for a directory the user never registered, and names the one command that fixes it.

func (*NotRegisteredError) Error added in v0.2.0

func (e *NotRegisteredError) Error() string

func (*NotRegisteredError) Unwrap added in v0.2.0

func (e *NotRegisteredError) Unwrap() error

Jump to

Keyboard shortcuts

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