1package git 2 3import ( 4 "io" 5 "time" 6) 7 8type File struct { 9 Path string 10 Blob func() (io.ReadCloser, error) 11 Oid string 12 SkipTooLarge bool 13} 14 15type Signature struct { 16 Name string 17 Email string 18 When time.Time 19} 20 21type Commit struct { 22 Author Signature 23 Committer Signature 24 Message string 25 Hash string 26} 27 28type Repository interface { 29 EachFileChange(put PutFunc, del DelFunc) error 30 EachCommit(f CommitFunc) error 31 GetLimitFileSize() int64 32} 33 34type PutFunc func(file *File, fromCommit, toCommit string) error 35type DelFunc func(path string) error 36type CommitFunc func(commit *Commit) error 37