gitobject

package
v0.26.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	Name  string
	Email string
	When  *time.Time
}

type Commit

type Commit struct {
	Tree      string
	Parents   []string
	Author    Actor
	Committer Actor
	Message   string
}

type GitObject

type GitObject struct {
	Type       string
	Headers    map[string][]string
	Message    string
	Signature  string
	SignedData string
	Raw        []byte
}

func Parse

func Parse(raw []byte) (*GitObject, error)

func (*GitObject) Checksum

func (obj *GitObject) Checksum(hashFunc func() hash.Hash) ([]byte, error)

func (*GitObject) ToCommit

func (obj *GitObject) ToCommit() (*Commit, error)

func (*GitObject) ToTag

func (obj *GitObject) ToTag() (*Tag, error)

func (*GitObject) VerifyChecksum

func (obj *GitObject) VerifyChecksum(sha string) error

type Tag

type Tag struct {
	Object  string
	Type    string
	Tag     string
	Tagger  Actor
	Message string
}

Jump to

Keyboard shortcuts

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