internal

package
v0.0.1-alpha.12 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpgradeFileName = "dtail"
)

Variables

View Source
var (
	ErrDownloadUrlEmpty = errors.New("download url is empty")
)
View Source
var (
	ErrStop = fmt.Errorf("tail should now stop")
)
View Source
var Version string

Functions

func AskUpgrade

func AskUpgrade(direct bool)

func CheckUpgrade

func CheckUpgrade()

func NewTailDir

func NewTailDir(dirname string)

Types

type Asset

type Asset struct {
	Name        string `json:"name"`
	DownloadUrl string `json:"browser_download_url"`
}

type GithubRelease

type GithubRelease struct {
	TagName string  `json:"tag_name"`
	Assets  []Asset `json:"assets"`
}

func (*GithubRelease) Latest

func (g *GithubRelease) Latest() error

func (*GithubRelease) Upgrade

func (g *GithubRelease) Upgrade() error

func (*GithubRelease) UpgradeFile

func (g *GithubRelease) UpgradeFile() (UpgradeFile, error)

func (*GithubRelease) Version

func (g *GithubRelease) Version() string

type Release

type Release interface {
	Latest() error
	Version() string
	Upgrade() error
}

func NewGithubRelease

func NewGithubRelease() Release

type Tail

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

type TailDir

type TailDir struct {
	Lines chan *line
	// contains filtered or unexported fields
}

type TarGzUpgradeFile

type TarGzUpgradeFile struct {
	Name        string
	DownloadUrl string
	LocalPath   string
	UpgradePath string
}

func (*TarGzUpgradeFile) Do

func (f *TarGzUpgradeFile) Do() error

type UpgradeFile

type UpgradeFile interface {
	Do() error
}

Jump to

Keyboard shortcuts

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