gen

package
v0.0.0-...-0759755 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

an opinionated code generator for generating boilerplate from yml

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen() error

Types

type Config

type Config struct {
	Types   yaml.MapSlice `yaml:"types"`
	Objects yaml.MapSlice `yaml:"objects"`
	Routes  yaml.MapSlice `yaml:"routes"`
}

type Object

type Object struct {
	Name       string
	Properties []*Property
}

type Property

type Property struct {
	Name string
	Type string
}

type Route

type Route struct {
	Path         string // from parent
	Method       string // from parent
	Name         string `yaml:"name"`
	QueryParams  string `yaml:"query_params"`
	RequestBody  string `yaml:"request_body"`
	ResponseBody string `yaml:"response_body"`
}

Jump to

Keyboard shortcuts

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