本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
879B

  1. package storage
  2. import (
  3. "errors"
  4. "gopkg.in/src-d/go-git.v4/config"
  5. "gopkg.in/src-d/go-git.v4/plumbing/storer"
  6. )
  7. var ErrReferenceHasChanged = errors.New("reference has changed concurrently")
  8. // Storer is a generic storage of objects, references and any information
  9. // related to a particular repository. The package gopkg.in/src-d/go-git.v4/storage
  10. // contains two implementation a filesystem base implementation (such as `.git`)
  11. // and a memory implementations being ephemeral
  12. type Storer interface {
  13. storer.EncodedObjectStorer
  14. storer.ReferenceStorer
  15. storer.ShallowStorer
  16. storer.IndexStorer
  17. config.ConfigStorer
  18. ModuleStorer
  19. }
  20. // ModuleStorer allows interact with the modules' Storers
  21. type ModuleStorer interface {
  22. // Module returns a Storer representing a submodule, if not exists returns a
  23. // new empty Storer is returned
  24. Module(name string) (Storer, error)
  25. }
上海开阖软件有限公司 沪ICP备12045867号-1