internal

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Stdout is where to write output
	Stdout io.Writer = os.Stdout

	// TransportWrapper is a wrapper for the http transport that we use for go-vcr tests
	TransportWrapper interface {
		SetTransport(t http.RoundTripper)
		http.RoundTripper
	}
)
View Source
var UserAgent = "octo-cli"

UserAgent is the user agent for our https

Functions

func MarkdownRenderRawOverride added in v0.11.0

func MarkdownRenderRawOverride(c *BaseCmd, filename string) error

func ReposUploadReleaseAssetOverride added in v0.9.0

func ReposUploadReleaseAssetOverride(c *BaseCmd, filename string) error

Types

type BaseCmd

type BaseCmd struct {
	Token      string `env:"GITHUB_TOKEN" hidden:""`
	APIBaseURL string `env:"GITHUB_API_BASE_URL" default:"https://api.github.com"`
	RawOutput  bool   `help:"don't format json output."`
	Format     string `help:"format json output with a go template"`
	OutputEach string `help:"output each item at the given path"`
	Curl       bool   `help:"returns a corresponding curl request"`
	// contains filtered or unexported fields
}

BaseCmd is included in all command structs in generated

func (*BaseCmd) AddRequestHeader added in v0.2.0

func (c *BaseCmd) AddRequestHeader(headerName, value string)

func (*BaseCmd) AfterApply added in v0.7.0

func (c *BaseCmd) AfterApply() error

func (*BaseCmd) DoRequest

func (c *BaseCmd) DoRequest(method string) error

DoRequest performs a request

func (*BaseCmd) OutputResult added in v0.22.0

func (c *BaseCmd) OutputResult(resp *http.Response, stdout io.Writer) error

func (*BaseCmd) SetIsValueSetMap

func (c *BaseCmd) SetIsValueSetMap(isValueSetMap map[string]bool)

SetIsValueSetMap sets isValueSetMap

func (*BaseCmd) SetURLPath

func (c *BaseCmd) SetURLPath(path string)

SetURLPath sets the path of url

func (*BaseCmd) UpdateBody

func (c *BaseCmd) UpdateBody(flagName string, value interface{})

UpdateBody adds a flag's value a request body

func (*BaseCmd) UpdatePreview

func (c *BaseCmd) UpdatePreview(previewName string, value bool)

UpdatePreview adds a preview header to a request

func (*BaseCmd) UpdateURLPath

func (c *BaseCmd) UpdateURLPath(valName string, value interface{})

UpdateURLPath sets a param in the url path

func (*BaseCmd) UpdateURLQuery

func (c *BaseCmd) UpdateURLQuery(paramName string, value interface{})

UpdateURLQuery sets a param value in a url query

func (*BaseCmd) UseFileBody added in v0.9.0

func (c *BaseCmd) UseFileBody(fileName string) error

type JSONObject added in v0.8.0

type JSONObject string

Directories

Path Synopsis
generator

Jump to

Keyboard shortcuts

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