Documentation
¶
Overview ¶
Package `shadows`: FSO shadow repos.
Index ¶
- Variables
- func ScanZero(data []byte, atEOF bool) (advance int, token []byte, err error)
- type Config
- type Filesystem
- func (fs *Filesystem) Archive(shadowPath string, author User) error
- func (fs *Filesystem) Content(ctx context.Context, shadowPath, contentPath string) (*pb.ContentO, error)
- func (fs *Filesystem) GetTarttconfig(ctx context.Context, shadowPath string, gitCommit []byte) ([]byte, error)
- func (fs *Filesystem) GitGc(ctx context.Context, shadowPath string) error
- func (fs *Filesystem) Head(ctx context.Context, shadowPath string) (*pb.HeadO, error)
- func (fs *Filesystem) Init(hostPath string, author User, repoId uuid.I, opts InitOptions) (*ShadowInfo, error)
- func (fs *Filesystem) ListMetaTree(ctx context.Context, shadowPath string, gitCommit []byte, ...) error
- func (fs *Filesystem) ListStatTree(ctx context.Context, shadowPath string, gitCommit []byte, prefix string, ...) error
- func (fs *Filesystem) ListTars(ctx context.Context, shadowPath string, gitCommit []byte, ...) error
- func (fs *Filesystem) Meta(ctx context.Context, shadowPath string) (*pb.MetaO, error)
- func (fs *Filesystem) Push(shadowPath string, remote string) error
- func (fs *Filesystem) PutPathMetadata(ctx context.Context, shadowPath string, i *pb.PutPathMetadataI) (*pb.PutPathMetadataO, error)
- func (fs *Filesystem) Ref(shadowPath, ref string) (Oid, error)
- func (fs *Filesystem) RefreshContent(shadowPath string, author User) error
- func (fs *Filesystem) ReinitSubdirTracking(shadowPath string, author User, subdirTracking SubdirTracking) error
- func (fs *Filesystem) Sha(shadowPath string, author User) error
- func (fs *Filesystem) ShadowPath(hostPath string, repoId uuid.I) string
- func (fs *Filesystem) Stat(shadowPath string, author User, opts StatOptions) error
- func (fs *Filesystem) StatStatus(ctx context.Context, shadowPath string, callback StatStatusFunc) error
- func (fs *Filesystem) Summary(ctx context.Context, shadowPath string) (*pb.SummaryO, error)
- func (fs *Filesystem) TarttHead(ctx context.Context, shadowPath string) (*pb.TarttHeadO, error)
- func (fs *Filesystem) TarttIsFrozenArchive(ctx context.Context, shadowPath string) (*TarttIsFrozenArchiveInfo, error)
- type InitOptions
- type ListMetaTreeFunc
- type ListStatTreeFunc
- type ListTarsFunc
- type Logger
- type Oid
- type ShadowInfo
- type StatOptions
- type StatStatusFunc
- type SubdirTracking
- type TarttIsFrozenArchiveInfo
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidGitFsoStatusOutput = errors.New(
"invalid git-fso status output",
)
View Source
var ErrMalformedManifest = errors.New("malformed manifest")
View Source
var ErrMalformedTspath = errors.New("malformed tspath")
View Source
var ErrMissingNogtree = errors.New("missing `.nogtree`")
Functions ¶
Types ¶
type Filesystem ¶
type Filesystem struct {
// contains filtered or unexported fields
}
func (*Filesystem) GetTarttconfig ¶
func (*Filesystem) GitGc ¶
func (fs *Filesystem) GitGc(ctx context.Context, shadowPath string) error
func (*Filesystem) Init ¶
func (fs *Filesystem) Init( hostPath string, author User, repoId uuid.I, opts InitOptions, ) (*ShadowInfo, error)
func (*Filesystem) ListMetaTree ¶
func (fs *Filesystem) ListMetaTree( ctx context.Context, shadowPath string, gitCommit []byte, callback ListMetaTreeFunc, ) error
func (*Filesystem) ListStatTree ¶
func (fs *Filesystem) ListStatTree( ctx context.Context, shadowPath string, gitCommit []byte, prefix string, callback ListStatTreeFunc, ) error
func (*Filesystem) ListTars ¶
func (fs *Filesystem) ListTars( ctx context.Context, shadowPath string, gitCommit []byte, callback ListTarsFunc, ) error
func (*Filesystem) PutPathMetadata ¶
func (fs *Filesystem) PutPathMetadata( ctx context.Context, shadowPath string, i *pb.PutPathMetadataI, ) (*pb.PutPathMetadataO, error)
func (*Filesystem) RefreshContent ¶
func (fs *Filesystem) RefreshContent(shadowPath string, author User) error
func (*Filesystem) ReinitSubdirTracking ¶
func (fs *Filesystem) ReinitSubdirTracking( shadowPath string, author User, subdirTracking SubdirTracking, ) error
func (*Filesystem) ShadowPath ¶
func (fs *Filesystem) ShadowPath(hostPath string, repoId uuid.I) string
See NOE-18 for details. Mangle UUID into shadow path to allow nested repos, like:
``` real/foo/ real/foo/bar/
shadow/foo/<uuid>.fso/ shadow/foo/bar/<uuid>.fso/ ```
func (*Filesystem) Stat ¶
func (fs *Filesystem) Stat( shadowPath string, author User, opts StatOptions, ) error
func (*Filesystem) StatStatus ¶
func (fs *Filesystem) StatStatus( ctx context.Context, shadowPath string, callback StatStatusFunc, ) error
func (*Filesystem) TarttHead ¶
func (fs *Filesystem) TarttHead( ctx context.Context, shadowPath string, ) (*pb.TarttHeadO, error)
func (*Filesystem) TarttIsFrozenArchive ¶
func (fs *Filesystem) TarttIsFrozenArchive( ctx context.Context, shadowPath string, ) (*TarttIsFrozenArchiveInfo, error)
type InitOptions ¶
type InitOptions struct {
SubdirTracking SubdirTracking
}
type ListMetaTreeFunc ¶
type ListMetaTreeFunc func(info pb.PathMetadata) error
type ListStatTreeFunc ¶
type ListTarsFunc ¶
type ShadowInfo ¶
type ShadowInfo struct {
ShadowPath string
}
type StatOptions ¶
type StatOptions struct {
MtimeRangeOnly bool
}
type StatStatusFunc ¶
type StatStatusFunc func(ps pb.PathStatus) error
type SubdirTracking ¶
type SubdirTracking int
const ( SubdirTrackingUnspecified SubdirTracking = iota EnterSubdirs BundleSubdirs IgnoreSubdirs IgnoreMost )
Click to show internal directories.
Click to hide internal directories.