config

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Info              *openapi3.Info         `yaml:"info"`
	SecuritySchemes   map[string]interface{} `yaml:"securitySchemes"`
	RouterDefinitions []RouterDefinition     `yaml:"routerDefinitions"`
	HandlerPatterns   *HandlerPatternsConfig `yaml:"handlerPatterns"`
	SecurityPatterns  []SecurityPattern      `yaml:"securityPatterns"`
}

Config is updated with the new HandlerPatterns.

func Load

func Load(projectPath string) (*Config, error)

Load is updated with defaults for the new handler patterns.

type HandlerPatternsConfig added in v0.1.7

type HandlerPatternsConfig struct {
	RequestBody     []RequestBodyPattern  `yaml:"requestBody"`
	ResponseBody    []ResponseBodyPattern `yaml:"responseBody"`
	QueryParameter  []ParameterPattern    `yaml:"queryParameter"`
	HeaderParameter []ParameterPattern    `yaml:"headerParameter"`
}

type ParameterPattern added in v0.1.7

type ParameterPattern struct {
	FunctionPath string `yaml:"functionPath"`
	NameIndex    int    `yaml:"nameIndex"`
}

type RequestBodyPattern added in v0.1.7

type RequestBodyPattern struct {
	FunctionPath string `yaml:"functionPath"`
	ArgIndex     int    `yaml:"argIndex"`
}

type ResponseBodyPattern added in v0.1.7

type ResponseBodyPattern struct {
	FunctionPath     string `yaml:"functionPath"`
	DataIndex        int    `yaml:"dataIndex"`
	StatusCodeIndex  *int   `yaml:"statusCodeIndex,omitempty"`
	DescriptionIndex *int   `yaml:"descriptionIndex,omitempty"`
}

type RouterDefinition

type RouterDefinition struct {
	Type                     string   `yaml:"type"`
	EndpointMethods          []string `yaml:"endpointMethods"`
	GroupMethods             []string `yaml:"groupMethods"`
	MiddlewareWrapperMethods []string `yaml:"middlewareWrapperMethods"`
}

RouterDefinition is unchanged.

type SecurityPattern added in v0.1.7

type SecurityPattern struct {
	FunctionPath string `yaml:"functionPath"`
	SchemeName   string `yaml:"schemeName"`
}

Jump to

Keyboard shortcuts

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