cache

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedSource

type CachedSource interface {
	Update(c LocalCacheContext) error
	GetVersions(c LocalCacheContext) ([]version.Version, error)
	GetPath(c LocalCacheContext) string
	SwitchToVersion(c LocalCacheContext, v version.Version) error
}

type GitLocalSource

type GitLocalSource struct {
	LocalPath string
}

func (*GitLocalSource) GetPath

func (s *GitLocalSource) GetPath(c LocalCacheContext) string

func (*GitLocalSource) GetVersions

func (s *GitLocalSource) GetVersions(c LocalCacheContext) ([]version.Version, error)

func (*GitLocalSource) SwitchToVersion

func (s *GitLocalSource) SwitchToVersion(c LocalCacheContext, v version.Version) error

func (*GitLocalSource) Update

func (s *GitLocalSource) Update(c LocalCacheContext) error

type GitSource

type GitSource struct {
	Remote string
}

func (*GitSource) GetPath

func (s *GitSource) GetPath(c LocalCacheContext) string

func (*GitSource) GetVersions

func (s *GitSource) GetVersions(c LocalCacheContext) ([]version.Version, error)

func (*GitSource) SwitchToVersion

func (s *GitSource) SwitchToVersion(c LocalCacheContext, v version.Version) error

func (*GitSource) Update

func (s *GitSource) Update(c LocalCacheContext) error

type LocalCacheContext

type LocalCacheContext interface {
	GetCacheRoot() string
	Mark(mark string)
	CheckMarked(mark string) bool
}

func DefaultCacheContext

func DefaultCacheContext() (LocalCacheContext, error)

type NotCommitedError

type NotCommitedError interface {
	error
	NotCommitedFiles() []string
}

type SimpleContext

type SimpleContext struct {
	Path  string
	Marks map[string]bool
}

func (*SimpleContext) CheckMarked

func (c *SimpleContext) CheckMarked(mark string) bool

func (*SimpleContext) GetCacheRoot

func (c *SimpleContext) GetCacheRoot() string

func (*SimpleContext) Mark

func (c *SimpleContext) Mark(mark string)

type SourceOfTruth

type SourceOfTruth interface {
	CheckVersion(v version.Version) (bool, error)
	GetVersions() ([]version.Version, error)
	FreezeVersion(v version.Version) error
	IsFrozen() (bool, error)
	IsClean() ([]string, error)
}

func NewLocalSourceOfTruth

func NewLocalSourceOfTruth(path string) (SourceOfTruth, error)

Jump to

Keyboard shortcuts

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