Documentation ¶
Index ¶
- Constants
- func GLFSExport(ctx context.Context, op *glfs.Operator, sem *semaphore.Weighted, ...) error
- func GLFSImport(ctx context.Context, op *glfs.Operator, sem *semaphore.Weighted, ...) (*glfs.Ref, error)
- func Hash(x []byte) cadata.ID
- func Init(ctx context.Context, p string) error
- func MakeSource(u sources.URL) (sources.Source, error)
- type Asset
- type Commit
- type DeploySpec
- type Label
- type LabelSet
- type Manifest
- type Repo
- func (r *Repo) CreateAsset(ctx context.Context) (uint64, error)
- func (r *Repo) CreateAssetFS(ctx context.Context, fsx posixfs.FS, p string) (uint64, error)
- func (r *Repo) Deploy(ctx context.Context, id SnapshotID) (*Commit, error)
- func (r *Repo) DeploymentDir() posixfs.FS
- func (r *Repo) Fetch(ctx context.Context, srcURL sources.URL) error
- func (r *Repo) FetchAll(ctx context.Context) error
- func (r *Repo) GetAsset(ctx context.Context, aid uint64) (Asset, error)
- func (r *Repo) GetCommit(ctx context.Context, commitID uint64) (*Commit, error)
- func (r *Repo) GetCurrent(ctx context.Context) (*Commit, error)
- func (r *Repo) GetLabels(ctx context.Context, aid uint64) ([]Label, error)
- func (r *Repo) GetSnapshot(ctx context.Context, id SnapshotID) (*Snapshot, error)
- func (r *Repo) Import(ctx context.Context, aid uint64, fsx posixfs.FS, p string) error
- func (r *Repo) ListAssets(ctx context.Context, span state.Span[uint64], limit int) ([]uint64, error)
- func (r *Repo) ListAssetsBySource(ctx context.Context, srcURL *sources.URL, code *gojq.Code) ([]Asset, error)
- func (r *Repo) ListAssetsFull(ctx context.Context, span state.Span[uint64], limit int) ([]Asset, error)
- func (r *Repo) ListCommits(ctx context.Context) ([]Commit, error)
- func (r *Repo) ListSnapshots(ctx context.Context) ([]SnapshotID, error)
- func (r *Repo) ListSnapshotsFull(ctx context.Context) ([]Snapshot, error)
- func (r *Repo) Modfiy(ctx context.Context, fn func(tlds map[string]glfs.Ref) error) (*Commit, error)
- func (r *Repo) ModifySnapshot(ctx context.Context, id SnapshotID, fn func(tlds map[string]glfs.Ref) error) (*SnapshotID, error)
- func (r *Repo) PostSnapshot(ctx context.Context, tlds map[string]glfs.Ref) (*SnapshotID, error)
- func (r *Repo) Pull(ctx context.Context, u sources.URL, idstr string) (uint64, error)
- func (r *Repo) PutLabels(ctx context.Context, aid uint64, labels []Label) error
- type Snapshot
- type SnapshotID
- type UpstreamURL
- type WebRefStore
Constants ¶
View Source
const MaxBlobSize = 1 << 21
Variables ¶
This section is empty.
Functions ¶
func GLFSExport ¶
func GLFSExport(ctx context.Context, op *glfs.Operator, sem *semaphore.Weighted, s cadata.Getter, root glfs.Ref, fsx posixfs.FS, p string) error
GLFSExport exports a glfs object beneath p in the filesystem fsx.
func GLFSImport ¶
func GLFSImport(ctx context.Context, op *glfs.Operator, sem *semaphore.Weighted, s cadata.Poster, fsx posixfs.FS, p string) (*glfs.Ref, error)
GLFSImport goes from a POSIX filesystem to GLFS
Types ¶
type Asset ¶
type Asset struct { ID uint64 `json:"id"` Labels LabelSet `json:"labels"` Root glfs.Ref `json:"root"` Upstream *UpstreamURL `json:"upstream"` }
type Commit ¶
type Commit struct { ID uint64 `json:"id"` Snapshot SnapshotID `json:"snapshot"` CreatedAt time.Time `json:"created_at"` }
type DeploySpec ¶
type Manifest ¶
type Manifest map[string]DeploySpec
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) CreateAsset ¶
CreateAsset creates an empty Asset.
func (*Repo) CreateAssetFS ¶
CreateAssetFS creates an Asset with data from the filesystem.
func (*Repo) DeploymentDir ¶
DeploymentDir is the directory in the filesystem used for deployments
func (*Repo) GetSnapshot ¶
func (*Repo) ListAssets ¶
func (*Repo) ListAssetsBySource ¶
func (r *Repo) ListAssetsBySource(ctx context.Context, srcURL *sources.URL, code *gojq.Code) ([]Asset, error)
Search searches locally cached remote assets for a source. To search assets originating locally pass nil for srcURL
func (*Repo) ListAssetsFull ¶
func (*Repo) ListSnapshots ¶
func (r *Repo) ListSnapshots(ctx context.Context) ([]SnapshotID, error)
func (*Repo) ListSnapshotsFull ¶
func (*Repo) ModifySnapshot ¶
func (r *Repo) ModifySnapshot(ctx context.Context, id SnapshotID, fn func(tlds map[string]glfs.Ref) error) (*SnapshotID, error)
func (*Repo) PostSnapshot ¶
type Snapshot ¶
type Snapshot struct { ID SnapshotID `json:"id"` TLDs map[string]glfs.Ref `json:"tlds"` }
type SnapshotID ¶
type UpstreamURL ¶
UpstreamURL uniquely identifies a remote asset
func (UpstreamURL) String ¶
func (u UpstreamURL) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.