generator

package
v0.0.0-...-519d24f Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
}

Generator is a generator for HTTP API sources

func NewGenerator

func NewGenerator() *Generator

NewGenerator returns a new instance of Generator

func (*Generator) GetAnnotationSymbol

func (*Generator) GetAnnotationSymbol() generator.AnnotationSymbol

GetAnnotationSymbol implements generator.Generator#GetAnnotationSymbol

func (*Generator) GetFormatter

func (*Generator) GetFormatter() generator.Formatter

GetFormatter implements generator.Generator#GetFormatter

func (*Generator) Run

Run implementes generator.Generator#Run

type ParameterType

type ParameterType struct {
	Name         string
	Package      string
	PackageAlias string
}

ParameterType represents the type information for a parameter

func (*ParameterType) ResolveAlias

func (pt *ParameterType) ResolveAlias(d *generator.Dependency)

ResolveAlias resolves PackageAlias field with the given Dependency object.

func (*ParameterType) String

func (pt *ParameterType) String() string

type Spec

type Spec struct {
	ReceiverTypeName    string
	ReceiverName        string
	PathPattern         string
	PathParameters      []string
	StructuredParameter *StructuredParameter
	FuncName            string
	Method              requestMethod
	ReturnType          returnType
}

Spec represents API specification

type SpecGroup

type SpecGroup struct {
	ReceiverTypeName string
	ReceiverName     string
	Specs            []*Spec
}

SpecGroup is a struct to group by ReceiverTypeName

type StructuredParameter

type StructuredParameter struct {
	Type   *ParameterType
	Parser *api.ParameterParser
}

Directories

Path Synopsis
Code generated by github.com/yssk22/go/generator DO NOT EDIT.
Code generated by github.com/yssk22/go/generator DO NOT EDIT.
types
Code generated by github.com/yssk22/go/generator DO NOT EDIT.
Code generated by github.com/yssk22/go/generator DO NOT EDIT.

Jump to

Keyboard shortcuts

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