config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMode = "default"

Variables

This section is empty.

Functions

This section is empty.

Types

type GenConfig

type GenConfig struct {
	APIs map[string]GenConfigItem `json:"apis"`
}

func (*GenConfig) Parse

func (c *GenConfig) Parse(path string)

type GenConfigItem

type GenConfigItem struct {
	OutputPath  string
	OpenApiPath string
	ProtoPath   string
	Mode        string
	Transport   string
	Title       string
	Version     string
	Servers     []string
	// enable create by default,
	// you can enable/disable explicitly for each model in genOpenapi annotations
	EnableDefaultCreate bool
	// enable update by default,
	// you can enable/disable explicitly for each model in genOpenapi annotations
	EnableDefaultUpdate bool
	// enable delete by default,
	// you can enable/disable explicitly for each model in genOpenapi annotations
	EnableDefaultDelete bool
	// enable readOne by default
	// you can enable/disable explicitly for each model in genOpenapi annotations
	EnableDefaultReadOne bool
	// enable readMany by default
	// you can enable/disable explicitly for each model in genOpenapi annotations
	EnableDefaultReadMany bool
	// make fields public by default, set field annotations to hide
	FieldsPublicByDefault bool
	// enable edges read by default, set edge annotations to hide
	EnableEdgeReadByDefault bool
	// enable edges write by default, set edge annotations to hide
	EnableEdgeWriteByDefault bool
	// max level of with nesting in get(one/list) handlers, 0 = not limited
	WithMaxNesting int
}

Jump to

Keyboard shortcuts

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