Documentation ¶
Index ¶
- Constants
- Variables
- func GoProject(dir, pckg string) error
- func NewGoClientGenerator(spec *openapi.Spec) *goClientGenerator
- func NewGoHandlersGenerator(spec *openapi.Spec) *goHandlersGenerator
- func NewGoServerGenerator(spec *openapi.Spec) *goServerGenerator
- func NewGoServiceGenerator(spec *openapi.Spec) *goServicesGenerator
- func NewGoTypesGenerator(spec *openapi.Spec) *goTypesGenerator
- type ApiGenerator
- type ApiMockGenerator
- type ClientApiGenerator
- type ClientApiMockGenerator
- type Generator
- func NewGoAPIGenerator(spec *openapi.Spec) Generator
- func NewGoAPIMockGenerator(spec *openapi.Spec) Generator
- func NewGoClientAPIGenerator(spec *openapi.Spec) Generator
- func NewGoClientAPIMockGenerator(spec *openapi.Spec) Generator
- func NewGoServerAPIGenerator(spec *openapi.Spec) Generator
- func NewGoServerAPIMockGenerator(spec *openapi.Spec) Generator
- type GoClientMockGenerator
- type GoGenerator
- func (gen *GoGenerator) ConvertMapToSecuritySchemeSlice(security []map[string][]string) []spec.SecurityScheme
- func (gen *GoGenerator) PopulateParametersBucket(bucket *ParametersBucket, parameters []spec.Parameter, ...) (*ParametersBucket, error)
- func (gen *GoGenerator) WalkOperations(handler func(operation *Operation) error) error
- type Library
- type Operation
- func (o *Operation) HasConsume(c string) bool
- func (o *Operation) HasConsumes(cs ...string) bool
- func (o *Operation) HasProduce(p string) bool
- func (o *Operation) HasProduces(ps ...string) bool
- func (o *Operation) HasValidConsumes() bool
- func (o *Operation) HasValidProduces() bool
- func (o *Operation) RegexHasProduces(pattern string) bool
- type ParametersBucket
- type ServerApiGenerator
- type ServerApiMockGenerator
- type ValidatorMap
Constants ¶
View Source
const ( ContentTypeApplicationJson string = "application/json" ContentTypeApplicationHalJson string = "application/hal+json" ContentTypeMultipartFormData string = "multipart/form-data" ContentTypeImagePng string = "image/png" ContentTypeImageJpeg string = "image/jpeg" ContentTypeImageTiff string = "image/tiff" ContentTypeImageWebp string = "image/webp" ContentTypeImageGif string = "image/gif" ContentTypeImageSvgXml string = "image/svg+xml" ContentTypeImageXIcon string = "image/x-icon" ContentTypeTextPlain string = "text/plain; charset=utf-8" ContentTypeTextHTML string = "text/html" ContentTypeApplicationFormUrlencoded string = "application/x-www-form-urlencoded" ContentTypeApplicationPDF string = "application/pdf" ContentTypeApplicationXMLPattern string = `^application\/(.+)xml$` )
Variables ¶
Functions ¶
func NewGoClientGenerator ¶
func NewGoHandlersGenerator ¶
func NewGoServerGenerator ¶
func NewGoServiceGenerator ¶
func NewGoTypesGenerator ¶
Types ¶
type ApiGenerator ¶
type ApiGenerator struct {
// contains filtered or unexported fields
}
type ApiMockGenerator ¶
type ApiMockGenerator struct {
ApiGenerator
}
type ClientApiGenerator ¶
type ClientApiGenerator struct {
ApiGenerator
}
type ClientApiMockGenerator ¶
type ClientApiMockGenerator struct {
ApiGenerator
}
type Generator ¶
func NewGoAPIGenerator ¶
func NewGoAPIMockGenerator ¶
func NewGoClientAPIGenerator ¶
func NewGoServerAPIGenerator ¶
type GoClientMockGenerator ¶
type GoClientMockGenerator struct {
*GoGenerator
}
func NewGoClientMockGenerator ¶
func NewGoClientMockGenerator(spec *openapi.Spec) *GoClientMockGenerator
func (*GoClientMockGenerator) Generate ¶
func (gen *GoClientMockGenerator) Generate(path, pckg string) error
type GoGenerator ¶
func NewGoGenerator ¶
func NewGoGenerator(spec *openapi.Spec) *GoGenerator
func (*GoGenerator) ConvertMapToSecuritySchemeSlice ¶
func (gen *GoGenerator) ConvertMapToSecuritySchemeSlice(security []map[string][]string) []spec.SecurityScheme
func (*GoGenerator) PopulateParametersBucket ¶
func (gen *GoGenerator) PopulateParametersBucket(bucket *ParametersBucket, parameters []spec.Parameter, security []map[string][]string) (*ParametersBucket, error)
func (*GoGenerator) WalkOperations ¶
func (gen *GoGenerator) WalkOperations(handler func(operation *Operation) error) error
type Operation ¶
type Operation struct { *spec.Operation Method string Route string Path *spec.PathItem Produces []string Consumes []string }
func (*Operation) HasConsume ¶
func (*Operation) HasConsumes ¶
func (*Operation) HasProduce ¶
func (*Operation) HasProduces ¶
func (*Operation) HasValidConsumes ¶
func (*Operation) HasValidProduces ¶
func (*Operation) RegexHasProduces ¶
type ParametersBucket ¶
type ParametersBucket struct { Path []*spec.Parameter Query []*spec.Parameter Header []*spec.Parameter FormData []*spec.Parameter FormDataFiles []*spec.Parameter Security []spec.SecurityScheme Body []*spec.Parameter HasFormData bool HasBody bool HasURLEncoded bool }
func NewParameterBucket ¶
func NewParameterBucket(HasURLEncoded bool) *ParametersBucket
type ServerApiGenerator ¶
type ServerApiGenerator struct {
ApiGenerator
}
type ServerApiMockGenerator ¶
type ServerApiMockGenerator struct {
ApiGenerator
}
type ValidatorMap ¶
func NewValidatorMap ¶
func NewValidatorMap() ValidatorMap
func (ValidatorMap) Add ¶
func (m ValidatorMap) Add(v *types.RegexValidator)
func (ValidatorMap) AddAll ¶
func (m ValidatorMap) AddAll(v []*types.RegexValidator)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.