blob: f252bbc86f2340a1a8ae88ceaa0978de8a15a0fd (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package service
import (
"io"
"io/fs"
"os"
objectid "codeberg.org/lindenii/furgit/object/id"
"codeberg.org/lindenii/furgit/object/storer"
"codeberg.org/lindenii/furgit/ref/store"
)
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 objectstorer.Store
ObjectsRoot *os.Root
Progress io.Writer
ProgressFlush func() error
PromotedObjectPermissions *PromotedObjectPermissions
Hook Hook
HookIO HookIO
}
|