Documentation
¶
Overview ¶
Package git implements tools for transferring git repositories to/from OCI compliant registiries.
Index ¶
- type FromOCI
- func (f *FromOCI) Cleanup() error
- func (s *FromOCI) FetchBaseManifestConfig(ctx context.Context) error
- func (s *FromOCI) FetchLFSManifestConfig(ctx context.Context, root ocispec.Descriptor, clean bool) (ocispec.Descriptor, error)
- func (f *FromOCI) GetHeadRefs() (map[string]oci.ReferenceInfo, error)
- func (f *FromOCI) GetTagRefs() (map[string]oci.ReferenceInfo, error)
- func (f *FromOCI) RefList() ([]string, error)
- func (f *FromOCI) Run(ctx context.Context) ([]string, error)
- type SyncOptions
- type ToOCI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FromOCI ¶
type FromOCI struct {
// contains filtered or unexported fields
}
FromOCI represents an OCI to git sync action.
func NewFromOCI ¶
func NewFromOCI(ctx context.Context, target oras.GraphTarget, desc ocispec.Descriptor, dstGitRemote string, syncOpts SyncOptions, cmdOpts *cmd.Options) (*FromOCI, error)
NewFromOCI returns a FromOCI object after validating git and/or git-lfs compatibility. Unlike NewToOCI, the base manifest descriptor is not optional.
func (*FromOCI) FetchBaseManifestConfig ¶
FetchBaseManifestConfig fetches the base sync manifest and config, populating the Original with the results or initializing it with empty fields.
func (*FromOCI) FetchLFSManifestConfig ¶
func (s *FromOCI) FetchLFSManifestConfig(ctx context.Context, root ocispec.Descriptor, clean bool) (ocispec.Descriptor, error)
FetchLFSManifestConfig copies all predecessor manifests with the LFS manifest media type, returning a pointer to an OCI CAS storage containing the result of the copy.
func (*FromOCI) GetHeadRefs ¶
func (f *FromOCI) GetHeadRefs() (map[string]oci.ReferenceInfo, error)
GetHeadRefs returns the ReferenceInfo for heads from the commit manifest's config.
func (*FromOCI) GetTagRefs ¶
func (f *FromOCI) GetTagRefs() (map[string]oci.ReferenceInfo, error)
GetTagRefs returns the ReferenceInfo for tags from the commit manifest's config.
type SyncOptions ¶
type SyncOptions struct {
Clean bool
UserAgent string
IntermediateDir string
IntermediateStore *file.Store // TODO: This is a duplicate of what's in OCIHelper, let's remove OCIHelper
Cache cache.ObjectCacher
}
SyncOptions modify git to OCI and OCI to git processes.
type ToOCI ¶
type ToOCI struct {
// contains filtered or unexported fields
}
ToOCI represents a git to OCI sync action.
func NewToOCI ¶
func NewToOCI(ctx context.Context, target oras.GraphTarget, desc ocispec.Descriptor, srcGitRemote string, argRevList []string, syncOpts SyncOptions, cmdOpts *cmd.Options) (*ToOCI, error)
NewToOCI returns a ToOCI object after validating git and/or git-lfs compatibility. An existing base manifest descriptor is optional.
func (*ToOCI) FetchBaseManifestConfig ¶
FetchBaseManifestConfig fetches the base sync manifest and config, populating the Original with the results or initializing it with empty fields.
func (*ToOCI) FetchLFSManifestConfig ¶
func (s *ToOCI) FetchLFSManifestConfig(ctx context.Context, root ocispec.Descriptor, clean bool) (ocispec.Descriptor, error)
FetchLFSManifestConfig copies all predecessor manifests with the LFS manifest media type, returning a pointer to an OCI CAS storage containing the result of the copy.
func (*ToOCI) Run ¶
Run leverages git bundles to store a git repository in an OCI registry. The bundle is appended to the manifest identified by a tag in the target repository if a bundle is necessary.
Not all calls to ToOCI result in a new bundle. Sometimes we only need to update the references, which is done in the manifest config.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cache facilitates caching git and git-lfs objects.
|
Package cache facilitates caching git and git-lfs objects. |
|
Package cmd facilitates execution of git and git-lfs commands.
|
Package cmd facilitates execution of git and git-lfs commands. |
|
Package oci facilitates transferring of git and git-lfs OCI artifacts.
|
Package oci facilitates transferring of git and git-lfs OCI artifacts. |