Help us shape the future of Go! Take the 2026 Go Developer Survey

gitobject

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 1

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