github.com/stffabi/git-lfs@v2.3.5-0.20180214015214-8eeaa8d88902+incompatible/git/odb/storer.go (about) 1 package odb 2 3 import "io" 4 5 // storer implements a storage engine for reading, writing, and creating 6 // io.ReadWriters that can store information about loose objects 7 type storer interface { 8 // Open returns a handle on an existing object keyed by the given SHA. 9 // It returns an error if that file does not already exist. 10 Open(sha []byte) (f io.ReadWriteCloser, err error) 11 12 // Store copies the data given in "r" to the unique object path given by 13 // "sha". It returns an error if that file already exists (acting as if 14 // the `os.O_EXCL` mode is given in a bitmask to os.Open). 15 Store(sha []byte, r io.Reader) (n int64, err error) 16 }