archiver

package
v1.15.9 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveRepository

func ArchiveRepository(request *ArchiveRequest) (*models.RepoArchiver, error)

ArchiveRepository satisfies the ArchiveRequest being passed in. Processing will occur in a separate goroutine, as this phase may take a while to complete. If the archive already exists, ArchiveRepository will not do anything. In all cases, the caller should be examining the *ArchiveRequest being returned for completion, as it may be different than the one they passed in.

func Init added in v1.15.0

func Init() error

Init initlize archive

func StartArchive added in v1.15.0

func StartArchive(request *ArchiveRequest) error

StartArchive push the archive request to the queue

Types

type ArchiveRequest

type ArchiveRequest struct {
	RepoID int64

	Type     git.ArchiveType
	CommitID string
	// contains filtered or unexported fields
}

ArchiveRequest defines the parameters of an archive request, which notably includes the specific repository being archived as well as the commit, the name by which it was requested, and the kind of archive being requested. This is entirely opaque to external entities, though, and mostly used as a handle elsewhere.

func NewRequest added in v1.15.0

func NewRequest(repoID int64, repo *git.Repository, uri string) (*ArchiveRequest, error)

NewRequest creates an archival request, based on the URI. The resulting ArchiveRequest is suitable for being passed to ArchiveRepository() if it's determined that the request still needs to be satisfied.

func (*ArchiveRequest) GetArchiveName

func (aReq *ArchiveRequest) GetArchiveName() string

GetArchiveName returns the name of the caller, based on the ref used by the caller to create this request.

type ErrUnknownArchiveFormat added in v1.15.7

type ErrUnknownArchiveFormat struct {
	RequestFormat string
}

ErrUnknownArchiveFormat request archive format is not supported

func (ErrUnknownArchiveFormat) Error added in v1.15.7

func (err ErrUnknownArchiveFormat) Error() string

Error implements error

func (ErrUnknownArchiveFormat) Is added in v1.15.7

Is implements error

Jump to

Keyboard shortcuts

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