ref: e7ce17381f525328073577d60583447fc9412c18
dir: /receivepack/service/options.go/
package service
import (
"io"
"io/fs"
"os"
"codeberg.org/lindenii/furgit/objectid"
"codeberg.org/lindenii/furgit/objectstore"
"codeberg.org/lindenii/furgit/refstore"
)
type PromotedObjectPermissions struct {
DirMode fs.FileMode
FileMode fs.FileMode
}
// Options configures one protocol-independent receive-pack service.
//
// Service borrows all configured dependencies.
//
// Refs and ExistingObjects are required and must be non-nil.
// ObjectsRoot is required if Execute may need to ingest or promote a pack.
// Progress, ProgressFlush, Hook, and HookIO are optional; when provided they
// are also borrowed for the duration of Execute.
type Options struct {
Algorithm objectid.Algorithm
Refs refstore.ReadWriteStore
ExistingObjects objectstore.Store
ObjectsRoot *os.Root
Progress io.Writer
ProgressFlush func() error
PromotedObjectPermissions *PromotedObjectPermissions
Hook Hook
HookIO HookIO
}