plugins

package
v0.9.1-beta2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Code generated by "gonum -types=KindEnum -output=kind_enum.go"; DO NOT EDIT. See https://github.com/steinfletcher/gonum

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoValidTopics = errors.New("topics did not contain a valid topic matching 'devctl-<PLUGIN_KIND>-plugin'")
	ErrInvalidTopic  = errors.New("failed to parse string as a plugin kind that is not known")
)
View Source
var SDK = Kind{/* contains filtered or unexported fields */}

Enum instances

Functions

func IsValidKind

func IsValidKind(k Kind) bool

func KindNames

func KindNames() []string

KindNames returns the displays values of all enum instances as a slice

func NewProgress

func NewProgress(out io.Writer, size int, description string, opts ...progressbar.Option) (bar *progressbar.ProgressBar)

func NewQuery

func NewQuery(opts ...QueryOption) string

Types

type Client

type Client interface {
	SearchOpts(ctx context.Context, option ...QueryOption) (res PluginSearchResults, err error)
	Search(ctx context.Context, query string) (res PluginSearchResults, err error)
}

func NewClient

func NewClient(baseURL *url.URL, httpClient *http.Client) Client

type Kind

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

Kind is the enum that instances should be created from

func KindValues

func KindValues() []Kind

KindValues returns all enum instances as a slice

func NewKind

func NewKind(value string) (Kind, error)

NewKind generates a new Kind from the given display value (name)

func ParseKindFromRepo

func ParseKindFromRepo(repo github.Repository) (k Kind, err error)

func (Kind) Description

func (g Kind) Description() string

Description returns the enum description if present. If no description is defined an empty string is returned

func (Kind) Error

func (g Kind) Error() string

Error returns the enum name and implements the Error interface

func (Kind) IsValid

func (k Kind) IsValid() bool

func (Kind) MarshalJSON

func (g Kind) MarshalJSON() ([]byte, error)

MarshalJSON provides json serialization support by implementing the Marshaler interface

func (Kind) Name

func (g Kind) Name() string

Name returns the enum display value

func (Kind) String

func (g Kind) String() string

String returns the enum display value and is an alias of Name to implement the Stringer interface

func (*Kind) UnmarshalJSON

func (g *Kind) UnmarshalJSON(b []byte) error

UnmarshalJSON provides json deserialization support by implementing the Unmarshaler interface

type KindEnum

type KindEnum struct {
	SDK string `enum:"SDK,installs updates and manages different sdks on your system"`
}

type PluginSearchResult

type PluginSearchResult struct {
	Name           string
	Uri            string
	RepositoryName string
	Topics         []string
	Kind           Kind
}

type PluginSearchResults

type PluginSearchResults []PluginSearchResult

type Query

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

func (*Query) String

func (p *Query) String() string

type QueryOption

type QueryOption func(query *Query) *Query

func WithKind

func WithKind(kind Kind) QueryOption

func WithName

func WithName(name string) QueryOption

type Store

type Store interface {
	Register(kind Kind, string string) error
	List(kind Kind) (plugins map[string]string, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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