storage

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReferenceKey = "refs/"
	ConfigKey    = "config/"
	ObjectKey    = "objects/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodedObjectIter

type EncodedObjectIter struct {
	// contains filtered or unexported fields
}

func NewEncodeObjectIter

func NewEncodeObjectIter(t plumbing.ObjectType, s *GnfdStorage) *EncodedObjectIter

func (*EncodedObjectIter) Close

func (i *EncodedObjectIter) Close()

func (*EncodedObjectIter) ForEach

func (i *EncodedObjectIter) ForEach(cb func(obj plumbing.EncodedObject) error) error

func (*EncodedObjectIter) Next

type GnfdStorage

type GnfdStorage struct {
	GnfdClient client.IClient
	RepoName   string
	Account    *types.Account
}

func NewStorage

func NewStorage(chainID, rpcAddress, privateKey, bucketName string) (*GnfdStorage, error)

func (*GnfdStorage) AddAlternate

func (s *GnfdStorage) AddAlternate(remote string) error

func (*GnfdStorage) CheckAndSetReference

func (s *GnfdStorage) CheckAndSetReference(new, old *plumbing.Reference) error

func (*GnfdStorage) Config

func (s *GnfdStorage) Config() (*config.Config, error)

func (*GnfdStorage) CountLooseRefs

func (s *GnfdStorage) CountLooseRefs() (int, error)

func (*GnfdStorage) EncodedObject

func (*GnfdStorage) EncodedObjectSize

func (s *GnfdStorage) EncodedObjectSize(hash plumbing.Hash) (int64, error)

func (*GnfdStorage) GetBucketName

func (s *GnfdStorage) GetBucketName() string

func (*GnfdStorage) HasEncodedObject

func (s *GnfdStorage) HasEncodedObject(hash plumbing.Hash) error

func (*GnfdStorage) Index

func (s *GnfdStorage) Index() (*index.Index, error)

func (*GnfdStorage) IterEncodedObjects

func (s *GnfdStorage) IterEncodedObjects(objectType plumbing.ObjectType) (storer.EncodedObjectIter, error)

func (*GnfdStorage) IterReferences

func (s *GnfdStorage) IterReferences() (storer.ReferenceIter, error)

func (*GnfdStorage) Module

func (s *GnfdStorage) Module(name string) (storage.Storer, error)

func (*GnfdStorage) NewEncodedObject

func (s *GnfdStorage) NewEncodedObject() plumbing.EncodedObject

func (*GnfdStorage) PackRefs

func (s *GnfdStorage) PackRefs() error

func (*GnfdStorage) Reference

func (s *GnfdStorage) Reference(name plumbing.ReferenceName) (*plumbing.Reference, error)

func (*GnfdStorage) RemoveReference

func (s *GnfdStorage) RemoveReference(name plumbing.ReferenceName) error

func (*GnfdStorage) SetConfig

func (s *GnfdStorage) SetConfig(c *config.Config) error

func (*GnfdStorage) SetEncodedObject

func (s *GnfdStorage) SetEncodedObject(obj plumbing.EncodedObject) (plumbing.Hash, error)

func (*GnfdStorage) SetIndex

func (s *GnfdStorage) SetIndex(index *index.Index) error

func (*GnfdStorage) SetReference

func (s *GnfdStorage) SetReference(reference *plumbing.Reference) error

func (*GnfdStorage) SetShallow

func (s *GnfdStorage) SetShallow(hashes []plumbing.Hash) error

func (*GnfdStorage) Shallow

func (s *GnfdStorage) Shallow() ([]plumbing.Hash, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL