git_block

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const EncodedObjectType_EncodedObjectType_MAX = EncodedObjectType_EncodedObjectType_REF_DELTA

EncodedObjectType_EncodedObjectType_MAX is the maximum value.

GitHashType is the hash type used in Git.

View Source
const ReferenceType_ReferenceType_MAX = ReferenceType_ReferenceType_SYMBOLIC

ReferenceType_ReferenceType_MAX is the maximum value.

Variables

View Source
var (
	// ErrReferenceNameEmpty is returned if the reference name was empty.
	ErrReferenceNameEmpty = errors.New("reference name is empty")
	// ErrReferenceNameInvalid is returned if the reference name was invalid.
	ErrReferenceNameInvalid = errors.New("reference name is invalid")
	// ErrReferenceTypeInvalid is returned if the reference name was invalid.
	ErrReferenceTypeInvalid = errors.New("reference type is invalid")
	// ErrReferenceHashEmpty is returned if the reference name was empty.
	ErrReferenceHashEmpty = errors.New("reference hash is empty")
	// ErrHashTypeInvalid is returned if the hash type is not sha1.
	ErrHashTypeInvalid = errors.New("hash type must be sha1")
	// ErrObjectTypeInvalid is returned if the hash type is not sha1.
	ErrObjectTypeInvalid = errors.New("object type must be set")
	// ErrSizeInvalid is returned if the hash type is not sha1.
	ErrSizeInvalid = errors.New("object size invalid")
	// ErrEmptyHash is returned if the hash was empty.
	ErrEmptyHash = errors.New("hash cannot be empty")
	// ErrHashMismatch is returned if the hash did not match.
	ErrHashMismatch = errors.New("hash mismatch")
	// ErrEmptyURL is returned if the URL was empty.
	ErrEmptyURL = errors.New("empty url")
)
View Source
var (
	ReferenceType_name = map[int32]string{
		0: "ReferenceType_INVALID",
		1: "ReferenceType_HASH",
		2: "ReferenceType_SYMBOLIC",
	}
	ReferenceType_value = map[string]int32{
		"ReferenceType_INVALID":  0,
		"ReferenceType_HASH":     1,
		"ReferenceType_SYMBOLIC": 2,
	}
)

Enum value maps for ReferenceType.

View Source
var (
	EncodedObjectType_name = map[int32]string{
		0: "EncodedObjectType_INVALID",
		1: "EncodedObjectType_COMMIT",
		2: "EncodedObjectType_TREE",
		3: "EncodedObjectType_BLOB",
		4: "EncodedObjectType_TAG",
		6: "EncodedObjectType_OFS_DELTA",
		7: "EncodedObjectType_REF_DELTA",
	}
	EncodedObjectType_value = map[string]int32{
		"EncodedObjectType_INVALID":   0,
		"EncodedObjectType_COMMIT":    1,
		"EncodedObjectType_TREE":      2,
		"EncodedObjectType_BLOB":      3,
		"EncodedObjectType_TAG":       4,
		"EncodedObjectType_OFS_DELTA": 6,
		"EncodedObjectType_REF_DELTA": 7,
	}
)

Enum value maps for EncodedObjectType.

View Source
var (
	TagMode_name = map[int32]string{
		0: "TagMode_DEFAULT",
		1: "TagMode_NONE",
		2: "TagMode_ALL",
		3: "TagMode_FOLLOWING",
	}
	TagMode_value = map[string]int32{
		"TagMode_DEFAULT":   0,
		"TagMode_NONE":      1,
		"TagMode_ALL":       2,
		"TagMode_FOLLOWING": 3,
	}
)

Enum value maps for TagMode.

Functions

func ApplyConfigPatches

func ApplyConfigPatches(c *config.Config)

ApplyConfigPatches applies mandatory modifications to a Git config.

func FromHash

func FromHash(h *hash.Hash) (plumbing.Hash, error)

FromHash converts a hash into a plumbing.Hash.

func FromHashSet

func FromHashSet(hashSet []*hash.Hash) ([]plumbing.Hash, error)

FromHashSet converts a hash set to a list of plumbing.Hash.

func IsAllZeros

func IsAllZeros(buf []byte) bool

IsAllZeros checks if the buf is all zeros.

func NewEncodedObjectBlock

func NewEncodedObjectBlock() block.Block

NewEncodedObjectBlock builds a new encoded object block.

func NewEncodedObjectStoreBlock

func NewEncodedObjectStoreBlock() block.Block

NewEncodedObjectStoreBlock builds a new object store block.

func NewEndOfIndexEntryBlock

func NewEndOfIndexEntryBlock() block.Block

NewEndOfIndexEntryBlock builds a new repo root block.

func NewHash

func NewHash(pt plumbing.Hash) (*hash.Hash, error)

NewHash builds a new hash from a plumbing.Hash.

Returns nil if the hash is empty.

func NewHashSet

func NewHashSet(hashes []plumbing.Hash) ([]*hash.Hash, error)

NewHashSet constructs a list of hashes from a input plumbing hash set.

func NewIndexBlock

func NewIndexBlock() block.Block

NewIndexBlock builds a new index block.

func NewIndexEntryBlock

func NewIndexEntryBlock() block.Block

NewIndexEntryBlock builds a new index entry block.

func NewIndexEntrySet

func NewIndexEntrySet(v *[]*IndexEntry, bcs *block.Cursor) *sbset.SubBlockSet

NewIndexEntrySet builds a new index entry set container.

bcs should be located at the world change set sub-block.

func NewModuleReferencesStoreBlock

func NewModuleReferencesStoreBlock() block.Block

NewModuleReferencesStoreBlock builds a new modules references block.

func NewPackfileBlock

func NewPackfileBlock() block.Block

NewPackfileBlock builds a new packfile block.

func NewReferenceBlock

func NewReferenceBlock() block.Block

NewReferenceBlock builds a new repo ref block.

func NewReferencesStoreBlock

func NewReferencesStoreBlock() block.Block

NewReferencesStoreBlock builds a new repo references block.

func NewRepoBlock

func NewRepoBlock() block.Block

NewRepoBlock builds a new repo root block.

func NewResolveUndoBlock

func NewResolveUndoBlock() block.Block

NewResolveUndoBlock builds a new resolve undo block.

func NewResolveUndoEntrySet

func NewResolveUndoEntrySet(v *[]*ResolveUndoEntry, bcs *block.Cursor) *sbset.SubBlockSet

NewResolveUndoEntrySet builds a new ResolveUndo entry set container.

bcs should be located at the world change set sub-block.

func NewShallowRefsStoreBlock

func NewShallowRefsStoreBlock() block.Block

NewShallowRefsStoreBlock builds a new repo references block.

func NewSubmoduleBlock

func NewSubmoduleBlock() block.Block

NewSubmoduleBlock builds a new repo ref block.

func NewTreeBlock

func NewTreeBlock() block.Block

NewTreeBlock builds a new tree block.

func NewTreeEntryBlock

func NewTreeEntryBlock() block.Block

NewTreeEntryBlock builds a new tree entry block.

func NewTreeEntrySet

func NewTreeEntrySet(v *[]*TreeEntry, bcs *block.Cursor) *sbset.SubBlockSet

NewTreeEntrySet builds a new tree entry set container.

bcs should be located at the world change set sub-block.

func ValidateHash

func ValidateHash(h *hash.Hash) error

ValidateHash checks a hash meant to be converted into a plumbing.Hash

func ValidateRefHash

func ValidateRefHash(h *hash.Hash) error

ValidateRefHash validates a reference hash.

func ValidateRefName

func ValidateRefName(name string, allowOneLevel bool) error

ValidateRefName validates a reference name.

func ValidateReferenceType

func ValidateReferenceType(rt plumbing.ReferenceType) error

ValidateReferenceType validates the reference type.

Types

type AuthOpts

type AuthOpts struct {

	// Username is the ssh username to authenticate with.
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	// PeerId configures looking up peer priv key by id for ssh.
	PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// contains filtered or unexported fields
}

AuthOpts configures strategies for authenticating with a Git server.

func (*AuthOpts) CloneMessageVT

func (m *AuthOpts) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*AuthOpts) CloneVT

func (m *AuthOpts) CloneVT() *AuthOpts

func (*AuthOpts) EqualMessageVT

func (this *AuthOpts) EqualMessageVT(thatMsg any) bool

func (*AuthOpts) EqualVT

func (this *AuthOpts) EqualVT(that *AuthOpts) bool

func (*AuthOpts) GetPeerId

func (x *AuthOpts) GetPeerId() string

func (*AuthOpts) GetUsername

func (x *AuthOpts) GetUsername() string

func (*AuthOpts) MarshalJSON

func (x *AuthOpts) MarshalJSON() ([]byte, error)

MarshalJSON marshals the AuthOpts to JSON.

func (*AuthOpts) MarshalProtoJSON

func (x *AuthOpts) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the AuthOpts message to JSON.

func (*AuthOpts) MarshalProtoText

func (x *AuthOpts) MarshalProtoText() string

func (*AuthOpts) MarshalToSizedBufferVT

func (m *AuthOpts) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*AuthOpts) MarshalToVT

func (m *AuthOpts) MarshalToVT(dAtA []byte) (int, error)

func (*AuthOpts) MarshalVT

func (m *AuthOpts) MarshalVT() (dAtA []byte, err error)

func (*AuthOpts) ParsePeerId

func (a *AuthOpts) ParsePeerId() (peer.ID, error)

ParsePeerId parses the authentication peer id.

func (*AuthOpts) ProtoMessage

func (*AuthOpts) ProtoMessage()

func (*AuthOpts) Reset

func (x *AuthOpts) Reset()

func (*AuthOpts) ResolveAuth

func (a *AuthOpts) ResolveAuth(ctx context.Context, b bus.Bus) (client.SSHAuth, error)

ResolveAuth resolves authentication on a bus from the config. Returns nil, nil if auth not configured.

func (*AuthOpts) SizeVT

func (m *AuthOpts) SizeVT() (n int)

func (*AuthOpts) String

func (x *AuthOpts) String() string

func (*AuthOpts) UnmarshalJSON

func (x *AuthOpts) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the AuthOpts from JSON.

func (*AuthOpts) UnmarshalProtoJSON

func (x *AuthOpts) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the AuthOpts message from JSON.

func (*AuthOpts) UnmarshalVT

func (m *AuthOpts) UnmarshalVT(dAtA []byte) error

func (*AuthOpts) Validate

func (a *AuthOpts) Validate() error

Validate checks the auth object.

type CheckoutOpts

type CheckoutOpts struct {

	// Commit is the commit hash to check out.
	// Note: currently, this is enforced to hash type SHA1.
	Commit *hash.Hash `protobuf:"bytes,1,opt,name=commit,proto3" json:"commit,omitempty"`
	// Branch is the branch to check out.
	// If !create, cannot be set if commit is also set.
	Branch string `protobuf:"bytes,2,opt,name=branch,proto3" json:"branch,omitempty"`
	// Create indicates to create a branch from the specified commit.
	Create bool `protobuf:"varint,3,opt,name=create,proto3" json:"create,omitempty"`
	// Force indicates to continue even if index or working tree is not HEAD.
	// Throws away any changes when checking out.
	Force bool `protobuf:"varint,4,opt,name=force,proto3" json:"force,omitempty"`
	// Keep maintains index or working dir changes.
	// Cannot be set if force is also set.
	Keep bool `protobuf:"varint,5,opt,name=keep,proto3" json:"keep,omitempty"`
	// contains filtered or unexported fields
}

CheckoutOpts are options when checking out a repo.

func NewCheckoutOpts

func NewCheckoutOpts(o *git.CheckoutOptions) (*CheckoutOpts, error)

NewCheckoutOpts constructs a new CheckoutOpts from a git checkout opts.

func (*CheckoutOpts) BuildCheckoutOpts

func (o *CheckoutOpts) BuildCheckoutOpts() (*git.CheckoutOptions, error)

BuildCheckoutOpts constructs git checkout opts.

func (*CheckoutOpts) CloneMessageVT

func (m *CheckoutOpts) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*CheckoutOpts) CloneVT

func (m *CheckoutOpts) CloneVT() *CheckoutOpts

func (*CheckoutOpts) EqualMessageVT

func (this *CheckoutOpts) EqualMessageVT(thatMsg any) bool

func (*CheckoutOpts) EqualVT

func (this *CheckoutOpts) EqualVT(that *CheckoutOpts) bool

func (*CheckoutOpts) GetBranch

func (x *CheckoutOpts) GetBranch() string

func (*CheckoutOpts) GetCommit

func (x *CheckoutOpts) GetCommit() *hash.Hash

func (*CheckoutOpts) GetCreate

func (x *CheckoutOpts) GetCreate() bool

func (*CheckoutOpts) GetForce

func (x *CheckoutOpts) GetForce() bool

func (*CheckoutOpts) GetKeep

func (x *CheckoutOpts) GetKeep() bool

func (*CheckoutOpts) MarshalBlock

