bits

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("bit not found")

ErrNotFound is reported by Get if the bit with the given slug is not found.

Functions

func Describe

func Describe(ctx context.Context, dir string) (desc *app.Desc, err error)

Describe describes the contents of the bit extracted in dir.

func Extract

func Extract(ctx context.Context, b *Bit, dst string) error

Extract downloads and extracts a bit into a given directory.

Types

type Bit

type Bit struct {
	Slug        string
	Title       string
	Description string

	// GitHubTree is a URL to the GitHub tree for this bit,
	// in the format expected by github.ParseTree.
	GitHubTree string
}

func Get

func Get(ctx context.Context, slug string) (*Bit, error)

Get retrieves a bit by its slug.

func List

func List(ctx context.Context) ([]*Bit, error)

List lists available bits.

Jump to

Keyboard shortcuts

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