github

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	Owner string
	Repo  string
}

func (*Cli) CreateLabel

func (cli *Cli) CreateLabel(label Label) (bytes.Buffer, error)

func (*Cli) DeleteLabel

func (cli *Cli) DeleteLabel(name string) error

func (*Cli) ListLabels

func (cli *Cli) ListLabels(substr string) (bytes.Buffer, error)

func (*Cli) UpdateLabel

func (cli *Cli) UpdateLabel(label EditLabel) (bytes.Buffer, error)

type Client

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

func New

func New(labels LabelsService) *Client

func (*Client) CreateLabel

func (c *Client) CreateLabel(label Label) (Label, error)

func (*Client) DeleteLabel

func (c *Client) DeleteLabel(name string) error

func (*Client) ListLabels

func (c *Client) ListLabels(substr string) (Labels, error)

func (*Client) UpdateLabel

func (c *Client) UpdateLabel(label EditLabel) (Label, error)

type EditLabel

type EditLabel struct {
	Label
	NewName string `json:"new_name,omitempty"`
}

type Label

type Label struct {
	Name        string `json:"name"`
	Color       string `json:"color"`
	Description string `json:"description,omitempty"`
	URL         string `json:"url,omitempty"`
}

type Labels

type Labels []Label

type LabelsService

type LabelsService interface {
	CreateLabel(label Label) (bytes.Buffer, error)
	DeleteLabel(name string) error
	ListLabels(substr string) (bytes.Buffer, error)
	UpdateLabel(label EditLabel) (bytes.Buffer, error)
}

type Mock

type Mock struct {
	Stdout bytes.Buffer
	Err    error
}

func (*Mock) CreateLabel

func (m *Mock) CreateLabel(label Label) (bytes.Buffer, error)

func (*Mock) DeleteLabel

func (m *Mock) DeleteLabel(name string) error

func (*Mock) ListLabels

func (m *Mock) ListLabels(substr string) (bytes.Buffer, error)

func (*Mock) UpdateLabel

func (m *Mock) UpdateLabel(label EditLabel) (bytes.Buffer, error)

Jump to

Keyboard shortcuts

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