repo

package
v0.0.0-...-4182a7c Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRepositoryNotFound           = errors.New("repository not found")
	ErrFailedToReadRepositoryConfig = errors.New("failed to read repository config")
)
View Source
var ErrNoReadMe = errors.New("no readme file found")

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Name      string
	Message   string
	Author    string
	UpdatedAt time.Time
}

type LogStatement

type LogStatement struct {
	CommitID     string
	Message      string
	Author       string
	Date         time.Time
	LinesDeleted int
	LinesAdded   int
	References   []string
}

type RefsResult

type RefsResult struct {
	Tags     []Tag
	Branches []Branch
}

type Repo

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

func New

func New(path string) (Repo, error)

func (Repo) About

func (repo Repo) About(refName string) (string, error)

func (Repo) Age

func (repo Repo) Age() (time.Time, error)

func (Repo) Author

func (repo Repo) Author() string

func (Repo) Description

func (repo Repo) Description() (string, error)

func (Repo) Log

func (repo Repo) Log(commitID string, size uint8) ([]LogStatement, error)

func (Repo) LogRef

func (repo Repo) LogRef(name string, size uint8) ([]LogStatement, error)

func (Repo) Name

func (repo Repo) Name() string

func (Repo) Refs

func (repo Repo) Refs() (RefsResult, error)

type Tag

type Tag struct {
	Name      string
	Message   string
	Author    string
	CreatedAt time.Time
}

Jump to

Keyboard shortcuts

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