Versions in this module Expand all Collapse all v1 v1.2.0 Apr 1, 2026 v1.1.0 Mar 17, 2026 Changes in this version + const SampleConfig + func AutoRefreshToken(cfg *ConfigFile) (string, error) + func BuildCommands(spec *Spec) []*cli.Command + func ConfigDir() string + func ConfigPath() string + func ExchangeAPIKey(cfg *ConfigFile, configPath string) (string, error) + func FormatOutput(data []byte, format string) error + func GetAuthToken(cfg *ConfigFile) string + func HasAPIKeyConfig(cfg *ConfigFile) bool + func HasOIDCConfig(cfg *ConfigFile) bool + func InitCommand() *cli.Command + func LoginCommand() *cli.Command + func NewApp(specData []byte) (*cli.App, error) + func ReadBodyInput(data, dataFile string) ([]byte, error) + func ResolveToken(token, tokenCommand string) (string, error) + func SaveConfig(cfg *ConfigFile) error + func SaveConfigToPath(cfg *ConfigFile, path string) error + func SetConfigPath(path string) + type APIError struct + Body string + Data interface{} + Message string + Status string + StatusCode int + func (e *APIError) Error() string + type Client struct + APIName string + BaseURL string + Debug bool + HTTPClient *http.Client + Log *logrus.Entry + Org string + Token string + func NewClient(baseURL, org, token string, log *logrus.Entry, debug bool) *Client + func (c *Client) Do(method, pathTemplate string, pathParams, queryParams map[string]string, ...) ([]byte, http.Header, error) + type Components struct + Responses map[string]interface{} + Schemas map[string]*Schema + type ConfigAPI struct + Base string + Name string + Org string + type ConfigAPIKey struct + AuthnURL string + Key string + Token string + type ConfigAuth struct + APIKey *ConfigAPIKey + OIDC *ConfigOIDC + Token string + type ConfigFile struct + API ConfigAPI + Auth ConfigAuth + func LoadConfig() (*ConfigFile, error) + func LoadConfigFromPath(path string) (*ConfigFile, error) + type ConfigOIDC struct + ClientID string + ClientSecret string + ExpiresAt string + Password string + RefreshToken string + Token string + TokenURL string + Username string + type MediaType struct + Schema *Schema + type Operation struct + Description string + OperationID string + Parameters []Parameter + RequestBody *RequestBody + Summary string + Tags []string + type Parameter struct + Description string + In string + Name string + Required bool + Schema *Schema + type PathItem struct + Delete *Operation + Get *Operation + Parameters []Parameter + Patch *Operation + Post *Operation + Put *Operation + type RequestBody struct + Content map[string]MediaType + type Schema struct + Default interface{} + Enum []string + Format string + Items *Schema + MaxLength *int + Maximum *int + MinLength *int + Minimum *int + Properties map[string]*Schema + Ref string + Required []string + Type SchemaType + type SchemaType string + func (t *SchemaType) UnmarshalYAML(value *yaml.Node) error + type Server struct + Description string + URL string + type Spec struct + Components Components + Info SpecInfo + Paths map[string]PathItem + Servers []Server + Tags []Tag + func ParseSpec(data []byte) (*Spec, error) + func (s *Spec) RequestBodySchema(op *Operation) *Schema + func (s *Spec) ResolveRef(ref string) *Schema + func (s *Spec) ResolveSchema(schema *Schema) *Schema + type SpecInfo struct + Title string + Version string + type Tag struct + Description string + Name string + type TokenResponse struct + AccessToken string + ExpiresIn int + RefreshToken string + TokenType string