Debian Codegraph @

storage/storer.go

raw
1 package storage
2
3 import (
4 "errors"
5
6 "github.com/go-git/go-git/v5/config"
7 "github.com/go-git/go-git/v5/plumbing/storer"
8 )
9
10 var ErrReferenceHasChanged = errors.New("reference has changed concurrently")
11
12 // Storer is a generic storage of objects, references and any information
13 // related to a particular repository. The package github.com/go-git/go-git/v5/storage
14 // contains two implementation a filesystem base implementation (such as `.git`)
15 // and a memory implementations being ephemeral
16 type Storer interface {
17 storer.EncodedObjectStorer
18 storer.ReferenceStorer
19 storer.ShallowStorer
20 storer.IndexStorer
21 config.ConfigStorer
22 ModuleStorer
23 }
24
25 // ModuleStorer allows interact with the modules' Storers
26 type ModuleStorer interface {
27 // Module returns a Storer representing a submodule, if not exists returns a
28 // new empty Storer is returned
29 Module(name string) (Storer, error)
30 }