core

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoNewerCommit  = errors.New("no newer commit")
	ErrLogUnavailable = errors.New("repository log is unavailable")
)

Functions

func QueryTags

func QueryTags(repository *git.Repository) []*plumbing.Reference

Types

type Option

type Option struct {
	// inclucive
	Since time.Time `json:"since"`
	// inclucive
	Until          time.Time      `json:"until"`
	IgnorePattern  *regexp.Regexp `json:"ignorePattern"`
	StartTimerFunc func(string)   `json:"-"`
	StopTimerFunc  func(string)   `json:"-"`
}

func (*Option) StartTimer

func (o *Option) StartTimer(key string)

func (*Option) StopTimer

func (o *Option) StopTimer(key string)

type Release

type Release struct {
	Tag                string        `json:"tag"`
	Date               time.Time     `json:"date"`
	LeadTimeForChanges time.Duration `json:"leadTimeForChanges"`
	Result             ReleaseResult `json:"result"`
}

func QueryReleases

func QueryReleases(repository *git.Repository, option *Option) []*Release

QueryReleases returns Releases sorted by date (first item is the oldest and last item is the newest)

func (*Release) Equal

func (r *Release) Equal(another *Release) bool

func (*Release) String

func (r *Release) String() string

type ReleaseResult

type ReleaseResult struct {
	IsSuccess     bool
	TimeToRestore *time.Duration
}

func (ReleaseResult) Equal

func (r ReleaseResult) Equal(another ReleaseResult) bool

func (ReleaseResult) String

func (r ReleaseResult) String() string

type ReleaseSource

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

Jump to

Keyboard shortcuts

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