env_workspace

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make

func Make(
	envLocal env_local.Env,
	config Config,
	deletedPrinter interfaces.FuncIter[*fd.FD],
	envRepo env_repo.Env,
) (outputEnv *env, err error)

Types

type Env

type Env interface {
	mad_env_dir.Env
	GetWorkspaceDir() string
	AssertNotTemporary(errors.Context)
	AssertNotTemporaryOrOfferToCreate(errors.Context)
	IsTemporary() bool
	GetWorkspaceConfigTyped() workspace_config_blobs.TypedConfig
	GetWorkspaceConfig() workspace_config_blobs.Config
	GetWorkspaceConfigFilePath() string
	GetDefaults() repo_configs.Defaults
	CreateWorkspace(workspace_config_blobs.Config) (err error)
	GetParentPath() string
	GetSyncBaseline() (tai string, digest string)
	UpdateSyncBaseline(inventoryListStore sku.InventoryListStore) error
	GetStore() *Store

	// TODO identify users of this and reduce / isolate them
	GetStoreFS() *store_fs.Store

	SetWorkspaceTypes(map[string]*Store) (err error)
	SetSupplies(store_workspace.Supplies) (err error)

	Flush() (err error)
}

type ErrNotInWorkspace

type ErrNotInWorkspace struct {
	// contains filtered or unexported fields
}

func (ErrNotInWorkspace) AssertNotTemporary

func (env ErrNotInWorkspace) AssertNotTemporary(context errors.Context)

func (ErrNotInWorkspace) AssertNotTemporaryOrOfferToCreate

func (env ErrNotInWorkspace) AssertNotTemporaryOrOfferToCreate(context errors.Context)

func (ErrNotInWorkspace) CreateWorkspace

func (env ErrNotInWorkspace) CreateWorkspace(
	blob workspace_config_blobs.Config,
) (err error)

func (ErrNotInWorkspace) Error

func (err ErrNotInWorkspace) Error() string

func (ErrNotInWorkspace) Flush

func (env ErrNotInWorkspace) Flush() (err error)

func (ErrNotInWorkspace) GetDefaults

func (env ErrNotInWorkspace) GetDefaults() repo_configs.Defaults

func (ErrNotInWorkspace) GetErrorType

func (err ErrNotInWorkspace) GetErrorType() pkgErrDisamb

func (ErrNotInWorkspace) GetParentPath

func (env ErrNotInWorkspace) GetParentPath() string

func (ErrNotInWorkspace) GetStore

func (env ErrNotInWorkspace) GetStore() *Store

func (ErrNotInWorkspace) GetStoreFS

func (env ErrNotInWorkspace) GetStoreFS() *store_fs.Store

func (ErrNotInWorkspace) GetSyncBaseline

func (env ErrNotInWorkspace) GetSyncBaseline() (tai string, digest string)

func (ErrNotInWorkspace) GetWorkspaceConfig

func (env ErrNotInWorkspace) GetWorkspaceConfig() workspace_config_blobs.Config

func (ErrNotInWorkspace) GetWorkspaceConfigFilePath

func (env ErrNotInWorkspace) GetWorkspaceConfigFilePath() string

func (ErrNotInWorkspace) GetWorkspaceConfigTyped

func (env ErrNotInWorkspace) GetWorkspaceConfigTyped() workspace_config_blobs.TypedConfig

func (ErrNotInWorkspace) GetWorkspaceDir

func (env ErrNotInWorkspace) GetWorkspaceDir() string

func (ErrNotInWorkspace) Is

func (err ErrNotInWorkspace) Is(target error) bool

func (ErrNotInWorkspace) IsTemporary

func (env ErrNotInWorkspace) IsTemporary() bool

func (ErrNotInWorkspace) Recover

func (ErrNotInWorkspace) SetSupplies

func (env ErrNotInWorkspace) SetSupplies(supplies store_workspace.Supplies) (err error)

func (ErrNotInWorkspace) SetWorkspaceTypes

func (env ErrNotInWorkspace) SetWorkspaceTypes(
	stores map[string]*Store,
) (err error)

TODO persist store types and bootstrap based on workspace config

func (ErrNotInWorkspace) ShouldShowStackTrace