func (o *CheckoutOpts) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*CheckoutOpts) MarshalJSON

func (x *CheckoutOpts) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CheckoutOpts to JSON.

func (*CheckoutOpts) MarshalProtoJSON

func (x *CheckoutOpts) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CheckoutOpts message to JSON.

func (*CheckoutOpts) MarshalProtoText

func (x *CheckoutOpts) MarshalProtoText() string

func (*CheckoutOpts) MarshalToSizedBufferVT

func (m *CheckoutOpts) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CheckoutOpts) MarshalToVT

func (m *CheckoutOpts) MarshalToVT(dAtA []byte) (int, error)

func (*CheckoutOpts) MarshalVT

func (m *CheckoutOpts) MarshalVT() (dAtA []byte, err error)

func (*CheckoutOpts) ProtoMessage

func (*CheckoutOpts) ProtoMessage()

func (*CheckoutOpts) Reset

func (x *CheckoutOpts) Reset()

func (*CheckoutOpts) SizeVT

func (m *CheckoutOpts) SizeVT() (n int)

func (*CheckoutOpts) String

func (x *CheckoutOpts) String() string

func (*CheckoutOpts) UnmarshalBlock

func (o *CheckoutOpts) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*CheckoutOpts) UnmarshalJSON

func (x *CheckoutOpts) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CheckoutOpts from JSON.

func (*CheckoutOpts) UnmarshalProtoJSON

func (x *CheckoutOpts) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CheckoutOpts message from JSON.

func (*CheckoutOpts) UnmarshalVT

func (m *CheckoutOpts) UnmarshalVT(dAtA []byte) error

func (*CheckoutOpts) Validate

func (o *CheckoutOpts) Validate() error

Validate validates the checkout opts.

type CloneOpts

type CloneOpts struct {

	// Url is the Git URL to clone from.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// RemoteName is the name of the remote to add, by default "origin."
	RemoteName string `protobuf:"bytes,2,opt,name=remote_name,json=remoteName,proto3" json:"remoteName,omitempty"`
	// Ref is the reference name to clone, uses default if empty.
	Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"`
	// SingleBranch fetches the ref and nothing more.
	SingleBranch bool `protobuf:"varint,4,opt,name=single_branch,json=singleBranch,proto3" json:"singleBranch,omitempty"`
	// DisableCheckout disables setting the Worktree and Workdir.
	DisableCheckout bool `protobuf:"varint,5,opt,name=disable_checkout,json=disableCheckout,proto3" json:"disableCheckout,omitempty"`
	// Depth limits to the specific number of commits.
	// If zero, fetches all of the commits.
	Depth uint32 `protobuf:"varint,6,opt,name=depth,proto3" json:"depth,omitempty"`
	// Recursive indicates submodules will be fetched as well.
	Recursive bool `protobuf:"varint,7,opt,name=recursive,proto3" json:"recursive,omitempty"`
	// RecursionDepth overrides the default submodule recursion depth (10).
	// Only used when recursive is true. Zero means use the default.
	RecursionDepth uint32 `protobuf:"varint,11,opt,name=recursion_depth,json=recursionDepth,proto3" json:"recursionDepth,omitempty"`
	// TagMode controls the fetching of tags.
	TagMode TagMode `protobuf:"varint,8,opt,name=tag_mode,json=tagMode,proto3" json:"tagMode,omitempty"`
	// Insecure indicates that TLS checks should be skipped.
	Insecure bool `protobuf:"varint,9,opt,name=insecure,proto3" json:"insecure,omitempty"`
	// CaBundle contains additional CA certificates to trust.
	CaBundle string `protobuf:"bytes,10,opt,name=ca_bundle,json=caBundle,proto3" json:"caBundle,omitempty"`
	// contains filtered or unexported fields
}

CloneOpts are options for a Git clone.

func (*CloneOpts) BuildCloneOpts

func (c *CloneOpts) BuildCloneOpts() *git.CloneOptions

BuildCloneOpts constructs the go-git clone configuration. Note: the auth options are /not/ applied yet.

func (*CloneOpts) CloneMessageVT

func (m *CloneOpts) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*CloneOpts) CloneVT

func (m *CloneOpts) CloneVT() *CloneOpts

func (*CloneOpts) EqualMessageVT

func (this *CloneOpts) EqualMessageVT(thatMsg any) bool

func (*CloneOpts) EqualVT

func (this *CloneOpts) EqualVT(that *CloneOpts) bool

func (*CloneOpts) GetCaBundle

func (x *CloneOpts) GetCaBundle() string

func (*CloneOpts) GetDepth

func (x *CloneOpts) GetDepth() uint32

func (*CloneOpts) GetDisableCheckout

func (x *CloneOpts) GetDisableCheckout() bool

func (*CloneOpts) GetInsecure

func (x *CloneOpts) GetInsecure() bool

func (*CloneOpts) GetRecursionDepth

func (x *CloneOpts) GetRecursionDepth() uint32

func (*CloneOpts) GetRecursive

func (x *CloneOpts) GetRecursive() bool

func (*CloneOpts) GetRef

func (x *CloneOpts) GetRef() string

func (*CloneOpts) GetRemoteName

func (x *CloneOpts) GetRemoteName() string

func (*CloneOpts) GetSingleBranch

func (x *CloneOpts) GetSingleBranch() bool

func (*CloneOpts) GetTagMode

func (x *CloneOpts) GetTagMode() TagMode

func (*CloneOpts) GetUrl

func (x *CloneOpts) GetUrl() string

func (*CloneOpts) IsEmpty

func (c *CloneOpts) IsEmpty() bool

IsEmpty checks if there are no clone URL set.

func (*CloneOpts) MarshalJSON

func (x *CloneOpts) MarshalJSON() ([]byte, error)

MarshalJSON marshals the CloneOpts to JSON.

func (*CloneOpts) MarshalProtoJSON

func (x *CloneOpts) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the CloneOpts message to JSON.

func (*CloneOpts) MarshalProtoText

func (x *CloneOpts) MarshalProtoText() string

func (*CloneOpts) MarshalToSizedBufferVT

func (m *CloneOpts) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*CloneOpts) MarshalToVT

func (m *CloneOpts) MarshalToVT(dAtA []byte) (int, error)

func (*CloneOpts) MarshalVT

func (m *CloneOpts) MarshalVT() (dAtA []byte, err error)

func (*CloneOpts) ProtoMessage

func (*CloneOpts) ProtoMessage()

func (*CloneOpts) Reset

func (x *CloneOpts) Reset()

func (*CloneOpts) SizeVT

func (m *CloneOpts) SizeVT() (n int)

func (*CloneOpts) String

func (x *CloneOpts) String() string

func (*CloneOpts) UnmarshalJSON

func (x *CloneOpts) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the CloneOpts from JSON.

func (*CloneOpts) UnmarshalProtoJSON

func (x *CloneOpts) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the CloneOpts message from JSON.

func (*CloneOpts) UnmarshalVT

func (m *CloneOpts) UnmarshalVT(dAtA []byte) error

func (*CloneOpts) Validate

func (c *CloneOpts) Validate() error

Validate performs cursory checks of the config.

type EncodedObject

type EncodedObject struct {

	// DataBlob is the encoded object data.
	DataBlob *blob.Blob `protobuf:"bytes,1,opt,name=data_blob,json=dataBlob,proto3" json:"dataBlob,omitempty"`
	// DataHash is the hash of DataBlob.
	// Note: currently, this is enforced to hash type SHA1.
	DataHash *hash.Hash `protobuf:"bytes,2,opt,name=data_hash,json=dataHash,proto3" json:"dataHash,omitempty"`
	// ObjectType is the encoded object type.
	EncodedObjectType EncodedObjectType `protobuf:"varint,3,opt,name=encoded_object_type,json=encodedObjectType,proto3" json:"encodedObjectType,omitempty"`
	// contains filtered or unexported fields
}

EncodedObject contains an encoded object, stored as a Blob.

func (*EncodedObject) ApplySubBlock

func (r *EncodedObject) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*EncodedObject) BuildDataBlobReader

func (r *EncodedObject) BuildDataBlobReader(ctx context.Context, bcs *block.Cursor) (*blob.Reader, error)

BuildDataBlobReader builds the data blob reader.

func (*EncodedObject) CloneMessageVT

func (m *EncodedObject) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*EncodedObject) CloneVT

func (m *EncodedObject) CloneVT() *EncodedObject

func (*EncodedObject) EqualMessageVT

func (this *EncodedObject) EqualMessageVT(thatMsg any) bool

func (*EncodedObject) EqualVT

func (this *EncodedObject) EqualVT(that *EncodedObject) bool

func (*EncodedObject) FollowDataBlob

func (r *EncodedObject) FollowDataBlob(ctx context.Context, bcs *block.Cursor) (*blob.Blob, *block.Cursor, error)

FollowDataBlob attempts to follow the blob field.

func (*EncodedObject) GetDataBlob

func (x *EncodedObject) GetDataBlob() *blob.Blob

func (*EncodedObject) GetDataHash

func (x *EncodedObject) GetDataHash() *hash.Hash

func (*EncodedObject) GetEncodedObjectType

func (x *EncodedObject) GetEncodedObjectType() EncodedObjectType

func (*EncodedObject) GetSubBlockCtor

func (r *EncodedObject) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*EncodedObject) GetSubBlocks

func (r *EncodedObject) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*EncodedObject) MarshalBlock

func (r *EncodedObject) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*EncodedObject) MarshalJSON

func (x *EncodedObject) MarshalJSON() ([]byte, error)

MarshalJSON marshals the EncodedObject to JSON.

func (*EncodedObject) MarshalProtoJSON

func (x *EncodedObject) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the EncodedObject message to JSON.

func (*EncodedObject) MarshalProtoText

func (x *EncodedObject) MarshalProtoText() string

func (*EncodedObject) MarshalToSizedBufferVT

func (m *EncodedObject) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*EncodedObject) MarshalToVT

func (m *EncodedObject) MarshalToVT(dAtA []byte) (int, error)

func (*EncodedObject) MarshalVT

func (m *EncodedObject) MarshalVT() (dAtA []byte, err error)

func (*EncodedObject) ProtoMessage

func (*EncodedObject) ProtoMessage()

func (*EncodedObject) Reset

func (x *EncodedObject) Reset()

func (*EncodedObject) SizeVT

func (m *EncodedObject) SizeVT() (n int)

func (*EncodedObject) String

func (x *EncodedObject) String() string

func (*EncodedObject) UnmarshalBlock

func (r *EncodedObject) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*EncodedObject) UnmarshalJSON

func (x *EncodedObject) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the EncodedObject from JSON.

func (*EncodedObject) UnmarshalProtoJSON

func (x *EncodedObject) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the EncodedObject message from JSON.

func (*EncodedObject) UnmarshalVT

func (m *EncodedObject) UnmarshalVT(dAtA []byte) error

func (*EncodedObject) Validate

func (r *EncodedObject) Validate() error

Validate performs cursory validation of the EncodedObject.

func (*EncodedObject) ValidateFull

func (r *EncodedObject) ValidateFull(ctx context.Context, bcs *block.Cursor) error

ValidateFull performs full validation of the EncodedObject. This fetches all the data. Note: this does not check the hash of the data, just block graph validity.

type EncodedObjectIter

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

EncodedObjectIter iterates over the encoded object storage.

func NewEncodedObjectIter

func NewEncodedObjectIter(r *Store, it kvtx.BlockIterator) *EncodedObjectIter

NewEncodedObjectIter constructs the iterator from a iavl iterator.

func (*EncodedObjectIter) Close

func (i *EncodedObjectIter) Close()

Close closes the iterator.

func (*EncodedObjectIter) ForEach

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

ForEach calls the function for each element in the iterator.

func (*EncodedObjectIter) Next

Next advances the iterator.

type EncodedObjectStore

type EncodedObjectStore struct {

	// KvtxRoot is the root of the object tree.
	KvtxRoot *block1.KeyValueStore `protobuf:"bytes,1,opt,name=kvtx_root,json=kvtxRoot,proto3" json:"kvtxRoot,omitempty"`
	// ChunkerArgs are arguments passed to ensure consistent chunking.
	ChunkerArgs *blob.ChunkerArgs `protobuf:"bytes,2,opt,name=chunker_args,json=chunkerArgs,proto3" json:"chunkerArgs,omitempty"`
	// PackfileKvtxRoot is the root of the packfile metadata tree.
	PackfileKvtxRoot *block1.KeyValueStore `protobuf:"bytes,3,opt,name=packfile_kvtx_root,json=packfileKvtxRoot,proto3" json:"packfileKvtxRoot,omitempty"`
	// contains filtered or unexported fields
}

EncodedObjectStore contains the encoded objects store.

func (*EncodedObjectStore) ApplySubBlock

func (r *EncodedObjectStore) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*EncodedObjectStore) BuildObjectTree

func (r *EncodedObjectStore) BuildObjectTree(ctx context.Context, bcs *block.Cursor) (kvtx.BlockTx, error)

BuildObjectTree builds the iavl tree.

Bcs should be located at EncodedObjectStore.

func (*EncodedObjectStore) BuildPackfileTree

func (r *EncodedObjectStore) BuildPackfileTree(ctx context.Context, bcs *block.Cursor) (kvtx.BlockTx, error)

BuildPackfileTree builds the packfile metadata tree.

Bcs should be located at EncodedObjectStore.

func (*EncodedObjectStore) CloneMessageVT

func (m *EncodedObjectStore) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*EncodedObjectStore) CloneVT

func (m *EncodedObjectStore) CloneVT() *EncodedObjectStore

func (*EncodedObjectStore) EqualMessageVT

func (this *EncodedObjectStore) EqualMessageVT(thatMsg any) bool

func (*EncodedObjectStore) EqualVT

func (this *EncodedObjectStore) EqualVT(that *EncodedObjectStore) bool

func (*EncodedObjectStore) GetChunkerArgs

func (x *EncodedObjectStore) GetChunkerArgs() *blob.ChunkerArgs

func (*EncodedObjectStore) GetKvtxRoot

func (x *EncodedObjectStore) GetKvtxRoot() *block1.KeyValueStore

func (*EncodedObjectStore) GetPackfileKvtxRoot

func (x *EncodedObjectStore) GetPackfileKvtxRoot() *block1.KeyValueStore

func (*EncodedObjectStore) GetSubBlockCtor

func (r *EncodedObjectStore) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*EncodedObjectStore) GetSubBlocks

func (r *EncodedObjectStore) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*EncodedObjectStore) IsNil

func (r *EncodedObjectStore) IsNil() bool

IsNil returns if the object is nil.

func (*EncodedObjectStore) MarshalBlock

func (r *EncodedObjectStore) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*EncodedObjectStore) MarshalJSON

func (x *EncodedObjectStore) MarshalJSON() ([]byte, error)

MarshalJSON marshals the EncodedObjectStore to JSON.

func (*EncodedObjectStore) MarshalProtoJSON

func (x *EncodedObjectStore) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the EncodedObjectStore message to JSON.

func (*EncodedObjectStore) MarshalProtoText

func (x *EncodedObjectStore) MarshalProtoText() string

func (*EncodedObjectStore) MarshalToSizedBufferVT

func (m *EncodedObjectStore) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*EncodedObjectStore) MarshalToVT

func (m *EncodedObjectStore) MarshalToVT(dAtA []byte) (int, error)

func (*EncodedObjectStore) MarshalVT

func (m *EncodedObjectStore) MarshalVT() (dAtA []byte, err error)

func (*EncodedObjectStore) ProtoMessage

func (*EncodedObjectStore) ProtoMessage()

func (*EncodedObjectStore) Reset

func (x *EncodedObjectStore) Reset()

func (*EncodedObjectStore) SizeVT

func (m *EncodedObjectStore) SizeVT() (n int)

func (*EncodedObjectStore) String

func (x *EncodedObjectStore) String() string

func (*EncodedObjectStore) UnmarshalBlock

func (r *EncodedObjectStore) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*EncodedObjectStore) UnmarshalJSON

func (x *EncodedObjectStore) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the EncodedObjectStore from JSON.

func (*EncodedObjectStore) UnmarshalProtoJSON

func (x *EncodedObjectStore) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the EncodedObjectStore message from JSON.

func (*EncodedObjectStore) UnmarshalVT

func (m *EncodedObjectStore) UnmarshalVT(dAtA []byte) error

func (*EncodedObjectStore) Validate

func (r *EncodedObjectStore) Validate() error

Validate performs cursory validation of the object.

type EncodedObjectType

type EncodedObjectType int32

EncodedObjectType are the types of encoded objects. Note: the values match the Git object type values.

const (
	EncodedObjectType_EncodedObjectType_INVALID EncodedObjectType = 0
	EncodedObjectType_EncodedObjectType_COMMIT  EncodedObjectType = 1
	EncodedObjectType_EncodedObjectType_TREE    EncodedObjectType = 2
	EncodedObjectType_EncodedObjectType_BLOB    EncodedObjectType = 3
	EncodedObjectType_EncodedObjectType_TAG     EncodedObjectType = 4
	// 5 reserved for future expansion
	EncodedObjectType_EncodedObjectType_OFS_DELTA EncodedObjectType = 6
	EncodedObjectType_EncodedObjectType_REF_DELTA EncodedObjectType = 7
)

func NewEncodedObjectType

func NewEncodedObjectType(ot plumbing.ObjectType) EncodedObjectType

NewEncodedObjectType constructs the EncodedObjectType from plumbing type.

func (EncodedObjectType) Enum

func (EncodedObjectType) MarshalJSON

func (x EncodedObjectType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the EncodedObjectType to JSON.

func (EncodedObjectType) MarshalProtoJSON

func (x EncodedObjectType) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the EncodedObjectType to JSON.

func (EncodedObjectType) MarshalProtoText

func (x EncodedObjectType) MarshalProtoText() string

func (EncodedObjectType) MarshalText

func (x EncodedObjectType) MarshalText() ([]byte, error)

MarshalText marshals the EncodedObjectType to text.

func (EncodedObjectType) String

func (x EncodedObjectType) String() string

func (EncodedObjectType) ToObjectType

func (t EncodedObjectType) ToObjectType() plumbing.ObjectType

ToObjectType converts the EncodedObjectType to a ObjectType.

func (*EncodedObjectType) UnmarshalJSON

func (x *EncodedObjectType) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the EncodedObjectType from JSON.

func (*EncodedObjectType) UnmarshalProtoJSON

func (x *EncodedObjectType) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the EncodedObjectType from JSON.

func (*EncodedObjectType) UnmarshalText

func (x *EncodedObjectType) UnmarshalText(b []byte) error

UnmarshalText unmarshals the EncodedObjectType from text.

type EndOfIndexEntry

type EndOfIndexEntry struct {

	// Offset is the offset to the end of the index entries.
	Offset uint32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	// Hash is the sha-1 of the extension types and their sizes.
	Hash *hash.Hash `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

EndOfIndexEntry is the End of Index Entry (EOIE) is used to locate the end of the variable length index entries and the beginning of the extensions.

func NewEndOfIndexEntry

func NewEndOfIndexEntry(e *index.EndOfIndexEntry) (*EndOfIndexEntry, error)

NewEndOfIndexEntry constructs a EndOfIndexEntry from the git block.

func (*EndOfIndexEntry) ApplySubBlock

func (r *EndOfIndexEntry) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*EndOfIndexEntry) CloneMessageVT

func (m *EndOfIndexEntry) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*EndOfIndexEntry) CloneVT

func (m *EndOfIndexEntry) CloneVT() *EndOfIndexEntry

func (*EndOfIndexEntry) EqualMessageVT

func (this *EndOfIndexEntry) EqualMessageVT(thatMsg any) bool

func (*EndOfIndexEntry) EqualVT

func (this *EndOfIndexEntry) EqualVT(that *EndOfIndexEntry) bool

func (*EndOfIndexEntry) GetHash

func (x *EndOfIndexEntry) GetHash() *hash.Hash

func (*EndOfIndexEntry) GetOffset

func (x *EndOfIndexEntry) GetOffset() uint32

func (*EndOfIndexEntry) GetSubBlockCtor

func (r *EndOfIndexEntry) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*EndOfIndexEntry) GetSubBlocks

func (r *EndOfIndexEntry) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*EndOfIndexEntry) IsNil

func (r *EndOfIndexEntry) IsNil() bool

IsNil returns if the object is nil.

func (*EndOfIndexEntry) MarshalBlock

func (r *EndOfIndexEntry) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*EndOfIndexEntry) MarshalJSON

func (x *EndOfIndexEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the EndOfIndexEntry to JSON.

func (*EndOfIndexEntry) MarshalProtoJSON

func (x *EndOfIndexEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the EndOfIndexEntry message to JSON.

func (*EndOfIndexEntry) MarshalProtoText

func (x *EndOfIndexEntry) MarshalProtoText() string

func (*EndOfIndexEntry) MarshalToSizedBufferVT

func (m *EndOfIndexEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*EndOfIndexEntry) MarshalToVT

func (m *EndOfIndexEntry) MarshalToVT(dAtA []byte) (int, error)

func (*EndOfIndexEntry) MarshalVT

func (m *EndOfIndexEntry) MarshalVT() (dAtA []byte, err error)

func (*EndOfIndexEntry) ProtoMessage

func (*EndOfIndexEntry) ProtoMessage()

func (*EndOfIndexEntry) Reset

func (x *EndOfIndexEntry) Reset()

func (*EndOfIndexEntry) SizeVT

func (m *EndOfIndexEntry) SizeVT() (n int)

func (*EndOfIndexEntry) String

func (x *EndOfIndexEntry) String() string

func (*EndOfIndexEntry) ToGitEndOfIndexEntry

func (r *EndOfIndexEntry) ToGitEndOfIndexEntry() (*index.EndOfIndexEntry, error)

ToGitEndOfIndexEntry converts to the git EndOfIndexEntry object.

func (*EndOfIndexEntry) UnmarshalBlock

func (r *EndOfIndexEntry) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*EndOfIndexEntry) UnmarshalJSON

func (x *EndOfIndexEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the EndOfIndexEntry from JSON.

func (*EndOfIndexEntry) UnmarshalProtoJSON

func (x *EndOfIndexEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the EndOfIndexEntry message from JSON.

func (*EndOfIndexEntry) UnmarshalVT

func (m *EndOfIndexEntry) UnmarshalVT(dAtA []byte) error

func (*EndOfIndexEntry) Validate

func (r *EndOfIndexEntry) Validate() error

Validate performs cursory checks on the repo block.

type FetchOpts

type FetchOpts struct {

	// RemoteName is the name of the remote to fetch from, by default "origin."
	RemoteName string `protobuf:"bytes,1,opt,name=remote_name,json=remoteName,proto3" json:"remoteName,omitempty"`
	// RemoteUrl overrides the remote repo address with a custom URL.
	RemoteUrl string `protobuf:"bytes,2,opt,name=remote_url,json=remoteUrl,proto3" json:"remoteUrl,omitempty"`
	// RefSpecs are the refspecs to use for the fetch.
	// If empty, uses the default refspecs for the remote.
	RefSpecs []string `protobuf:"bytes,3,rep,name=ref_specs,json=refSpecs,proto3" json:"refSpecs,omitempty"`
	// Depth limits to the specific number of commits.
	// If zero, fetches all of the commits.
	Depth uint32 `protobuf:"varint,4,opt,name=depth,proto3" json:"depth,omitempty"`
	// TagMode controls the fetching of tags.
	TagMode TagMode `protobuf:"varint,5,opt,name=tag_mode,json=tagMode,proto3" json:"tagMode,omitempty"`
	// Force allows the fetch to update a local branch even when the remote
	// branch does not descend from it.
	Force bool `protobuf:"varint,6,opt,name=force,proto3" json:"force,omitempty"`
	// Insecure indicates that TLS checks should be skipped.
	Insecure bool `protobuf:"varint,7,opt,name=insecure,proto3" json:"insecure,omitempty"`
	// CaBundle contains additional CA certificates to trust.
	CaBundle string `protobuf:"bytes,8,opt,name=ca_bundle,json=caBundle,proto3" json:"caBundle,omitempty"`
	// Prune indicates that local refs matching RefSpecs that do not exist
	// remotely will be removed.
	Prune bool `protobuf:"varint,9,opt,name=prune,proto3" json:"prune,omitempty"`
	// contains filtered or unexported fields
}

FetchOpts are options for a Git fetch.

func (*FetchOpts) BuildFetchOpts

func (f *FetchOpts) BuildFetchOpts() *git.FetchOptions

BuildFetchOpts constructs the go-git fetch configuration. Note: the auth and progress options are /not/ applied yet.

func (*FetchOpts) CloneMessageVT

func (m *FetchOpts) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*FetchOpts) CloneVT

func (m *FetchOpts) CloneVT() *FetchOpts

func (*FetchOpts) EqualMessageVT

func (this *FetchOpts) EqualMessageVT(thatMsg any) bool

func (*FetchOpts) EqualVT

func (this *FetchOpts) EqualVT(that *FetchOpts) bool

func (*FetchOpts) GetCaBundle

func (x *FetchOpts) GetCaBundle() string

func (*FetchOpts) GetDepth

func (x *FetchOpts) GetDepth() uint32

func (*FetchOpts) GetForce

func (x *FetchOpts) GetForce() bool

func (*FetchOpts) GetInsecure

func (x *FetchOpts) GetInsecure() bool

func (*FetchOpts) GetPrune

func (x *FetchOpts) GetPrune() bool

func (*FetchOpts) GetRefSpecs

func (x *FetchOpts) GetRefSpecs() []string

func (*FetchOpts) GetRemoteName

func (x *FetchOpts) GetRemoteName() string

func (*FetchOpts) GetRemoteUrl

func (x *FetchOpts) GetRemoteUrl() string

func (*FetchOpts) GetTagMode

func (x *FetchOpts) GetTagMode() TagMode

func (*FetchOpts) IsEmpty

func (f *FetchOpts) IsEmpty() bool

IsEmpty checks if the fetch opts are empty.

func (*FetchOpts) MarshalJSON

func (x *FetchOpts) MarshalJSON() ([]byte, error)

MarshalJSON marshals the FetchOpts to JSON.

func (*FetchOpts) MarshalProtoJSON

func (x *FetchOpts) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the FetchOpts message to JSON.

func (*FetchOpts) MarshalProtoText

func (x *FetchOpts) MarshalProtoText() string

func (*FetchOpts) MarshalToSizedBufferVT

func (m *FetchOpts) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*FetchOpts) MarshalToVT

func (m *FetchOpts) MarshalToVT(dAtA []byte) (int, error)

func (*FetchOpts) MarshalVT

func (m *FetchOpts) MarshalVT() (dAtA []byte, err error)

func (*FetchOpts) ProtoMessage

func (*FetchOpts) ProtoMessage()

func (*FetchOpts) Reset

func (x *FetchOpts) Reset()

func (*FetchOpts) SizeVT

func (m *FetchOpts) SizeVT() (n int)

func (*FetchOpts) String

func (x *FetchOpts) String() string

func (*FetchOpts) UnmarshalJSON

func (x *FetchOpts) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the FetchOpts from JSON.

func (*FetchOpts) UnmarshalProtoJSON

func (x *FetchOpts) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the FetchOpts message from JSON.

func (*FetchOpts) UnmarshalVT

func (m *FetchOpts) UnmarshalVT(dAtA []byte) error

func (*FetchOpts) Validate

func (f *FetchOpts) Validate() error

Validate performs cursory checks of the config.

type Index

type Index struct {

	// Version is the index version (usually 2).
	Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// Entries is the list of entries represented by the Index.
	Entries []*IndexEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
	// Cache represents the "cached tree" extension.
	Cache *Tree `protobuf:"bytes,3,opt,name=cache,proto3" json:"cache,omitempty"`
	// ResolveUndo represents the "resolve undo" extension.
	ResolveUndo *ResolveUndo `protobuf:"bytes,4,opt,name=resolve_undo,json=resolveUndo,proto3" json:"resolveUndo,omitempty"`
	// EndOfIndexEntry represents the "End of Index Entry" extension
	EndOfIndexEntry *EndOfIndexEntry `protobuf:"bytes,5,opt,name=end_of_index_entry,json=endOfIndexEntry,proto3" json:"endOfIndexEntry,omitempty"`
	// contains filtered or unexported fields
}

Index stores a git index.

func NewIndex

func NewIndex(i *index.Index) (*Index, error)

NewIndex constructs a new Index from a git index.

func (*Index) ApplySubBlock

func (i *Index) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*Index) CloneMessageVT

func (m *Index) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Index) CloneVT

func (m *Index) CloneVT() *Index

func (*Index) EqualMessageVT

func (this *Index) EqualMessageVT(thatMsg any) bool

func (*Index) EqualVT

func (this *Index) EqualVT(that *Index) bool

func (*Index) GetCache

func (x *Index) GetCache() *Tree

func (*Index) GetEndOfIndexEntry

func (x *Index) GetEndOfIndexEntry() *EndOfIndexEntry

func (*Index) GetEntries

func (x *Index) GetEntries() []*IndexEntry

func (*Index) GetResolveUndo

func (x *Index) GetResolveUndo() *ResolveUndo

func (*Index) GetSubBlockCtor

func (i *Index) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*Index) GetSubBlocks

func (i *Index) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*Index) GetVersion

func (x *Index) GetVersion() uint32

func (*Index) IsNil

func (i *Index) IsNil() bool

IsNil returns if the object is nil.

func (*Index) MarshalBlock

func (i *Index) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*Index) MarshalJSON

func (x *Index) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Index to JSON.

func (*Index) MarshalProtoJSON

func (x *Index) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Index message to JSON.

func (*Index) MarshalProtoText

func (x *Index) MarshalProtoText() string

func (*Index) MarshalToSizedBufferVT

func (m *Index) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Index) MarshalToVT

func (m *Index) MarshalToVT(dAtA []byte) (int, error)

func (*Index) MarshalVT

func (m *Index) MarshalVT() (dAtA []byte, err error)

func (*Index) ProtoMessage

func (*Index) ProtoMessage()

func (*Index) Reset

func (x *Index) Reset()

func (*Index) SizeVT

func (m *Index) SizeVT() (n int)

func (*Index) String

func (x *Index) String() string

func (*Index) ToGitIndex

func (i *Index) ToGitIndex() (*index.Index, error)

ToGitIndex converts the index block to a git index.

func (*Index) UnmarshalBlock

func (i *Index) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*Index) UnmarshalJSON

func (x *Index) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Index from JSON.

func (*Index) UnmarshalProtoJSON

func (x *Index) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Index message from JSON.

func (*Index) UnmarshalVT

func (m *Index) UnmarshalVT(dAtA []byte) error

func (*Index) Validate

func (i *Index) Validate() error

Validate performs cursory validation of the Index.

type IndexEntry

type IndexEntry struct {

	// DataHash is the hash of the index entry.
	// Note: currently, this is enforced to hash type SHA1.
	DataHash *hash.Hash `protobuf:"bytes,1,opt,name=data_hash,json=dataHash,proto3" json:"dataHash,omitempty"`
	// Name is the entry path name relative to top directory.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// CreatedAt is the time when the path was created.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"createdAt,omitempty"`
	// ModifiedAt is the time when the path was modified.
	ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=modified_at,json=modifiedAt,proto3" json:"modifiedAt,omitempty"`
	// Dev is the device of the tracked path.
	Dev uint32 `protobuf:"varint,5,opt,name=dev,proto3" json:"dev,omitempty"`
	// Inode is the inode of the tracked path.
	Inode uint32 `protobuf:"varint,6,opt,name=inode,proto3" json:"inode,omitempty"`
	// Mode is the Git file mode used for the entry.
	// i.e. Dir, Regular, Executable, Symlink, Submodule
	FileMode uint32 `protobuf:"varint,7,opt,name=file_mode,json=fileMode,proto3" json:"fileMode,omitempty"`
	// Uid is the user id of the owner.
	Uid uint32 `protobuf:"varint,8,opt,name=uid,proto3" json:"uid,omitempty"`
	// Gid is the group id of the owner.
	Gid uint32 `protobuf:"varint,9,opt,name=gid,proto3" json:"gid,omitempty"`
	// Size is the length in bytes for regular files.
	Size uint32 `protobuf:"varint,10,opt,name=size,proto3" json:"size,omitempty"`
	// Stage contains the merging state of the index item.
	// https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging
	Stage uint32 `protobuf:"varint,11,opt,name=stage,proto3" json:"stage,omitempty"`
	// SkipWorktree is used in sparse checkouts.
	SkipWorktree bool `protobuf:"varint,12,opt,name=skip_worktree,json=skipWorktree,proto3" json:"skipWorktree,omitempty"`
	// IntentToAdd indicates the path will be added later.
	// git add -N
	IntentToAdd bool `protobuf:"varint,13,opt,name=intent_to_add,json=intentToAdd,proto3" json:"intentToAdd,omitempty"`
	// contains filtered or unexported fields
}

IndexEntry stores an entry in the git index.

func NewIndexEntry

func NewIndexEntry(e *index.Entry) (*IndexEntry, error)

NewIndexEntry creates a new index entry from a git index entry.

func (*IndexEntry) ApplySubBlock

func (i *IndexEntry) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*IndexEntry) CloneMessageVT

func (m *IndexEntry) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*IndexEntry) CloneVT

func (m *IndexEntry) CloneVT() *IndexEntry

func (*IndexEntry) EqualMessageVT

func (this *IndexEntry) EqualMessageVT(thatMsg any) bool

func (*IndexEntry) EqualVT

func (this *IndexEntry) EqualVT(that *IndexEntry) bool

func (*IndexEntry) GetCreatedAt

func (x *IndexEntry) GetCreatedAt() *timestamppb.Timestamp

func (*IndexEntry) GetDataHash

func (x *IndexEntry) GetDataHash() *hash.Hash

func (*IndexEntry) GetDev

func (x *IndexEntry) GetDev() uint32

func (*IndexEntry) GetFileMode

func (x *IndexEntry) GetFileMode() uint32

func (*IndexEntry) GetGid

func (x *IndexEntry) GetGid() uint32

func (*IndexEntry) GetInode

func (x *IndexEntry) GetInode() uint32

func (*IndexEntry) GetIntentToAdd

func (x *IndexEntry) GetIntentToAdd() bool

func (*IndexEntry) GetModifiedAt

func (x *IndexEntry) GetModifiedAt() *timestamppb.Timestamp

func (*IndexEntry) GetName

func (x *IndexEntry) GetName() string

func (*IndexEntry) GetSize

func (x *IndexEntry) GetSize() uint32

func (*IndexEntry) GetSkipWorktree

func (x *IndexEntry) GetSkipWorktree() bool

func (*IndexEntry) GetStage

func (x *IndexEntry) GetStage() uint32

func (*IndexEntry) GetSubBlockCtor

func (i *IndexEntry) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*IndexEntry) GetSubBlocks

func (i *IndexEntry) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*IndexEntry) GetUid

func (x *IndexEntry) GetUid() uint32

func (*IndexEntry) IsNil

func (i *IndexEntry) IsNil() bool

IsNil returns if the object is nil.

func (*IndexEntry) MarshalBlock

func (i *IndexEntry) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*IndexEntry) MarshalJSON

func (x *IndexEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the IndexEntry to JSON.

func (*IndexEntry) MarshalProtoJSON

func (x *IndexEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the IndexEntry message to JSON.

func (*IndexEntry) MarshalProtoText

func (x *IndexEntry) MarshalProtoText() string

func (*IndexEntry) MarshalToSizedBufferVT

func (m *IndexEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*IndexEntry) MarshalToVT

func (m *IndexEntry) MarshalToVT(dAtA []byte) (int, error)

func (*IndexEntry) MarshalVT

func (m *IndexEntry) MarshalVT() (dAtA []byte, err error)

func (*IndexEntry) ProtoMessage

func (*IndexEntry) ProtoMessage()

func (*IndexEntry) Reset

func (x *IndexEntry) Reset()

func (*IndexEntry) SizeVT

func (m *IndexEntry) SizeVT() (n int)

func (*IndexEntry) String

func (x *IndexEntry) String() string

func (*IndexEntry) UnmarshalBlock

func (i *IndexEntry) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*IndexEntry) UnmarshalJSON

func (x *IndexEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the IndexEntry from JSON.

func (*IndexEntry) UnmarshalProtoJSON

func (x *IndexEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the IndexEntry message from JSON.

func (*IndexEntry) UnmarshalVT

func (m *IndexEntry) UnmarshalVT(dAtA []byte) error

func (*IndexEntry) Validate

func (i *IndexEntry) Validate() error

Validate performs cursory validation of the IndexEntry.

type ModuleReferencesStore

type ModuleReferencesStore struct {

	// KvtxRoot is the root of the module reference tree.
	// Key: submodule name, value: Submodule object.
	KvtxRoot *block1.KeyValueStore `protobuf:"bytes,1,opt,name=kvtx_root,json=kvtxRoot,proto3" json:"kvtxRoot,omitempty"`
	// contains filtered or unexported fields
}

ModuleReferences maps between submodule name and a block ref to the Repo.

func (*ModuleReferencesStore) ApplySubBlock

func (r *ModuleReferencesStore) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*ModuleReferencesStore) BuildModRefTree

func (r *ModuleReferencesStore) BuildModRefTree(ctx context.Context, bcs *block.Cursor) (kvtx.BlockTx, error)

BuildModRefTree builds the iavl tree.

Bcs should be located at r.

func (*ModuleReferencesStore) CloneMessageVT

func (*ModuleReferencesStore) CloneVT

func (*ModuleReferencesStore) EqualMessageVT

func (this *ModuleReferencesStore) EqualMessageVT(thatMsg any) bool

func (*ModuleReferencesStore) EqualVT

func (this *ModuleReferencesStore) EqualVT(that *ModuleReferencesStore) bool

func (*ModuleReferencesStore) GetKvtxRoot

func (x *ModuleReferencesStore) GetKvtxRoot() *block1.KeyValueStore

func (*ModuleReferencesStore) GetSubBlockCtor

func (r *ModuleReferencesStore) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*ModuleReferencesStore) GetSubBlocks

func (r *ModuleReferencesStore) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*ModuleReferencesStore) IsNil

func (r *ModuleReferencesStore) IsNil() bool

IsNil returns if the object is nil.

func (*ModuleReferencesStore) MarshalBlock

func (r *ModuleReferencesStore) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*ModuleReferencesStore) MarshalJSON

func (x *ModuleReferencesStore) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ModuleReferencesStore to JSON.

func (*ModuleReferencesStore) MarshalProtoJSON

func (x *ModuleReferencesStore) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ModuleReferencesStore message to JSON.

func (*ModuleReferencesStore) MarshalProtoText

func (x *ModuleReferencesStore) MarshalProtoText() string

func (*ModuleReferencesStore) MarshalToSizedBufferVT

func (m *ModuleReferencesStore) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ModuleReferencesStore) MarshalToVT

func (m *ModuleReferencesStore) MarshalToVT(dAtA []byte) (int, error)

func (*ModuleReferencesStore) MarshalVT

func (m *ModuleReferencesStore) MarshalVT() (dAtA []byte, err error)

func (*ModuleReferencesStore) ProtoMessage

func (*ModuleReferencesStore) ProtoMessage()

func (*ModuleReferencesStore) Reset

func (x *ModuleReferencesStore) Reset()

func (*ModuleReferencesStore) SizeVT

func (m *ModuleReferencesStore) SizeVT() (n int)

func (*ModuleReferencesStore) String

func (x *ModuleReferencesStore) String() string

func (*ModuleReferencesStore) UnmarshalBlock

func (r *ModuleReferencesStore) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*ModuleReferencesStore) UnmarshalJSON

func (x *ModuleReferencesStore) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ModuleReferencesStore from JSON.

func (*ModuleReferencesStore) UnmarshalProtoJSON

func (x *ModuleReferencesStore) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ModuleReferencesStore message from JSON.

func (*ModuleReferencesStore) UnmarshalVT

func (m *ModuleReferencesStore) UnmarshalVT(dAtA []byte) error

func (*ModuleReferencesStore) Validate

func (r *ModuleReferencesStore) Validate() error

Validate performs cursory validation of the object.

type Packfile

type Packfile struct {

	// PackHash contains the packfile checksum.
	// Note: currently, this is enforced to hash type SHA1.
	PackHash *hash.Hash `protobuf:"bytes,1,opt,name=pack_hash,json=packHash,proto3" json:"packHash,omitempty"`
	// PackBlob contains the raw Git packfile bytes.
	PackBlob *blob.Blob `protobuf:"bytes,2,opt,name=pack_blob,json=packBlob,proto3" json:"packBlob,omitempty"`
	// IdxBlob contains the Git pack index bytes.
	IdxBlob *blob.Blob `protobuf:"bytes,3,opt,name=idx_blob,json=idxBlob,proto3" json:"idxBlob,omitempty"`
	// ObjectCount is the number of objects in the pack index.
	ObjectCount uint64 `protobuf:"varint,4,opt,name=object_count,json=objectCount,proto3" json:"objectCount,omitempty"`
	// PackSize is the byte size of the packfile.
	PackSize uint64 `protobuf:"varint,5,opt,name=pack_size,json=packSize,proto3" json:"packSize,omitempty"`
	// IdxSize is the byte size of the index file.
	IdxSize uint64 `protobuf:"varint,6,opt,name=idx_size,json=idxSize,proto3" json:"idxSize,omitempty"`
	// contains filtered or unexported fields
}

Packfile contains a Git packfile and its index.

func (*Packfile) ApplySubBlock

func (r *Packfile) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*Packfile) CloneMessageVT

func (m *Packfile) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Packfile) CloneVT

func (m *Packfile) CloneVT() *Packfile

func (*Packfile) EqualMessageVT

func (this *Packfile) EqualMessageVT(thatMsg any) bool

func (*Packfile) EqualVT

func (this *Packfile) EqualVT(that *Packfile) bool

func (*Packfile) FollowIdxBlob

func (r *Packfile) FollowIdxBlob(ctx context.Context, bcs *block.Cursor) (*blob.Blob, *block.Cursor, error)

FollowIdxBlob returns the Git pack index blob.

func (*Packfile) FollowPackBlob

func (r *Packfile) FollowPackBlob(ctx context.Context, bcs *block.Cursor) (*blob.Blob, *block.Cursor, error)

FollowPackBlob returns the raw Git packfile blob.

func (*Packfile) GetIdxBlob

func (x *Packfile) GetIdxBlob() *blob.Blob

func (*Packfile) GetIdxSize

func (x *Packfile) GetIdxSize() uint64

func (*Packfile) GetObjectCount

func (x *Packfile) GetObjectCount() uint64

func (*Packfile) GetPackBlob

func (x *Packfile) GetPackBlob() *blob.Blob

func (*Packfile) GetPackHash

func (x *Packfile) GetPackHash() *hash.Hash

func (*Packfile) GetPackSize

func (x *Packfile) GetPackSize() uint64

func (*Packfile) GetSubBlockCtor

func (r *Packfile) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*Packfile) GetSubBlocks

func (r *Packfile) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*Packfile) MarshalBlock

func (r *Packfile) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*Packfile) MarshalJSON

func (x *Packfile) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Packfile to JSON.

func (*Packfile) MarshalProtoJSON

func (x *Packfile) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Packfile message to JSON.

func (*Packfile) MarshalProtoText

func (x *Packfile) MarshalProtoText() string

func (*Packfile) MarshalToSizedBufferVT

func (m *Packfile) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Packfile) MarshalToVT

func (m *Packfile) MarshalToVT(dAtA []byte) (int, error)

func (*Packfile) MarshalVT

func (m *Packfile) MarshalVT() (dAtA []byte, err error)

func (*Packfile) ProtoMessage

func (*Packfile) ProtoMessage()

func (*Packfile) Reset

func (x *Packfile) Reset()

func (*Packfile) SizeVT

func (m *Packfile) SizeVT() (n int)

func (*Packfile) String

func (x *Packfile) String() string

func (*Packfile) UnmarshalBlock

func (r *Packfile) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*Packfile) UnmarshalJSON

func (x *Packfile) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Packfile from JSON.

func (*Packfile) UnmarshalProtoJSON

func (x *Packfile) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Packfile message from JSON.

func (*Packfile) UnmarshalVT

func (m *Packfile) UnmarshalVT(dAtA []byte) error

func (*Packfile) Validate

func (r *Packfile) Validate() error

Validate performs cursory validation of the Packfile.

type Reference

type Reference struct {

	// Name contains the reference name.
	// Go type: plumbing.ReferenceName
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// ReferenceType contains the reference type.
	// One of: HashReference(1), SymbolicReference(2)
	ReferenceType ReferenceType `protobuf:"varint,2,opt,name=reference_type,json=referenceType,proto3" json:"referenceType,omitempty"`
	// Hash contains the sha1 hash (20 bytes) if hash reference.
	// Note: currently, this is enforced to hash type SHA1.
	Hash *hash.Hash `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	// TargetReferenceName is the target reference name if symbolic.
	TargetReferenceName string `protobuf:"bytes,4,opt,name=target_reference_name,json=targetReferenceName,proto3" json:"targetReferenceName,omitempty"`
	// contains filtered or unexported fields
}

Reference contains a repository reference. Go type: plumbing.Reference

func NewReference

func NewReference(ref *plumbing.Reference) (*Reference, error)

NewReference constructs a new repo ref.

func (*Reference) CloneMessageVT

func (m *Reference) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Reference) CloneVT

func (m *Reference) CloneVT() *Reference

func (*Reference) EqualMessageVT

func (this *Reference) EqualMessageVT(thatMsg any) bool

func (*Reference) EqualVT

func (this *Reference) EqualVT(that *Reference) bool

func (*Reference) GetHash

func (x *Reference) GetHash() *hash.Hash

func (*Reference) GetName

func (x *Reference) GetName() string

func (*Reference) GetReferenceType

func (x *Reference) GetReferenceType() ReferenceType

func (*Reference) GetTargetReferenceName

func (x *Reference) GetTargetReferenceName() string

func (*Reference) IsNil

func (r *Reference) IsNil() bool

IsNil returns if the object is nil.

func (*Reference) MarshalBlock

func (r *Reference) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*Reference) MarshalJSON

func (x *Reference) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Reference to JSON.

func (*Reference) MarshalProtoJSON

func (x *Reference) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Reference message to JSON.

func (*Reference) MarshalProtoText

func (x *Reference) MarshalProtoText() string

func (*Reference) MarshalToSizedBufferVT

func (m *Reference) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Reference) MarshalToVT

func (m *Reference) MarshalToVT(dAtA []byte) (int, error)

func (*Reference) MarshalVT

func (m *Reference) MarshalVT() (dAtA []byte, err error)

func (*Reference) ProtoMessage

func (*Reference) ProtoMessage()

func (*Reference) Reset

func (x *Reference) Reset()

func (*Reference) SizeVT

func (m *Reference) SizeVT() (n int)

func (*Reference) String

func (x *Reference) String() string

func (*Reference) ToReference

func (r *Reference) ToReference() (*plumbing.Reference, error)

ToReference converts to a plumbing reference.

func (*Reference) UnmarshalBlock

func (r *Reference) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*Reference) UnmarshalJSON

func (x *Reference) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Reference from JSON.

func (*Reference) UnmarshalProtoJSON

func (x *Reference) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Reference message from JSON.

func (*Reference) UnmarshalVT

func (m *Reference) UnmarshalVT(dAtA []byte) error

func (*Reference) Validate

func (r *Reference) Validate() error

Validate checks the reference.

type ReferenceIter

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

ReferenceIter iterates over the reference storage.

func NewReferenceIter

func NewReferenceIter(r *Store, it kvtx.BlockIterator) *ReferenceIter

NewReferenceIter constructs the iterator from a iavl iterator.

func (*ReferenceIter) Close

func (i *ReferenceIter) Close()

Close closes the iterator.

func (*ReferenceIter) ForEach

func (i *ReferenceIter) ForEach(cb func(*plumbing.Reference) error) error

ForEach calls the function for each element in the iterator.

func (*ReferenceIter) Next

func (i *ReferenceIter) Next() (*plumbing.Reference, error)

Next advances the iterator.

type ReferenceStore

type ReferenceStore interface {
	// SetReference sets the reference.
	//
	// returns set, error. if !set, will use default store logic.
	SetReference(ref *plumbing.Reference) (set bool, err error)
	// GetReference returns the reference by name.
	//
	// if nil, nil is returned, uses default store logic.
	GetReference(ref plumbing.ReferenceName) (*plumbing.Reference, error)
	// GetSubmoduleStore returns the refs store for a submodule.
	//
	// Can return nil, nil to indicate none.
	GetSubmoduleStore(name string) (ReferenceStore, error)
	// ClearSubmoduleStore is called if a submodule is deleted.
	//
	// should not return an error if not found.
	ClearSubmoduleStore(name string) error
}

ReferenceStore stores and retrieves references, overriding the default store.

type ReferenceType

type ReferenceType int32

ReferenceType are the types of reference objects. Note: the values match the Git reference type values.

const (
	ReferenceType_ReferenceType_INVALID  ReferenceType = 0
	ReferenceType_ReferenceType_HASH     ReferenceType = 1
	ReferenceType_ReferenceType_SYMBOLIC ReferenceType = 2
)

func NewReferenceType

func NewReferenceType(ot plumbing.ReferenceType) ReferenceType

NewReferenceType constructs the ReferenceType from plumbing type.

func (ReferenceType) Enum

func (x ReferenceType) Enum() *ReferenceType

func (ReferenceType) MarshalJSON

func (x ReferenceType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ReferenceType to JSON.

func (ReferenceType) MarshalProtoJSON

func (x ReferenceType) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ReferenceType to JSON.

func (ReferenceType) MarshalProtoText

func (x ReferenceType) MarshalProtoText() string

func (ReferenceType) MarshalText

func (x ReferenceType) MarshalText() ([]byte, error)

MarshalText marshals the ReferenceType to text.

func (ReferenceType) String

func (x ReferenceType) String() string

func (ReferenceType) ToReferenceType

func (t ReferenceType) ToReferenceType() plumbing.ReferenceType

ToReferenceType converts the ReferenceType to a ReferenceType.

func (*ReferenceType) UnmarshalJSON

func (x *ReferenceType) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ReferenceType from JSON.

func (*ReferenceType) UnmarshalProtoJSON

func (x *ReferenceType) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ReferenceType from JSON.

func (*ReferenceType) UnmarshalText

func (x *ReferenceType) UnmarshalText(b []byte) error

UnmarshalText unmarshals the ReferenceType from text.

type ReferencesStore

type ReferencesStore struct {

	// KvtxRoot is the root of the reference tree.
	// Contains value type Reference.
	KvtxRoot *block1.KeyValueStore `protobuf:"bytes,1,opt,name=kvtx_root,json=kvtxRoot,proto3" json:"kvtxRoot,omitempty"`
	// contains filtered or unexported fields
}

ReferencesStore maps between ReferenceName and Reference.

func (*ReferencesStore) ApplySubBlock

func (r *ReferencesStore) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*ReferencesStore) BuildRefTree

func (r *ReferencesStore) BuildRefTree(ctx context.Context, bcs *block.Cursor) (kvtx.BlockTx, error)

BuildRefTree builds the iavl tree.

Bcs should be located at r.

func (*ReferencesStore) CloneMessageVT

func (m *ReferencesStore) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ReferencesStore) CloneVT

func (m *ReferencesStore) CloneVT() *ReferencesStore

func (*ReferencesStore) EqualMessageVT

func (this *ReferencesStore) EqualMessageVT(thatMsg any) bool

func (*ReferencesStore) EqualVT

func (this *ReferencesStore) EqualVT(that *ReferencesStore) bool

func (*ReferencesStore) GetKvtxRoot

func (x *ReferencesStore) GetKvtxRoot() *block1.KeyValueStore

func (*ReferencesStore) GetSubBlockCtor

func (r *ReferencesStore) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*ReferencesStore) GetSubBlocks

func (r *ReferencesStore) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*ReferencesStore) IsNil

func (r *ReferencesStore) IsNil() bool

IsNil returns if the object is nil.

func (*ReferencesStore) MarshalBlock

func (r *ReferencesStore) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*ReferencesStore) MarshalJSON

func (x *ReferencesStore) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ReferencesStore to JSON.

func (*ReferencesStore) MarshalProtoJSON

func (x *ReferencesStore) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ReferencesStore message to JSON.

func (*ReferencesStore) MarshalProtoText

func (x *ReferencesStore) MarshalProtoText() string

func (*ReferencesStore) MarshalToSizedBufferVT

func (m *ReferencesStore) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ReferencesStore) MarshalToVT

func (m *ReferencesStore) MarshalToVT(dAtA []byte) (int, error)

func (*ReferencesStore) MarshalVT

func (m *ReferencesStore) MarshalVT() (dAtA []byte, err error)

func (*ReferencesStore) ProtoMessage

func (*ReferencesStore) ProtoMessage()

func (*ReferencesStore) Reset

func (x *ReferencesStore) Reset()

func (*ReferencesStore) SizeVT

func (m *ReferencesStore) SizeVT() (n int)

func (*ReferencesStore) String

func (x *ReferencesStore) String() string

func (*ReferencesStore) UnmarshalBlock

func (r *ReferencesStore) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*ReferencesStore) UnmarshalJSON

func (x *ReferencesStore) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ReferencesStore from JSON.

func (*ReferencesStore) UnmarshalProtoJSON

func (x *ReferencesStore) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ReferencesStore message from JSON.

func (*ReferencesStore) UnmarshalVT

func (m *ReferencesStore) UnmarshalVT(dAtA []byte) error

func (*ReferencesStore) Validate

func (r *ReferencesStore) Validate() error

Validate performs cursory validation of the object.

type Repo

type Repo struct {

	// ReferencesStore contains the named references store.
	ReferencesStore *ReferencesStore `protobuf:"bytes,1,opt,name=references_store,json=referencesStore,proto3" json:"referencesStore,omitempty"`
	// ModuleReferencesStore contains the named submodules store.
	ModuleReferencesStore *ModuleReferencesStore `protobuf:"bytes,2,opt,name=module_references_store,json=moduleReferencesStore,proto3" json:"moduleReferencesStore,omitempty"`
	// EncodedObjectStore contains the encoded objects tree.
	EncodedObjectStore *EncodedObjectStore `protobuf:"bytes,3,opt,name=encoded_object_store,json=encodedObjectStore,proto3" json:"encodedObjectStore,omitempty"`
	// ShallowRefsStoreRef contains the list of shallow refs.
	ShallowRefsStoreRef *block.BlockRef `protobuf:"bytes,4,opt,name=shallow_refs_store_ref,json=shallowRefsStoreRef,proto3" json:"shallowRefsStoreRef,omitempty"`
	// GitConfig contains the git configuration marshaled in Git format.
	// Some fields are always dropped, and repo is always marked as bare.
	GitConfig string `protobuf:"bytes,5,opt,name=git_config,json=gitConfig,proto3" json:"gitConfig,omitempty"`
	// contains filtered or unexported fields
}

Repo contains a Git repository. Changes are transactional and deterministic.

func NewRepo

func NewRepo() *Repo

NewRepo constructs a new repo with default settings.

func UnmarshalRepo

func UnmarshalRepo(ctx context.Context, bcs *block.Cursor) (*Repo, error)

UnmarshalRepo unmarshals a repo from a cursor. If empty, returns nil, nil

func (*Repo) ApplyBlockRef

func (r *Repo) ApplyBlockRef(id uint32, ptr *block.BlockRef) error

ApplyBlockRef applies a ref change with a field id. The reference may be nil if the child block is nil.

func (*Repo) ApplySubBlock

func (r *Repo) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*Repo) CloneMessageVT

func (m *Repo) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Repo) CloneVT

func (m *Repo) CloneVT() *Repo

func (*Repo) EqualMessageVT

func (this *Repo) EqualMessageVT(thatMsg any) bool

func (*Repo) EqualVT

func (this *Repo) EqualVT(that *Repo) bool

func (*Repo) FollowEncodedObjectStore

func (r *Repo) FollowEncodedObjectStore(ctx context.Context, bcs *block.Cursor) (*EncodedObjectStore, *block.Cursor, error)

FollowEncodedObjectStore returns the encoded object store sub-block.

func (*Repo) FollowModuleReferencesStore

func (r *Repo) FollowModuleReferencesStore(ctx context.Context, bcs *block.Cursor) (*ModuleReferencesStore, *block.Cursor, error)

FollowModuleReferencesStore returns the submodule references sub-block.

func (*Repo) FollowReferencesStore

func (r *Repo) FollowReferencesStore(ctx context.Context, bcs *block.Cursor) (*ReferencesStore, *block.Cursor, error)

FollowReferencesStore returns the repo references sub-block.

func (*Repo) FollowShallowRefsStore

func (r *Repo) FollowShallowRefsStore(ctx context.Context, bcs *block.Cursor) (*ShallowRefsStore, *block.Cursor, error)

FollowShallowRefsStore returns the shallow refs store block.

func (*Repo) GetBlockRefCtor

func (r *Repo) GetBlockRefCtor(id uint32) block.Ctor

GetBlockRefCtor returns the constructor for the block at the ref id. Return nil to indicate invalid ref ID or unknown.

func (*Repo) GetBlockRefs

func (r *Repo) GetBlockRefs() (map[uint32]*block.BlockRef, error)

GetBlockRefs returns all block references by ID. May return nil, and values may also be nil. Note: this does not include pending references (in a cursor)

func (*Repo) GetEncodedObjectStore

func (x *Repo) GetEncodedObjectStore() *EncodedObjectStore

func (*Repo) GetGitConfig

func (x *Repo) GetGitConfig() string

func (*Repo) GetModuleReferencesStore

func (x *Repo) GetModuleReferencesStore() *ModuleReferencesStore

func (*Repo) GetReferencesStore

func (x *Repo) GetReferencesStore() *ReferencesStore

func (*Repo) GetShallowRefsStoreRef

func (x *Repo) GetShallowRefsStoreRef() *block.BlockRef

func (*Repo) GetSubBlockCtor

func (r *Repo) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*Repo) GetSubBlocks

func (r *Repo) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*Repo) MarshalBlock

func (r *Repo) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*Repo) MarshalJSON

func (x *Repo) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Repo to JSON.

func (*Repo) MarshalProtoJSON

func (x *Repo) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Repo message to JSON.

func (*Repo) MarshalProtoText

func (x *Repo) MarshalProtoText() string

func (*Repo) MarshalToSizedBufferVT

func (m *Repo) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Repo) MarshalToVT

func (m *Repo) MarshalToVT(dAtA []byte) (int, error)

func (*Repo) MarshalVT

func (m *Repo) MarshalVT() (dAtA []byte, err error)

func (*Repo) ProtoMessage

func (*Repo) ProtoMessage()

func (*Repo) Reset

func (x *Repo) Reset()

func (*Repo) SizeVT

func (m *Repo) SizeVT() (n int)

func (*Repo) String

func (x *Repo) String() string

func (*Repo) UnmarshalBlock

func (r *Repo) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*Repo) UnmarshalJSON

func (x *Repo) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Repo from JSON.

func (*Repo) UnmarshalProtoJSON

func (x *Repo) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Repo message from JSON.

func (*Repo) UnmarshalVT

func (m *Repo) UnmarshalVT(dAtA []byte) error

func (*Repo) Validate

func (r *Repo) Validate() error

Validate performs cursory checks on the repo block.

type ResolveUndo

type ResolveUndo struct {

	// Entries is the list of resolve undo entries.
	Entries []*ResolveUndoEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

ResolveUndo is used when a conflict is resolved (e.g. with "git add path"), these higher stage entries are removed and a stage-0 entry with proper resolution is added. When these higher stage entries are removed, they are saved in the resolve undo extension.

func NewResolveUndo

func NewResolveUndo(u *index.ResolveUndo) (*ResolveUndo, error)

NewResolveUndo constructs a new resolve undo block from the git block.

func (*ResolveUndo) ApplySubBlock

func (i *ResolveUndo) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*ResolveUndo) CloneMessageVT

func (m *ResolveUndo) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ResolveUndo) CloneVT

func (m *ResolveUndo) CloneVT() *ResolveUndo

func (*ResolveUndo) EqualMessageVT

func (this *ResolveUndo) EqualMessageVT(thatMsg any) bool

func (*ResolveUndo) EqualVT

func (this *ResolveUndo) EqualVT(that *ResolveUndo) bool

func (*ResolveUndo) GetEntries

func (x *ResolveUndo) GetEntries() []*ResolveUndoEntry

func (*ResolveUndo) GetSubBlockCtor

func (i *ResolveUndo) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*ResolveUndo) GetSubBlocks

func (i *ResolveUndo) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*ResolveUndo) IsNil

func (i *ResolveUndo) IsNil() bool

IsNil returns if the object is nil.

func (*ResolveUndo) MarshalBlock

func (i *ResolveUndo) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*ResolveUndo) MarshalJSON

func (x *ResolveUndo) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResolveUndo to JSON.

func (*ResolveUndo) MarshalProtoJSON

func (x *ResolveUndo) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResolveUndo message to JSON.

func (*ResolveUndo) MarshalProtoText

func (x *ResolveUndo) MarshalProtoText() string

func (*ResolveUndo) MarshalToSizedBufferVT

func (m *ResolveUndo) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResolveUndo) MarshalToVT

func (m *ResolveUndo) MarshalToVT(dAtA []byte) (int, error)

func (*ResolveUndo) MarshalVT

func (m *ResolveUndo) MarshalVT() (dAtA []byte, err error)

func (*ResolveUndo) ProtoMessage

func (*ResolveUndo) ProtoMessage()

func (*ResolveUndo) Reset

func (x *ResolveUndo) Reset()

func (*ResolveUndo) SizeVT

func (m *ResolveUndo) SizeVT() (n int)

func (*ResolveUndo) String

func (x *ResolveUndo) String() string

func (*ResolveUndo) ToGitResolveUndo

func (i *ResolveUndo) ToGitResolveUndo() (*index.ResolveUndo, error)

ToGitResolveUndo converts to a git resolve undo block.

func (*ResolveUndo) UnmarshalBlock

func (i *ResolveUndo) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*ResolveUndo) UnmarshalJSON

func (x *ResolveUndo) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResolveUndo from JSON.

func (*ResolveUndo) UnmarshalProtoJSON

func (x *ResolveUndo) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResolveUndo message from JSON.

func (*ResolveUndo) UnmarshalVT

func (m *ResolveUndo) UnmarshalVT(dAtA []byte) error

type ResolveUndoEntry

type ResolveUndoEntry struct {

	// Path is the path within the parent directory.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// Stages are the merge conflict stages.
	Stages map[uint32]*hash.Hash `` /* 154-byte string literal not displayed */
	// contains filtered or unexported fields
}

ResolveUndoEntry contains the information about a conflict when is resolved.

func NewResolveUndoEntry

func NewResolveUndoEntry(e *index.ResolveUndoEntry) (*ResolveUndoEntry, error)

NewResolveUndoEntry constructs a new resolve undo entry.

func (*ResolveUndoEntry) ApplySubBlock

func (e *ResolveUndoEntry) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*ResolveUndoEntry) CloneMessageVT

func (m *ResolveUndoEntry) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ResolveUndoEntry) CloneVT

func (m *ResolveUndoEntry) CloneVT() *ResolveUndoEntry

func (*ResolveUndoEntry) EqualMessageVT

func (this *ResolveUndoEntry) EqualMessageVT(thatMsg any) bool

func (*ResolveUndoEntry) EqualVT

func (this *ResolveUndoEntry) EqualVT(that *ResolveUndoEntry) bool

func (*ResolveUndoEntry) GetPath

func (x *ResolveUndoEntry) GetPath() string

func (*ResolveUndoEntry) GetStages

func (x *ResolveUndoEntry) GetStages() map[uint32]*hash.Hash

func (*ResolveUndoEntry) GetSubBlockCtor

func (e *ResolveUndoEntry) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*ResolveUndoEntry) GetSubBlocks

func (e *ResolveUndoEntry) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*ResolveUndoEntry) IsNil

func (e *ResolveUndoEntry) IsNil() bool

IsNil returns if the object is nil.

func (*ResolveUndoEntry) MarshalBlock

func (e *ResolveUndoEntry) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*ResolveUndoEntry) MarshalJSON

func (x *ResolveUndoEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResolveUndoEntry to JSON.

func (*ResolveUndoEntry) MarshalProtoJSON

func (x *ResolveUndoEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResolveUndoEntry message to JSON.

func (*ResolveUndoEntry) MarshalProtoText

func (x *ResolveUndoEntry) MarshalProtoText() string

func (*ResolveUndoEntry) MarshalToSizedBufferVT

func (m *ResolveUndoEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ResolveUndoEntry) MarshalToVT

func (m *ResolveUndoEntry) MarshalToVT(dAtA []byte) (int, error)

func (*ResolveUndoEntry) MarshalVT

func (m *ResolveUndoEntry) MarshalVT() (dAtA []byte, err error)

func (*ResolveUndoEntry) ProtoMessage

func (*ResolveUndoEntry) ProtoMessage()

func (*ResolveUndoEntry) Reset

func (x *ResolveUndoEntry) Reset()

func (*ResolveUndoEntry) SizeVT

func (m *ResolveUndoEntry) SizeVT() (n int)

func (*ResolveUndoEntry) String

func (x *ResolveUndoEntry) String() string

func (*ResolveUndoEntry) UnmarshalBlock

func (e *ResolveUndoEntry) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*ResolveUndoEntry) UnmarshalJSON

func (x *ResolveUndoEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResolveUndoEntry from JSON.

func (*ResolveUndoEntry) UnmarshalProtoJSON

func (x *ResolveUndoEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResolveUndoEntry message from JSON.

func (*ResolveUndoEntry) UnmarshalVT

func (m *ResolveUndoEntry) UnmarshalVT(dAtA []byte) error

type ResolveUndoEntry_StagesEntry

type ResolveUndoEntry_StagesEntry struct {
	Key   uint32     `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
	Value *hash.Hash `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ResolveUndoEntry_StagesEntry) GetKey

func (*ResolveUndoEntry_StagesEntry) GetValue

func (x *ResolveUndoEntry_StagesEntry) GetValue() *hash.Hash

func (*ResolveUndoEntry_StagesEntry) MarshalJSON

func (x *ResolveUndoEntry_StagesEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ResolveUndoEntry_StagesEntry to JSON.

func (*ResolveUndoEntry_StagesEntry) MarshalProtoJSON

func (x *ResolveUndoEntry_StagesEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ResolveUndoEntry_StagesEntry message to JSON.

func (*ResolveUndoEntry_StagesEntry) MarshalProtoText

func (x *ResolveUndoEntry_StagesEntry) MarshalProtoText() string

func (*ResolveUndoEntry_StagesEntry) ProtoMessage

func (*ResolveUndoEntry_StagesEntry) ProtoMessage()

func (*ResolveUndoEntry_StagesEntry) Reset

func (x *ResolveUndoEntry_StagesEntry) Reset()

func (*ResolveUndoEntry_StagesEntry) String

func (*ResolveUndoEntry_StagesEntry) UnmarshalJSON

func (x *ResolveUndoEntry_StagesEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ResolveUndoEntry_StagesEntry from JSON.

func (*ResolveUndoEntry_StagesEntry) UnmarshalProtoJSON

func (x *ResolveUndoEntry_StagesEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ResolveUndoEntry_StagesEntry message from JSON.

type ShallowRefsStore

type ShallowRefsStore struct {

	// ShallowRefs contains the list of shallow reference hashes.
	ShallowRefs []*hash.Hash `protobuf:"bytes,1,rep,name=shallow_refs,json=shallowRefs,proto3" json:"shallowRefs,omitempty"`
	// contains filtered or unexported fields
}

ShallowRefsStore contains the list of shallow refs.

func NewShallowRefsStore

func NewShallowRefsStore(hashes []plumbing.Hash) (*ShallowRefsStore, error)

NewShallowRefsStore constructs a shallow refs store from a list of hashes.

func (*ShallowRefsStore) CloneMessageVT

func (m *ShallowRefsStore) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ShallowRefsStore) CloneVT

func (m *ShallowRefsStore) CloneVT() *ShallowRefsStore

func (*ShallowRefsStore) EqualMessageVT

func (this *ShallowRefsStore) EqualMessageVT(thatMsg any) bool

func (*ShallowRefsStore) EqualVT

func (this *ShallowRefsStore) EqualVT(that *ShallowRefsStore) bool

func (*ShallowRefsStore) GetShallowRefs

func (x *ShallowRefsStore) GetShallowRefs() []*hash.Hash

func (*ShallowRefsStore) MarshalBlock

func (r *ShallowRefsStore) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*ShallowRefsStore) MarshalJSON

func (x *ShallowRefsStore) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ShallowRefsStore to JSON.

func (*ShallowRefsStore) MarshalProtoJSON

func (x *ShallowRefsStore) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ShallowRefsStore message to JSON.

func (*ShallowRefsStore) MarshalProtoText

func (x *ShallowRefsStore) MarshalProtoText() string

func (*ShallowRefsStore) MarshalToSizedBufferVT

func (m *ShallowRefsStore) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ShallowRefsStore) MarshalToVT

func (m *ShallowRefsStore) MarshalToVT(dAtA []byte) (int, error)

func (*ShallowRefsStore) MarshalVT

func (m *ShallowRefsStore) MarshalVT() (dAtA []byte, err error)

func (*ShallowRefsStore) ProtoMessage

func (*ShallowRefsStore) ProtoMessage()

func (*ShallowRefsStore) Reset

func (x *ShallowRefsStore) Reset()

func (*ShallowRefsStore) SizeVT

func (m *ShallowRefsStore) SizeVT() (n int)

func (*ShallowRefsStore) String

func (x *ShallowRefsStore) String() string

func (*ShallowRefsStore) UnmarshalBlock

func (r *ShallowRefsStore) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*ShallowRefsStore) UnmarshalJSON

func (x *ShallowRefsStore) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ShallowRefsStore from JSON.

func (*ShallowRefsStore) UnmarshalProtoJSON

func (x *ShallowRefsStore) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ShallowRefsStore message from JSON.

func (*ShallowRefsStore) UnmarshalVT

func (m *ShallowRefsStore) UnmarshalVT(dAtA []byte) error

type StagesMap

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

StagesMap is a sub-block representing a map from Stage to hash.

func NewStagesMap

func NewStagesMap(v *map[uint32]*hash.Hash) *StagesMap

NewStagesMap constructs a new StagesMap sub-block.

func (*StagesMap) ApplySubBlock

func (m *StagesMap) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*StagesMap) GetSubBlockCtor

func (m *StagesMap) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*StagesMap) GetSubBlocks

func (m *StagesMap) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*StagesMap) IsNil

func (m *StagesMap) IsNil() bool

IsNil returns if the object is nil.

type Store

type Store struct {
	storer.IndexStorer
	// contains filtered or unexported fields
}

Store contains a open handle to a git repository.

func NewStore

func NewStore(
	ctx context.Context,
	btx *block.Transaction,
	bcs *block.Cursor,
	indexStore storer.IndexStorer,
	refStore ReferenceStore,
) (*Store, error)

NewStore constructs a new repo handle. btx can be nil to indicate a read-only tree. bcs is located at the root of the repo (the Repo block). refStore can be nil

func (*Store) AddAlternate

func (r *Store) AddAlternate(remote string) error

AddAlternate adds an alternate remote.

func (*Store) CheckAndSetReference

func (r *Store) CheckAndSetReference(new, old *plumbing.Reference) error

CheckAndSetReference sets the reference `new`, but if `old` is not `nil`, it first checks that the current stored value for `old.Name()` matches the given reference value in `old`. If not, it returns an error and doesn't update `new`.

func (*Store) Close

func (r *Store) Close() error

Close closes the store, canceling the context.

func (*Store) Commit

func (r *Store) Commit() error

Commit commits the current pending changes to the block transaction. When btx is nil (cursor owned by external transaction), Commit still builds IAVL trees from bulk-written objects on the cursor. The caller is responsible for writing the external transaction.

func (*Store) Config

func (r *Store) Config() (*config.Config, error)

Config parses and returns the Git config associated with the repo.

func (*Store) CountLooseRefs

func (r *Store) CountLooseRefs() (int, error)

CountLooseRefs counts refs without any parent ref.

func (*Store) DeleteOldObjectPackAndIndex

func (r *Store) DeleteOldObjectPackAndIndex(ph plumbing.Hash, t time.Time) error

DeleteOldObjectPackAndIndex deletes an object pack and index if old enough.

func (*Store) EncodedObject

func (r *Store) EncodedObject(ot plumbing.ObjectType, oh plumbing.Hash) (plumbing.EncodedObject, error)

EncodedObject gets an object by hash with the given plumbing.ObjectType. Implementors should return (nil, plumbing.ErrObjectNotFound) if an object doesn't exist with both the given hash and object type.

Valid plumbing.ObjectType values are CommitObject, BlobObject, TagObject, TreeObject and AnyObject. If plumbing.AnyObject is given, the object must be looked up regardless of its type.

func (*Store) EncodedObjectByHash

func (r *Store) EncodedObjectByHash(ph plumbing.Hash) (plumbing.EncodedObject, error)

EncodedObjectByHash looks up an encoded object by hash only. Returns plumbing.ErrObjectNotFound if not found.

func (*Store) EncodedObjectSize

func (r *Store) EncodedObjectSize(ph plumbing.Hash) (int64, error)

EncodedObjectSize returns the plaintext size of the encoded object.

func (*Store) GetCursor

func (r *Store) GetCursor() *block.Cursor

GetCursor returns the underlying root cursor.

func (*Store) GetReadOnly

func (r *Store) GetReadOnly() bool

GetReadOnly returns if the state is read-only.

func (*Store) GetRef

func (r *Store) GetRef() *block.BlockRef

GetRef returns the root reference.

func (*Store) GetRoot

func (r *Store) GetRoot() *Repo

GetRoot returns the root object. Note: this should be treated as read-only.

func (*Store) HasEncodedObject

func (r *Store) HasEncodedObject(ph plumbing.Hash) error

HasEncodedObject returns ErrObjNotFound if the object doesn't exist. If the object does exist, it returns nil.

func (*Store) IterEncodedObjects

func (r *Store) IterEncodedObjects(ph plumbing.ObjectType) (storer.EncodedObjectIter, error)

IterObjects returns a custom EncodedObjectStorer over all the object on the storage.

Valid plumbing.ObjectType values are CommitObject, BlobObject, TagObject,

func (*Store) IterReferences

func (r *Store) IterReferences() (storer.ReferenceIter, error)

IterReferences iterates over references.

func (*Store) LookupSubmodule

func (r *Store) LookupSubmodule(name string) (*Submodule, *block.Cursor, error)

LookupSubmodule looks up module reference by name. Returns nil, nil, nil if not found.

func (*Store) Module

func (r *Store) Module(name string) (storage.Storer, error)

Module returns a Storer representing a submodule, if not exists returns a new empty Storer is returned

func (*Store) NewEncodedObject

func (r *Store) NewEncodedObject() plumbing.EncodedObject

NewEncodedObject returns a new plumbing.EncodedObject, the real type of the object can be a custom implementation or the default one, plumbing.MemoryObject.

func (*Store) ObjectPacks

func (r *Store) ObjectPacks() ([]plumbing.Hash, error)

ObjectPacks returns hashes of object packs in this store.

func (*Store) PackRefs

func (r *Store) PackRefs() error

PackRefs packs references.

func (*Store) PackfileWriter

func (r *Store) PackfileWriter() (io.WriteCloser, error)

PackfileWriter returns a writer for preserving an incoming Git packfile.

func (*Store) RawObjectWriter

func (r *Store) RawObjectWriter(typ plumbing.ObjectType, sz int64) (io.WriteCloser, error)

RawObjectWriter returns a writer for writing a raw object.

func (*Store) Reference

func (r *Store) Reference(ref plumbing.ReferenceName) (*plumbing.Reference, error)

Reference returns the reference by name.

func (*Store) RemoveReference

func (r *Store) RemoveReference(ref plumbing.ReferenceName) error

RemoveReference removes a reference from the storage.

func (*Store) SetConfig

func (r *Store) SetConfig(c *config.Config) error

SetConfig marshals and sets the Git config associated with the repo.

func (*Store) SetEncodedObject

func (r *Store) SetEncodedObject(eoi plumbing.EncodedObject) (plumbing.Hash, error)

SetEncodedObject saves an object into the storage.

func (*Store) SetModuleReference

func (r *Store) SetModuleReference(name string, bcs *block.Cursor) error

SetModuleReference sets the module reference to the Repo rooted at bcs.

func (*Store) SetReference

func (r *Store) SetReference(ref *plumbing.Reference) error

SetReference sets the reference in the block graph.

func (*Store) SetShallow

func (r *Store) SetShallow(refs []plumbing.Hash) error

SetShallow sets the list of shallow refs.

func (*Store) Shallow

func (r *Store) Shallow() ([]plumbing.Hash, error)

Shallow returns the list of shallow refs.

type StoreEncodedObject

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

StoreEncodedObject is an encoded object attached to a store.

func NewStoreEncodedObject

func NewStoreEncodedObject(r *Store, bcs *block.Cursor) *StoreEncodedObject

NewStoreEncodedObject constructs a new StoreEncodedObject. if bcs is nil, indicates the ref has not been committed.

func (*StoreEncodedObject) Hash

func (o *StoreEncodedObject) Hash() plumbing.Hash

Hash returns the hash of the encoded object. Returns empty hash if any errors.

func (*StoreEncodedObject) Reader

func (o *StoreEncodedObject) Reader() (io.ReadCloser, error)

Reader returns the data reader.

func (*StoreEncodedObject) SetSize

func (o *StoreEncodedObject) SetSize(s int64)

SetSize sets the total expected size of the object data.

func (*StoreEncodedObject) SetType

func (o *StoreEncodedObject) SetType(ot plumbing.ObjectType)

SetType sets the git object type.

func (*StoreEncodedObject) Size

func (o *StoreEncodedObject) Size() int64

Size returns the size of the encoded object. Note: this is the size of the stored data, not the block graph.

func (*StoreEncodedObject) StoreHash

func (o *StoreEncodedObject) StoreHash() (*hash.Hash, error)

StoreHash returns the hash of the encoded object in storage format.

func (*StoreEncodedObject) Type

Type returns the Git object type

func (*StoreEncodedObject) Writer

func (o *StoreEncodedObject) Writer() (io.WriteCloser, error)

Writer returns the data writer.

type Submodule

type Submodule struct {

	// Name is the name of the submodule.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// RepoRef is the reference to the Repo object.
	RepoRef *block.BlockRef `protobuf:"bytes,2,opt,name=repo_ref,json=repoRef,proto3" json:"repoRef,omitempty"`
	// contains filtered or unexported fields
}

Submodule contains a sub-module reference.

func NewSubmodule

func NewSubmodule(name string, ref *block.BlockRef) *Submodule

NewSubmodule constructs a new submodule ref.

func (*Submodule) ApplyBlockRef

func (r *Submodule) ApplyBlockRef(id uint32, ptr *block.BlockRef) error

ApplyBlockRef applies a ref change with a field id. The reference may be nil if the child block is nil.

func (*Submodule) CloneMessageVT

func (m *Submodule) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Submodule) CloneVT

func (m *Submodule) CloneVT() *Submodule

func (*Submodule) EqualMessageVT

func (this *Submodule) EqualMessageVT(thatMsg any) bool

func (*Submodule) EqualVT

func (this *Submodule) EqualVT(that *Submodule) bool

func (*Submodule) GetBlockRefCtor

func (r *Submodule) GetBlockRefCtor(id uint32) block.Ctor

GetBlockRefCtor returns the constructor for the block at the ref id. Return nil to indicate invalid ref ID or unknown.

func (*Submodule) GetBlockRefs

func (r *Submodule) GetBlockRefs() (map[uint32]*block.BlockRef, error)

GetBlockRefs returns all block references by ID. May return nil, and values may also be nil. Note: this does not include pending references (in a cursor)

func (*Submodule) GetName

func (x *Submodule) GetName() string

func (*Submodule) GetRepoRef

func (x *Submodule) GetRepoRef() *block.BlockRef

func (*Submodule) IsNil

func (r *Submodule) IsNil() bool

IsNil returns if the object is nil.

func (*Submodule) MarshalBlock

func (r *Submodule) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*Submodule) MarshalJSON

func (x *Submodule) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Submodule to JSON.

func (*Submodule) MarshalProtoJSON

func (x *Submodule) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Submodule message to JSON.

func (*Submodule) MarshalProtoText

func (x *Submodule) MarshalProtoText() string

func (*Submodule) MarshalToSizedBufferVT

func (m *Submodule) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Submodule) MarshalToVT

func (m *Submodule) MarshalToVT(dAtA []byte) (int, error)

func (*Submodule) MarshalVT

func (m *Submodule) MarshalVT() (dAtA []byte, err error)

func (*Submodule) ProtoMessage

func (*Submodule) ProtoMessage()

func (*Submodule) Reset

func (x *Submodule) Reset()

func (*Submodule) SizeVT

func (m *Submodule) SizeVT() (n int)

func (*Submodule) String

func (x *Submodule) String() string

func (*Submodule) UnmarshalBlock

func (r *Submodule) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*Submodule) UnmarshalJSON

func (x *Submodule) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Submodule from JSON.

func (*Submodule) UnmarshalProtoJSON

func (x *Submodule) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Submodule message from JSON.

func (*Submodule) UnmarshalVT

func (m *Submodule) UnmarshalVT(dAtA []byte) error

func (*Submodule) Validate

func (r *Submodule) Validate() error

Validate checks the reference.

type TagMode

type TagMode int32

TagMode is the available modes for fetching tags.

const (
	// TagMode_DEFAULT indicates to use default tag mode.
	// Default is to fetch ALL.
	TagMode_TagMode_DEFAULT TagMode = 0
	// TagMode_NONE fetches no tags from the remote.
	TagMode_TagMode_NONE TagMode = 1
	// TagMode_ALL fetches all tags from the remote.
	TagMode_TagMode_ALL TagMode = 2
	// TagMode_FOLLOWING fetches only tags that refer to commits being cloned.
	TagMode_TagMode_FOLLOWING TagMode = 3
)

func (TagMode) Enum

func (x TagMode) Enum() *TagMode

func (TagMode) MarshalJSON

func (x TagMode) MarshalJSON() ([]byte, error)

MarshalJSON marshals the TagMode to JSON.

func (TagMode) MarshalProtoJSON

func (x TagMode) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the TagMode to JSON.

func (TagMode) MarshalProtoText

func (x TagMode) MarshalProtoText() string

func (TagMode) MarshalText

func (x TagMode) MarshalText() ([]byte, error)

MarshalText marshals the TagMode to text.

func (TagMode) String

func (x TagMode) String() string

func (TagMode) ToGitTagMode

func (t TagMode) ToGitTagMode() plumbing.TagMode

ToGitTagMode converts the tag mode to a git tag mode.

func (*TagMode) UnmarshalJSON

func (x *TagMode) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the TagMode from JSON.

func (*TagMode) UnmarshalProtoJSON

func (x *TagMode) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the TagMode from JSON.

func (*TagMode) UnmarshalText

func (x *TagMode) UnmarshalText(b []byte) error

UnmarshalText unmarshals the TagMode from text.

type Tree

type Tree struct {

	// Entries are entries in the tree.
	Entries []*TreeEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

Tree contains pre-computed hashes for trees that can be derived from the index. It helps speed up tree object generation from index for a new commit.

func NewTree

func NewTree(t *index.Tree) (*Tree, error)

NewTree builds a new tree block from a git tree.

func (*Tree) ApplySubBlock

func (i *Tree) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*Tree) CloneMessageVT

func (m *Tree) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Tree) CloneVT

func (m *Tree) CloneVT() *Tree

func (*Tree) EqualMessageVT

func (this *Tree) EqualMessageVT(thatMsg any) bool

func (*Tree) EqualVT

func (this *Tree) EqualVT(that *Tree) bool

func (*Tree) GetEntries

func (x *Tree) GetEntries() []*TreeEntry

func (*Tree) GetSubBlockCtor

func (i *Tree) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*Tree) GetSubBlocks

func (i *Tree) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*Tree) IsNil

func (i *Tree) IsNil() bool

IsNil returns if the object is nil.

func (*Tree) MarshalBlock

func (i *Tree) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*Tree) MarshalJSON

func (x *Tree) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Tree to JSON.

func (*Tree) MarshalProtoJSON

func (x *Tree) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the Tree message to JSON.

func (*Tree) MarshalProtoText

func (x *Tree) MarshalProtoText() string

func (*Tree) MarshalToSizedBufferVT

func (m *Tree) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Tree) MarshalToVT

func (m *Tree) MarshalToVT(dAtA []byte) (int, error)

func (*Tree) MarshalVT

func (m *Tree) MarshalVT() (dAtA []byte, err error)

func (*Tree) ProtoMessage

func (*Tree) ProtoMessage()

func (*Tree) Reset

func (x *Tree) Reset()

func (*Tree) SizeVT

func (m *Tree) SizeVT() (n int)

func (*Tree) String

func (x *Tree) String() string

func (*Tree) ToGitTree

func (i *Tree) ToGitTree() (*index.Tree, error)

ToGitTree converts to a git tree.

func (*Tree) UnmarshalBlock

func (i *Tree) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*Tree) UnmarshalJSON

func (x *Tree) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Tree from JSON.

func (*Tree) UnmarshalProtoJSON

func (x *Tree) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the Tree message from JSON.

func (*Tree) UnmarshalVT

func (m *Tree) UnmarshalVT(dAtA []byte) error

func (*Tree) Validate

func (i *Tree) Validate() error

Validate performs cursory validation of the tree.

type TreeEntry

type TreeEntry struct {

	// Path is the path within the parent directory.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// Entries is the number of entries in the index that is covered by the tree
	// this entry represents.
	Entries int32 `protobuf:"varint,2,opt,name=entries,proto3" json:"entries,omitempty"`
	// Trees is the number that represents the number of subtrees this tree has.
	Trees int32 `protobuf:"varint,3,opt,name=trees,proto3" json:"trees,omitempty"`
	// Hash is the hash of the object that would result from writing this span of
	// index as a tree. Note: currently this is sha1.
	Hash *hash.Hash `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

TreeEntry is an entry in the tree.

func NewTreeEntry

func NewTreeEntry(t *index.TreeEntry) (*TreeEntry, error)

NewTreeEntry constructs a new tree entry from a git tree entry.

func (*TreeEntry) ApplySubBlock

func (i *TreeEntry) ApplySubBlock(id uint32, next block.SubBlock) error

ApplySubBlock applies a sub-block change with a field id.

func (*TreeEntry) CloneMessageVT

func (m *TreeEntry) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*TreeEntry) CloneVT

