service

package
v2.1.2177-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Express = "express"
View Source
var Koa = "koa"
View Source
var Servers = []string{Express, Koa}

Functions

func GenerateService

func GenerateService(specification *spec.Spec, swaggerPath string, generatePath string, servicesPath string, server string, validationName string) *generator.Sources

Types

type Generator added in v2.2.0

type Generator struct {
	validations.Validation
	ServiceGenerator
	Modules *Modules
}

func NewServiceGenerator

func NewServiceGenerator(server, validationName string, modules *Modules) *Generator

func (*Generator) ParamsStaticCode added in v2.2.0

func (g *Generator) ParamsStaticCode() *generator.CodeFile

func (*Generator) ServiceApis added in v2.2.0

func (g *Generator) ServiceApis(version *spec.Version) []generator.CodeFile

func (*Generator) ServicesImpls added in v2.2.0

func (g *Generator) ServicesImpls(specification *spec.Spec) []generator.CodeFile

type Modules added in v2.2.0

type Modules struct {
	modules.Modules

	Root       module.Module
	Params     module.Module
	Errors     module.Module
	Responses  module.Module
	SpecRouter module.Module
	// contains filtered or unexported fields
}

func NewModules added in v2.2.0

func NewModules(validationName, generatePath, servicesPath string, specification *spec.Spec) *Modules

func (*Modules) Routing added in v2.2.0

func (m *Modules) Routing(version *spec.Version) module.Module

func (*Modules) ServiceApi added in v2.2.0

func (m *Modules) ServiceApi(api *spec.Api) module.Module

func (*Modules) ServiceImpl added in v2.2.0

func (m *Modules) ServiceImpl(api *spec.Api) module.Module

type ServiceGenerator

type ServiceGenerator interface {
	VersionRouting(version *spec.Version) *generator.CodeFile
	SpecRouter(specification *spec.Spec) *generator.CodeFile
	Responses() *generator.CodeFile
}

Jump to

Keyboard shortcuts

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