Versions in this module Expand all Collapse all v0 v0.1.3 Jan 2, 2024 v0.1.2 Dec 4, 2023 v0.1.1 Dec 4, 2023 v0.1.0 Dec 3, 2023 Changes in this version + const CONFIG + const INDEX + const MaxPathDepth + const OBJECTS + const REFS + func Bind(cc context.Context) context.Context + func CloseAll(all []io.Closer, reverse bool) error + type AlgorithmManager interface + Find func(name string) (git.Algorithm, error) + FindCompression func(name string) (git.Compression, error) + FindDigest func(name string) (git.Digest, error) + FindPathMapping func(name string) (git.PathMapping, error) + type Binding interface + GetLib func() (Lib, error) + SetLib func(lib Lib) error + func GetBinding(cc context.Context) (Binding, error) + type ComponentHolder struct + Aliases []string + Classes []string + Component any + Registration ComponentRegistration + type ComponentLifecycleManager struct + func (inst *ComponentLifecycleManager) CreateItems(callback func(h *ComponentHolder) error) + func (inst *ComponentLifecycleManager) GetComponents() ComponentManager + func (inst *ComponentLifecycleManager) GetLifecycles() LifecycleManager + func (inst *ComponentLifecycleManager) Init(items []*ComponentRegistration, mode safe.Mode) *ComponentLifecycleManager + type ComponentManager interface + Add func(h *ComponentHolder) error + GetByName func(name string) (*ComponentHolder, error) + ListAll func() []*ComponentHolder + ListByClass func(className string) ([]*ComponentHolder, error) + Register func(reg *ComponentRegistration) (*ComponentHolder, error) + func NewComponentManager(mode safe.Mode) ComponentManager + type ComponentRegistration struct + Alias string + Class string + Enabled bool + Name string + OnInitForRepository func(ctx *RepositoryContext) (any, error) + OnInitForSession func(ctx *SessionContext) (any, error) + OnInitForSubmodule func(ctx *SubmoduleContext) (any, error) + OnInitForSystem func(ctx *SystemContext) (any, error) + OnInitForUser func(ctx *UserContext) (any, error) + OnInitForWorktree func(ctx *WorktreeContext) (any, error) + Priority int + type ComponentRegistry interface + ListRegistrations func() []*ComponentRegistration + type Config interface + Load func() error + Save func() error + type ConfigChain interface + Config func() Config + FindByScope func(scope ConfigScope) ConfigChain + Load func() error + Mix func() ConfigChain + Parent func() ConfigChain + Scope func() ConfigScope + type ConfigChainFactory interface + Create func(p *ConfigChainParams) ConfigChain + Root func() ConfigChain + type ConfigChainParams struct + File afs.Path + IgnoreCase bool + Parent ConfigChain + Required bool + Scope ConfigScope + type ConfigScope int + const ConfigScopeCommand + const ConfigScopeDefault + const ConfigScopeFinal + const ConfigScopeMix + const ConfigScopeRepository + const ConfigScopeSystem + const ConfigScopeUser + const ConfigScopeWorktree + type Configuration interface + Clear func() + Export func() map[string]string + GetProperty func(name string) string + Import func(src map[string]string) + SetProperty func(name, value string) + type Context struct + Closer io.Closer + ComLifeManager ComponentLifecycleManager + FS afs.FS + Path afs.Path + SafeMode safe.Mode + type Core struct + Compression git.Compression + Config ConfigChain + Context *Context + Digest git.Digest + Head HEAD + Index Index + Layout Layout + Objects Objects + PathMapping git.PathMapping + Refs Refs + Repository Repository + SessionFactory SessionFactory + Submodules Submodules + WD afs.Path + Workspace Workspace + Worktrees Worktrees + type CoreConfigurer interface + Configure func(c *Core) error + type Entity interface + OpenReader func() (io.ReadCloser, error) + type FileReaderPool interface + OpenReader func(file afs.Path, op *afs.Options) (io.ReadSeekCloser, error) + type Finder interface + Find func(pwd afs.Path) ([]afs.Path, error) + type HEAD interface + GetValue func(s Session) (git.ReferenceName, error) + type ImportPackParams struct + ID git.PackID + IdxFile afs.Path + MoveFiles bool + PackFile afs.Path + type ImportPackResult struct + ID git.PackID + Pack Pack + Params *ImportPackParams + type Index interface + type InfoFolder interface + Path func() afs.Path + type Layout interface + Config func() afs.Path + DotGit func() afs.Path + HEAD func() afs.Path + Index func() afs.Path + IsBare func() bool + IsSubmodule func() bool + IsWorktree func() bool + Objects func() afs.Path + Refs func() afs.Path + Repository func() afs.Path + WD func() afs.Path + Workspace func() afs.Path + type LayoutBuilder struct + Config afs.Path + CorePoint afs.Path + DotGit afs.Path + HEAD afs.Path + Index afs.Path + Objects afs.Path + Refs afs.Path + Repository afs.Path + SubmodulePoint afs.Path + WD afs.Path + Workspace afs.Path + WorktreePoint afs.Path + func (inst *LayoutBuilder) Create() Layout + type Lib interface + Bind func(cc context.Context) context.Context + Connectors func() pktline.ConnectorManager + FS func() afs.FS + Finder func() Finder + InstructionServiceManager func() ServiceManager + Loader func() Loader + Locator func() Locator + SystemContext func() *SystemContext + func GetLib(cc context.Context) (Lib, error) + type LibAgent interface + GetLib func() (Lib, error) + type Lifecycle struct + OnCreate application.OnCreateFunc + OnDestroy application.OnDestroyFunc + OnStart application.OnStartFunc + OnStartPost application.OnStartPostFunc + OnStartPre application.OnStartPreFunc + OnStop application.OnStopFunc + OnStopPost application.OnStopPostFunc + OnStopPre application.OnStopPreFunc + type LifecycleManager interface + AddComponent func(com any) (*Lifecycle, error) + AddLifecycle func(lc *Lifecycle) (*Lifecycle, error) + AddRegistry func(reg LifecycleRegistry) (*Lifecycle, error) + Open func() (io.Closer, error) + func NewLifecycleManager(mode safe.Mode) LifecycleManager + type LifecycleRegistry interface + Lifecycle func() *Lifecycle + type Loader interface + Load func(l Layout) (Repository, error) + LoadWithPath func(path afs.Path) (Repository, error) + type Locator interface + Locate func(pwd afs.Path) (Layout, error) + type Meta struct + Context context.Context + Name string + WD afs.Path + type Node interface + NodeType func() NodeType + Path func() afs.Path + type NodeInfo struct + Name string + Path afs.FS + Type NodeType + type NodeType string + const NodeConfig + const NodeDotGit + const NodeHEAD + const NodeIndex + const NodeObjects + const NodeWorkspace + type Object git.Object + type Objects interface + GetPack func(pid git.PackID) Pack + GetSparseObject func(oid git.ObjectID) SparseObject + Info func() InfoFolder + ListPacks func() []git.PackID + Path func() afs.Path + type Pack interface + Exists func() bool + GetDotIdx func() afs.Path + GetDotPack func() afs.Path + GetID func() git.PackID + GetObject func(oid git.ObjectID) PackObject + type PackBuilder interface + WriteObject func(o *Object, data io.Reader) (*Object, error) + type PackFile interface + ReadPackObject func(item *git.PackIndexItem) (io.ReadCloser, *git.Object, error) + type PackIndex interface + Count func() int64 + Find func(id git.ObjectID) (*git.PackIndexItem, error) + Get func(index int64) (*git.PackIndexItem, error) + List func(index, limit int64) ([]*git.PackIndexItem, error) + type PackObject interface + Container func() Pack + GetID func() git.ObjectID + type PackReadCloser interface + GetIndex func() PackIndex + GetPack func() PackFile + type Packs interface + CheckPack func(pid git.PackID, flags pack.CheckFlag) error + FindPackObject func(oid git.ObjectID) (PackObject, error) + FindPackObjectInPack func(pid git.PackID, oid git.ObjectID) (PackObject, error) + ImportPack func(p *ImportPackParams) (*ImportPackResult, error) + ListPacks func() ([]git.PackID, error) + NewPackBuilder func() PackBuilder + ReadPackObject func(o PackObject) (*git.Object, io.ReadCloser, error) + type Ref interface + Exists func() bool + GetValue func(s Session) (git.ObjectID, error) + Name func() git.ReferenceName + Path func() afs.Path + type Refs interface + GetRef func(name git.ReferenceName) Ref + List func() []git.ReferenceName + Path func() afs.Path + type Repository interface + Compression func() git.Compression + Config func() ConfigChain + Digest func() git.Digest + HEAD func() HEAD + Index func() Index + Layout func() Layout + Objects func() Objects + OpenSession func() (Session, error) + PathMapping func() git.PathMapping + Refs func() Refs + Submodules func() Submodules + Worktrees func() Worktrees + type RepositoryContext struct + Config Config + ConfigChain ConfigChain + ConfigFile afs.Path + Facade Repository + Layout Layout + Parent *UserContext + Submodules Submodules + Worktrees Worktrees + type RepositoryContextLoader interface + Load func(params *RepositoryParams) (*RepositoryContext, error) + type RepositoryParams struct + Layout Layout + Mode safe.Mode + Parent *UserContext + type Service interface + type ServiceManager interface + Find func(name string) (Service, error) + type ServiceRegistration struct + Name string + Service Service + type ServiceRegistry interface + ListRegistrations func() []*ServiceRegistration + type Session interface + GetComponent func(name string) (any, error) + GetLayout func() Layout + GetObjectContext func() *objects.Context + GetPacks func() Packs + GetReaderPool func() afs.ReaderPool + GetRepository func() Repository + GetSparseObjects func() SparseObjects + GetWD func() afs.Path + LoadBinary func(id git.ObjectID) ([]byte, *git.Object, error) + LoadCommit func(id git.ObjectID) (*git.Commit, error) + LoadHEAD func(head HEAD) (*git.HEAD, error) + LoadRef func(r Ref) (*git.Ref, error) + LoadTag func(id git.ObjectID) (*git.Tag, error) + LoadText func(id git.ObjectID) (string, *git.Object, error) + LoadTree func(id git.ObjectID) (*git.Tree, error) + NewReaderPool func(size int) afs.ReaderPool + NewTemporaryBuffer func(dir afs.Path) TemporaryBuffer + NewTemporaryFile func(dir afs.Path) afs.Path + ReadObject func(id git.ObjectID) (*git.Object, io.ReadCloser, error) + SaveHEAD func(h *git.HEAD) error + SaveRef func(r *git.Ref) error + WriteObject func(o *git.Object, data io.Reader) (*git.Object, error) + type SessionContext struct + Facade Session + Parent *RepositoryContext + type SessionContextLoader interface + Load func(params *SessionParams) (*SessionContext, error) + type SessionFactory interface + OpenSession func(repo Repository) (Session, error) + type SessionParams struct + Mode safe.Mode + Parent *RepositoryContext + type SparseObject interface + Exists func() bool + GetID func() git.ObjectID + Path func() afs.Path + type SparseObjects interface + ReadSparseObject func(o SparseObject) (*git.Object, io.ReadCloser, error) + ReadSparseObjectRaw func(o SparseObject) (io.ReadCloser, error) + WriteSparseObject func(o *git.Object, data io.Reader) (*git.Object, error) + WriteSparseObjectRaw func(o *git.Object, data io.Reader) (*git.Object, error) + type Submodule interface + Exists func() bool + IsActive func() bool + Name func() string + Path func() string + URL func() string + Workspace func() Workspace + type SubmoduleContext struct + Facade Submodule + Layout Layout + Parent *RepositoryContext + type SubmoduleContextLoader interface + Load func(params *SubmoduleParams) (*SubmoduleContext, error) + type SubmoduleParams struct + Layout Layout + Mode safe.Mode + Parent *RepositoryContext + type Submodules interface + Get func(name string) Submodule + List func() []Submodule + type SystemContext struct + AllComponents []ComponentRegistry + Config Config + ConfigChain ConfigChain + ConfigChainFactory ConfigChainFactory + ConfigFile afs.Path + Facade SystemSpace + Lib Lib + RepositoryComponents []*ComponentRegistration + RepositoryContextLoader RepositoryContextLoader + RepositoryFinder Finder + RepositoryLoader Loader + RepositoryLocator Locator + SessionComponents []*ComponentRegistration + SessionContextLoader SessionContextLoader + SubmoduleComponents []*ComponentRegistration + SubmoduleContextLoader SubmoduleContextLoader + SystemComponents []*ComponentRegistration + SystemContextLoader SystemContextLoader + UserComponents []*ComponentRegistration + UserContextLoader UserContextLoader + WorktreeComponents []*ComponentRegistration + WorktreeContextLoader WorktreeContextLoader + type SystemContextLoader interface + Load func(params *SystemParams) (*SystemContext, error) + type SystemParams struct + Mode safe.Mode + type SystemSpace interface + Lib func() Lib + type Task interface + GetMeta func() *Meta + Run func() error + type TemporaryBuffer interface + GetFlushSize func() int + GetTemporaryFile func() afs.Path + SaveToFile func(dst afs.Path) error + SetFlushSize func(size int) + type UserContext struct + Config Config + ConfigChain ConfigChain + ConfigFile afs.Path + Facade UserSpace + Home afs.Path + Parent *SystemContext + type UserContextLoader interface + Load func(params *UserParams) (*UserContext, error) + type UserParams struct + Home afs.Path + Mode safe.Mode + Parent *SystemContext + type UserSpace interface + Home func() afs.Path + SystemSpace func() SystemSpace + type Workspace interface + DotGit func() afs.Path + Path func() afs.Path + WorkingDirectory func() afs.Path + type Worktree interface + Exists func() bool + Name func() string + Workspace func() Workspace + type WorktreeContext struct + Facade Worktree + Layout Layout + Parent *RepositoryContext + type WorktreeContextLoader interface + Load func(params *WorktreeParams) (*WorktreeContext, error) + type WorktreeParams struct + Layout Layout + Mode safe.Mode + Parent *RepositoryContext + type Worktrees interface + Get func(name string) Worktree + List func() []Worktree