Documentation ¶
Index ¶
- Variables
- func MarkdownRenderRawOverride(c *BaseCmd, filename string) error
- func ReposUploadReleaseAssetOverride(c *BaseCmd, filename string) error
- type BaseCmd
- func (c *BaseCmd) AddRequestHeader(headerName, value string)
- func (c *BaseCmd) AfterApply() error
- func (c *BaseCmd) DoRequest(method string) error
- func (c *BaseCmd) OutputResult(resp *http.Response, stdout io.Writer) error
- func (c *BaseCmd) SetIsValueSetMap(isValueSetMap map[string]bool)
- func (c *BaseCmd) SetURLPath(path string)
- func (c *BaseCmd) UpdateBody(flagName string, value interface{})
- func (c *BaseCmd) UpdatePreview(previewName string, value bool)
- func (c *BaseCmd) UpdateURLPath(valName string, value interface{})
- func (c *BaseCmd) UpdateURLQuery(paramName string, value interface{})
- func (c *BaseCmd) UseFileBody(fileName string) error
- type JSONObject
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 ReposUploadReleaseAssetOverride ¶ added in v0.9.0
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 (*BaseCmd) AfterApply ¶ added in v0.7.0
func (*BaseCmd) OutputResult ¶ added in v0.22.0
func (*BaseCmd) SetIsValueSetMap ¶
SetIsValueSetMap sets isValueSetMap
func (*BaseCmd) SetURLPath ¶
SetURLPath sets the path of url
func (*BaseCmd) UpdateBody ¶
UpdateBody adds a flag's value a request body
func (*BaseCmd) UpdatePreview ¶
UpdatePreview adds a preview header to a request
func (*BaseCmd) UpdateURLPath ¶
UpdateURLPath sets a param in the url path
func (*BaseCmd) UpdateURLQuery ¶
UpdateURLQuery sets a param value in a url query
func (*BaseCmd) UseFileBody ¶ added in v0.9.0
type JSONObject ¶ added in v0.8.0
type JSONObject string
Click to show internal directories.
Click to hide internal directories.