func (err ErrNotInWorkspace) ShouldShowStackTrace() bool

func (ErrNotInWorkspace) UpdateSyncBaseline

func (env ErrNotInWorkspace) UpdateSyncBaseline(
	inventoryListStore sku.InventoryListStore,
) (err error)

type ErrUnsupportedOperation

type ErrUnsupportedOperation struct {
	// contains filtered or unexported fields
}

func (ErrUnsupportedOperation) Error

func (e ErrUnsupportedOperation) Error() string

func (ErrUnsupportedOperation) GetErrorType

func (e ErrUnsupportedOperation) GetErrorType() pkgErrDisamb

func (ErrUnsupportedOperation) Is

func (e ErrUnsupportedOperation) Is(target error) bool

type ErrUnsupportedType

type ErrUnsupportedType struct {
	Type ids.Type
}

func (ErrUnsupportedType) Error

func (err ErrUnsupportedType) Error() string

func (ErrUnsupportedType) GetErrorType

func (err ErrUnsupportedType) GetErrorType() pkgErrDisamb

func (ErrUnsupportedType) Is

func (err ErrUnsupportedType) Is(target error) bool

type Store

type Store struct {
	store_workspace.Supplies
	store_workspace.StoreLike
	// contains filtered or unexported fields
}

func (*Store) CheckoutOne

func (store *Store) CheckoutOne(
	options checkout_options.Options,
	transactedGetter sku.TransactedGetter,
) (checkedOut sku.SkuType, err error)

func (*Store) DeleteCheckedOut

func (store *Store) DeleteCheckedOut(el *sku.CheckedOut) (err error)

func (*Store) Flush

func (store *Store) Flush() (err error)

func (*Store) GetObjectIdsForString

func (store *Store) GetObjectIdsForString(
	idString string,
) (ids []sku.ExternalObjectId, err error)

func (*Store) Initialize

func (store *Store) Initialize() (err error)

func (*Store) Merge

func (store *Store) Merge(
	conflicted sku.Conflicted,
) (err error)

func (*Store) MergeCheckedOut

func (store *Store) MergeCheckedOut(
	co *sku.CheckedOut,
	parentNegotiator sku.ParentNegotiator,
	allowMergeConflicts bool,
) (commitOptions sku.CommitOptions, err error)

func (*Store) Open

func (store *Store) Open(
	m checkout_mode.Mode,
	ph interfaces.FuncIter[string],
	zsc sku.SkuTypeSet,
) (err error)

func (*Store) QueryCheckedOut

func (store *Store) QueryCheckedOut(
	qg *queries.Query,
	f interfaces.FuncIter[sku.SkuType],
) (err error)

func (*Store) ReadAllExternalItems

func (store *Store) ReadAllExternalItems() (err error)

func (*Store) ReadCheckedOutFromTransacted

func (store *Store) ReadCheckedOutFromTransacted(
	object *sku.Transacted,
) (checkedOut *sku.CheckedOut, err error)

func (*Store) ReadExternalLikeFromObjectIdLike

func (store *Store) ReadExternalLikeFromObjectIdLike(
	commitObjects sku.CommitOptions,
	id interfaces.Stringer,
	objectInput *sku.Transacted,
) (objectOutput sku.ExternalLike, err error)

func (*Store) ReadTransactedFromObjectId

func (store *Store) ReadTransactedFromObjectId(
	o sku.CommitOptions,
	k1 ids.Id,
	t *sku.Transacted,
) (e sku.ExternalLike, err error)

func (*Store) SaveBlob

func (store *Store) SaveBlob(el sku.ExternalLike) (err error)

func (*Store) UpdateCheckoutFromCheckedOut

func (store *Store) UpdateCheckoutFromCheckedOut(
	options checkout_options.OptionsWithoutMode,
	col sku.SkuType,
) (err error)

func (*Store) UpdateTransacted

func (store *Store) UpdateTransacted(z *sku.Transacted) (err error)

Takes a given sku.Transacted (internal) and updates it with the state of its checked out counterpart (external).

func (*Store) UpdateTransactedFromBlobs

func (store *Store) UpdateTransactedFromBlobs(z sku.ExternalLike) (err error)

Jump to

Keyboard shortcuts

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