converter

package
v2.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

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

Variables

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(method string, endpoint string, _ *model.Operation) string
}

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(method string, endpoint string, operation *model.Operation) string

type Fetch

type Fetch struct {
}

func NewFetchConverter

func NewFetchConverter() *Fetch

func (*Fetch) ConvertEndpoint

func (c *Fetch) ConvertEndpoint(method string, endpoint string, operation *model.Operation) string

Jump to

Keyboard shortcuts

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