tmpl

package
v0.0.0-...-2ad490d Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasParams

func HasParams(method *scrape.Method) bool

func HasResponse

func HasResponse(types []string) bool

func IsAbstractType

func IsAbstractType(t *scrape.Type) bool

func IsKeyword

func IsKeyword(words []string) func(word string) bool

func IsParamsOptional

func IsParamsOptional(fields []*scrape.Field) bool

func Render

func Render(conf Conf, resp *scrape.APIResponse, writer io.Writer) error

func ToCamelCase

func ToCamelCase(str string) string

func ToPascalCase

func ToPascalCase(str string) string

func ToTypesDoc

func ToTypesDoc(types []string) string

Types

type Conf

type Conf struct {
	Template string
	FuncMap  FuncMap
}

type FuncMap

type FuncMap struct {
	UnionsTypes  func(types []string) string
	ToFieldTypes func(*scrape.Field) string
	ExtraFunc    map[string]any
}

Jump to

Keyboard shortcuts

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