Documentation ¶
Index ¶
- Constants
- Variables
- func CopyWithCallback(writer io.Writer, reader io.Reader, totalSize int64, cb CopyCallback) (int64, error)
- func DoHTTP(c *Configuration, req *http.Request) (*http.Response, error)
- func EncodePointer(writer io.Writer, pointer *Pointer) (int, error)
- func Environ() []string
- func InRepo() bool
- func InstallFilters() error
- func InstallHooks(force bool) error
- func LocalMediaPath(sha string) (string, error)
- func NewUploadable(oid, filename string, index, totalFiles int) (*Uploadable, *WrappedError)
- func ObjectUrl(endpoint Endpoint, oid string) (*url.URL, error)
- func PointerClean(reader io.Reader, size int64, cb CopyCallback) (*cleanedAsset, error)
- func PointerSmudge(writer io.Writer, ptr *Pointer, workingfile string, cb CopyCallback) error
- func ResetTempDir() error
- func ScanIndex() ([]*wrappedPointer, error)
- func ScanRefs(refLeft, refRight string) ([]*wrappedPointer, error)
- func Stack() []byte
- func TempFile(prefix string) (*os.File, error)
- type AltConfig
- type CallbackReader
- type CleanedPointerError
- type ClientError
- type Configuration
- func (c *Configuration) ConcurrentUploads() int
- func (c *Configuration) Endpoint() Endpoint
- func (c *Configuration) GitConfig(key string) (string, bool)
- func (c *Configuration) HttpClient() *http.Client
- func (c *Configuration) ObjectUrl(oid string) (*url.URL, error)
- func (c *Configuration) RemoteEndpoint(remote string) Endpoint
- func (c *Configuration) Remotes() []string
- func (c *Configuration) SetConfig(key, value string)
- type CopyCallback
- type CredentialCmd
- type Creds
- type Endpoint
- type HookExists
- type Pointer
- type SmudgeError
- type UploadQueue
- type Uploadable
- type WrappedError
- func (e *WrappedError) Context() map[string]string
- func (e *WrappedError) Del(key string)
- func (e *WrappedError) Error() string
- func (e *WrappedError) Errorf(format string, args ...interface{})
- func (e *WrappedError) Get(key string) string
- func (e *WrappedError) InnerError() string
- func (e *WrappedError) Set(key, value string)
- func (e *WrappedError) Stack() []byte
Constants ¶
View Source
const Version = "0.5.1"
Variables ¶
View Source
var ( LargeSizeThreshold = 5 * 1024 * 1024 TempDir = filepath.Join(os.TempDir(), "git-lfs") UserAgent string LocalWorkingDir string LocalGitDir string LocalMediaDir string LocalLogDir string )
View Source
var (
Config = NewConfig()
)
View Source
var (
NotInARepositoryError = errors.New("Not in a repository")
)
Functions ¶
func CopyWithCallback ¶
func EncodePointer ¶ added in v0.5.1
func InstallFilters ¶
func InstallFilters() error
func InstallHooks ¶
func LocalMediaPath ¶
func NewUploadable ¶ added in v0.5.1
func NewUploadable(oid, filename string, index, totalFiles int) (*Uploadable, *WrappedError)
NewUploadable builds the Uploadable from the given information.
func PointerClean ¶ added in v0.5.1
func PointerClean(reader io.Reader, size int64, cb CopyCallback) (*cleanedAsset, error)
func PointerSmudge ¶ added in v0.5.1
func ResetTempDir ¶
func ResetTempDir() error
func ScanIndex ¶ added in v0.5.1
func ScanIndex() ([]*wrappedPointer, error)
ScanIndex returns a slice of wrappedPointer objects for all Git LFS pointers it finds in the index.
Types ¶
type CallbackReader ¶
type CallbackReader struct { C CopyCallback TotalSize int64 ReadSize int64 io.Reader }
type CleanedPointerError ¶ added in v0.5.1
type CleanedPointerError struct {
Bytes []byte
}
func (*CleanedPointerError) Error ¶ added in v0.5.1
func (e *CleanedPointerError) Error() string
type ClientError ¶
type ClientError struct { Message string `json:"message"` DocumentationUrl string `json:"documentation_url,omitempty"` RequestId string `json:"request_id,omitempty"` }
func (*ClientError) Error ¶
func (e *ClientError) Error() string
type Configuration ¶
type Configuration struct { CurrentRemote string // contains filtered or unexported fields }
func NewConfig ¶
func NewConfig() *Configuration
func (*Configuration) ConcurrentUploads ¶ added in v0.5.1
func (c *Configuration) ConcurrentUploads() int
func (*Configuration) Endpoint ¶
func (c *Configuration) Endpoint() Endpoint
func (*Configuration) HttpClient ¶
func (c *Configuration) HttpClient() *http.Client
func (*Configuration) RemoteEndpoint ¶
func (c *Configuration) RemoteEndpoint(remote string) Endpoint
func (*Configuration) Remotes ¶
func (c *Configuration) Remotes() []string
func (*Configuration) SetConfig ¶
func (c *Configuration) SetConfig(key, value string)
type CopyCallback ¶
func CopyCallbackFile ¶
type CredentialCmd ¶
func NewCommand ¶
func NewCommand(input Creds, subCommand string) *CredentialCmd
func (*CredentialCmd) Credentials ¶
func (c *CredentialCmd) Credentials() Creds
func (*CredentialCmd) StdoutString ¶
func (c *CredentialCmd) StdoutString() string
type HookExists ¶
func (*HookExists) Error ¶
func (e *HookExists) Error() string
type Pointer ¶ added in v0.5.1
func NewPointer ¶ added in v0.5.1
type SmudgeError ¶ added in v0.5.1
type SmudgeError struct { Oid string Filename string *WrappedError }
type UploadQueue ¶ added in v0.5.1
type UploadQueue struct {
// contains filtered or unexported fields
}
UploadQueue provides a queue that will allow concurrent uploads.
func NewUploadQueue ¶ added in v0.5.1
func NewUploadQueue(workers, files int) *UploadQueue
NewUploadQueue builds an UploadQueue, allowing `workers` concurrent uploads.
func (*UploadQueue) Add ¶ added in v0.5.1
func (q *UploadQueue) Add(u *Uploadable)
Add adds an Uploadable to the upload queue.
func (*UploadQueue) Errors ¶ added in v0.5.1
func (q *UploadQueue) Errors() []*WrappedError
Errors returns any errors encountered during uploading.
func (*UploadQueue) Process ¶ added in v0.5.1
func (q *UploadQueue) Process()
Process starts the upload queue and displays a progress bar.
type Uploadable ¶ added in v0.5.1
type Uploadable struct { OIDPath string Filename string CB CopyCallback Size int64 }
Uploadable describes a file that can be uploaded.
type WrappedError ¶
type WrappedError struct { Err error Message string Panic bool // contains filtered or unexported fields }
func Download ¶
func Download(oid string) (io.ReadCloser, int64, *WrappedError)
func Error ¶
func Error(err error) *WrappedError
func Errorf ¶
func Errorf(err error, format string, args ...interface{}) *WrappedError
func Upload ¶
func Upload(oidPath, filename string, cb CopyCallback) *WrappedError
func (*WrappedError) Context ¶
func (e *WrappedError) Context() map[string]string
func (*WrappedError) Del ¶
func (e *WrappedError) Del(key string)
func (*WrappedError) Error ¶
func (e *WrappedError) Error() string
func (*WrappedError) Errorf ¶
func (e *WrappedError) Errorf(format string, args ...interface{})
func (*WrappedError) Get ¶
func (e *WrappedError) Get(key string) string
func (*WrappedError) InnerError ¶
func (e *WrappedError) InnerError() string
func (*WrappedError) Set ¶
func (e *WrappedError) Set(key, value string)
func (*WrappedError) Stack ¶
func (e *WrappedError) Stack() []byte
Click to show internal directories.
Click to hide internal directories.