service

package
v2.1.2065-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Micronaut = "micronaut"
View Source
var Spring = "spring"

Functions

func Generate

func Generate(specification *spec.Spec, jsonlib, server, packageName, swaggerPath, generatePath, servicesPath string) *generator.Sources

Types

type Generator

type Generator struct {
	Jsonlib string
	Types   *types.Types
	Models  models.Generator
	Server  ServerGenerator
}

func NewGenerator

func NewGenerator(jsonlib, server string) *Generator

func (*Generator) ServicesImplementations

func (g *Generator) ServicesImplementations(version *spec.Version, thePackage, modelsVersionPackage, servicesVersionPackage modules.Module) []generator.CodeFile

func (*Generator) ServicesInterfaces

func (g *Generator) ServicesInterfaces(version *spec.Version, thePackage, modelsVersionPackage modules.Module, errorModelsPackage modules.Module) []generator.CodeFile

type MicronautGenerator

type MicronautGenerator struct {
	Types  *types.Types
	Models models.Generator
}

func NewMicronautGenerator

func NewMicronautGenerator(types *types.Types, models models.Generator) *MicronautGenerator

func (*MicronautGenerator) ContentType

func (g *MicronautGenerator) ContentType(thePackage modules.Module) []generator.CodeFile

func (*MicronautGenerator) Errors

func (g *MicronautGenerator) Errors(thePackage, errorsModelsPackage, contentTypePackage, jsonPackage modules.Module) []generator.CodeFile

func (*MicronautGenerator) ExceptionController

func (g *MicronautGenerator) ExceptionController(responses *spec.Responses, thePackage, errorsPackage, errorsModelsPackage, jsonPackage modules.Module) *generator.CodeFile

func (*MicronautGenerator) Json

func (g *MicronautGenerator) Json(thePackage modules.Module) *generator.CodeFile

func (*MicronautGenerator) JsonHelpers

func (g *MicronautGenerator) JsonHelpers(thePackage modules.Module) []generator.CodeFile

func (*MicronautGenerator) ServiceImplAnnotation

func (g *MicronautGenerator) ServiceImplAnnotation(api *spec.Api) (annotationImport, annotation string)

func (*MicronautGenerator) ServiceImports

func (g *MicronautGenerator) ServiceImports() []string

func (*MicronautGenerator) ServicesControllers

func (g *MicronautGenerator) ServicesControllers(version *spec.Version, mainPackage, thePackage, contentTypePackage, jsonPackage, modelsVersionPackage, errorModelsPackage, serviceVersionPackage modules.Module) []generator.CodeFile

type ServerGenerator

type ServerGenerator interface {
	ServiceImports() []string
	ServicesControllers(version *spec.Version, mainPackage, thePackage, contentTypePackage, jsonPackage, modelsVersionPackage, errorModelsPackage, serviceVersionPackage modules.Module) []generator.CodeFile
	ServiceImplAnnotation(api *spec.Api) (annotationImport, annotation string)
	ExceptionController(responses *spec.Responses, thePackage, errorsPackage, errorsModelsPackage, jsonPackage modules.Module) *generator.CodeFile
	Errors(thePackage, errorsModelsPackage, contentTypePackage, jsonPackage modules.Module) []generator.CodeFile
	ContentType(thePackage modules.Module) []generator.CodeFile
	JsonHelpers(thePackage modules.Module) []generator.CodeFile
}

type SpringGenerator

type SpringGenerator struct {
	Types  *types.Types
	Models models.Generator
}

func NewSpringGenerator

func NewSpringGenerator(types *types.Types, models models.Generator) *SpringGenerator

func (*SpringGenerator) ContentType

func (g *SpringGenerator) ContentType(thePackage modules.Module) []generator.CodeFile

func (*SpringGenerator) Errors

func (g *SpringGenerator) Errors(thePackage, errorsModelsPackage, contentTypePackage, jsonPackage modules.Module) []generator.CodeFile

func (*SpringGenerator) ExceptionController

func (g *SpringGenerator) ExceptionController(responses *spec.Responses, thePackage, errorsPackage, errorsModelsPackage, jsonPackage modules.Module) *generator.CodeFile

func (*SpringGenerator) Json

func (g *SpringGenerator) Json(thePackage modules.Module) *generator.CodeFile

func (*SpringGenerator) JsonHelpers

func (g *SpringGenerator) JsonHelpers(thePackage modules.Module) []generator.CodeFile

func (*SpringGenerator) ServiceImplAnnotation

func (g *SpringGenerator) ServiceImplAnnotation(api *spec.Api) (annotationImport, annotation string)

func (*SpringGenerator) ServiceImports

func (g *SpringGenerator) ServiceImports() []string

func (*SpringGenerator) ServicesControllers

func (g *SpringGenerator) ServicesControllers(version *spec.Version, mainPackage, thePackage, contentTypePackage, jsonPackage, modelsVersionPackage, errorModelsPackage, serviceVersionPackage modules.Module) []generator.CodeFile

Jump to

Keyboard shortcuts

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