config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteDefaultConfig

func WriteDefaultConfig(f io.Writer) error

WriteDefaultConfig writes a default configuration to the given io.Writer.

Types

type Boilerplate

type Boilerplate struct {
	ClientPrefix string `yaml:"client_prefix"`

	BaseURL  pkg.Visibility `yaml:"base_url"`
	Backend  pkg.Visibility `yaml:"backend"`
	Endpoint pkg.Visibility `yaml:"endpoint"`
}

Boilerplate defines the options for boilerplate code generation

type Config

type Config struct {
	Document string `yaml:"document"`
	Output   string `yaml:"output"`
	Package  struct {
		Path string `yaml:"path"`
		Name string `yaml:"name"`
	} `yaml:"package"`

	Boilerplate Boilerplate       `yaml:"boilerplate"`
	Types       map[string]string `yaml:"types"`

	StringFormats map[string]string `yaml:"string_formats"`
}

Config is the toplevel configuration for running oag

func Load

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

Load loads the configuration

Jump to

Keyboard shortcuts

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