pkg

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package pkg is for implementing commands

Package pkg is for implementing commands

Package pkg is for implementing commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	URL    string `yaml:"url"`
	ShaURL string `yaml:"sha_url"`
}

Asset is exported.

type Kindly

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

Kindly struct stores kindly config

func (Kindly) Check

func (k Kindly) Check(ctx context.Context, n string) (ks KindlyStruct, err error)

Check function checks if the packages passed in args are available TODO variadic function

func (Kindly) GenerateTemplate

func (k Kindly) GenerateTemplate(ctx context.Context, owner string, repo string) (kc KindlyStruct, err error)

GenerateTemplate function implements template command

func (Kindly) Install

func (k Kindly) Install(ctx context.Context, p string, f bool, u bool) (err error)

Install function implements install command

func (Kindly) ListPackages

func (k Kindly) ListPackages(ctx context.Context, installed bool) (s []string, err error)

ListPackages function implements list command

func (Kindly) Remove

func (k Kindly) Remove(ctx context.Context, p string) (err error)

Remove function implements remove command

func (*Kindly) SetConfig

func (k *Kindly) SetConfig(c config.Config)

SetConfig sets the kindly struct config

func (*Kindly) SetLogger

func (k *Kindly) SetLogger(l *log.Logger)

SetLogger sets the kindly struct logger

func (Kindly) Update added in v0.0.4

func (k Kindly) Update(ctx context.Context, n string) (err error)

Update function implements update command

type KindlyStruct

type KindlyStruct struct {
	Spec struct {
		Name        string              `yaml:"name"`
		Description string              `yaml:"description"`
		Homepage    string              `yaml:"homepage"`
		RepoURL     string              `yaml:"repo_url"`
		License     string              `yaml:"license"`
		Tags        []string            `yaml:"tags"`
		Version     string              `yaml:"version"`
		Assets      map[string]Asset    `yaml:"assets"`
		Bin         []string            `yaml:"bin"`
		Completion  map[string][]string `yaml:"completion"`
		Man         []string            `yaml:"man"`
	}
}

KindlyStruct is exported.

Jump to

Keyboard shortcuts

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