Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAFile = errors.New("not a file")
Functions ¶
This section is empty.
Types ¶
type CmdConfig ¶
type GitServer ¶
type GitServer interface { GetLatestVersion(ctx context.Context) (Release, error) GetReleaseArchive(ctx context.Context, release Release) ([]byte, error) }
GitServer defines generic functions for getting the latest release and archive
type Release ¶
type Release struct { TagName string `json:"tag_name"` Assets []ReleaseAsset `json:"assets"` }
Release type defines the tag and its assets
type ReleaseAsset ¶
type ReleaseAsset struct { Name string `json:"name"` DownloadURL string `json:"browser_download_url"` }
ReleaseAsset defines the name and download url
type SafeWriter ¶
type SafeWriter struct {
// contains filtered or unexported fields
}
func NewSafeWriter ¶
func NewSafeWriter(opts ...SafeWriterOption) *SafeWriter
type SafeWriterConfig ¶
type SafeWriterConfig struct {
Log logrus.FieldLogger
}
func (*SafeWriterConfig) Default ¶
func (c *SafeWriterConfig) Default()
func (*SafeWriterConfig) Option ¶
func (c *SafeWriterConfig) Option(opts ...SafeWriterOption)
type SafeWriterOption ¶
type SafeWriterOption interface {
ConfigureSafeWriter(*SafeWriterConfig)
}
type WithBinaryName ¶
type WithBinaryName string
func (WithBinaryName) ConfigureCmd ¶
func (w WithBinaryName) ConfigureCmd(c *CmdConfig)
type WithLog ¶
type WithLog struct{ Log logrus.FieldLogger }
func (WithLog) ConfigureCmd ¶
func (WithLog) ConfigureSafeWriter ¶
func (w WithLog) ConfigureSafeWriter(c *SafeWriterConfig)
type WithOut ¶
func (WithOut) ConfigureCmd ¶
type WithWriter ¶
type WithWriter struct{ Writer Writer }
func (WithWriter) ConfigureCmd ¶
func (w WithWriter) ConfigureCmd(c *CmdConfig)
Click to show internal directories.
Click to hide internal directories.