func (m *TreeEntry) CloneVT() *TreeEntry

func (*TreeEntry) EqualMessageVT

func (this *TreeEntry) EqualMessageVT(thatMsg any) bool

func (*TreeEntry) EqualVT

func (this *TreeEntry) EqualVT(that *TreeEntry) bool

func (*TreeEntry) GetEntries

func (x *TreeEntry) GetEntries() int32

func (*TreeEntry) GetHash

func (x *TreeEntry) GetHash() *hash.Hash

func (*TreeEntry) GetPath

func (x *TreeEntry) GetPath() string

func (*TreeEntry) GetSubBlockCtor

func (i *TreeEntry) GetSubBlockCtor(id uint32) block.SubBlockCtor

GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.

func (*TreeEntry) GetSubBlocks

func (i *TreeEntry) GetSubBlocks() map[uint32]block.SubBlock

GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.

func (*TreeEntry) GetTrees

func (x *TreeEntry) GetTrees() int32

func (*TreeEntry) IsNil

func (i *TreeEntry) IsNil() bool

IsNil returns if the object is nil.

func (*TreeEntry) MarshalBlock

func (i *TreeEntry) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*TreeEntry) MarshalJSON

func (x *TreeEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the TreeEntry to JSON.

func (*TreeEntry) MarshalProtoJSON

func (x *TreeEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the TreeEntry message to JSON.

func (*TreeEntry) MarshalProtoText

func (x *TreeEntry) MarshalProtoText() string

func (*TreeEntry) MarshalToSizedBufferVT

func (m *TreeEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*TreeEntry) MarshalToVT

func (m *TreeEntry) MarshalToVT(dAtA []byte) (int, error)

func (*TreeEntry) MarshalVT

func (m *TreeEntry) MarshalVT() (dAtA []byte, err error)

func (*TreeEntry) ProtoMessage

func (*TreeEntry) ProtoMessage()

func (*TreeEntry) Reset

func (x *TreeEntry) Reset()

func (*TreeEntry) SizeVT

func (m *TreeEntry) SizeVT() (n int)

func (*TreeEntry) String

func (x *TreeEntry) String() string

func (*TreeEntry) UnmarshalBlock

func (i *TreeEntry) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*TreeEntry) UnmarshalJSON

func (x *TreeEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the TreeEntry from JSON.

func (*TreeEntry) UnmarshalProtoJSON

func (x *TreeEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the TreeEntry message from JSON.

func (*TreeEntry) UnmarshalVT

func (m *TreeEntry) UnmarshalVT(dAtA []byte) error

func (*TreeEntry) Validate

func (i *TreeEntry) Validate() error

Validate performs cursory validation of the tree entry.

Jump to

Keyboard shortcuts

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