converter

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurlType  = "curl"
	FetchType = "fetch"
)

Variables

View Source
var (
	ErrEndpointNotFound    = fmt.Errorf("endpoint not found")
	ErrEndpointWrongMethod = fmt.Errorf("endpoint found but wrong method")
)
View Source
var (
	ErrInvalidConvertType = errors.New(fmt.Sprintf("invalid convert type. Must be %q or %q", CurlType, FetchType))
)

Functions

This section is empty.

Types

type Converter

type Converter interface {
	ConvertEndpoint(swagger *openapi3.T, method, endpoint string) (string, error)
}

func NewConverter

func NewConverter(convertType string) (Converter, error)

type Curl

type Curl struct {
}

func NewCurlConverter

func NewCurlConverter() *Curl

func (*Curl) ConvertEndpoint

func (c *Curl) ConvertEndpoint(swagger *openapi3.T, method, endpoint string) (string, error)

type Fetch

type Fetch struct {
}

func NewFetchConverter

func NewFetchConverter() *Fetch

func (*Fetch) ConvertEndpoint

func (c *Fetch) ConvertEndpoint(swagger *openapi3.T, method, endpoint string) (string, error)

Jump to

Keyboard shortcuts

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