Documentation ¶
Index ¶
- type ClientGenerator
- type OperationGenerator
- func (g *OperationGenerator) ID(id string) string
- func (g *OperationGenerator) ParamField(parameter *oas.Parameter) *codegen.SnippetField
- func (g *OperationGenerator) RequestBodyField(requestBody *oas.RequestBody) *codegen.SnippetField
- func (g *OperationGenerator) ResponseType(responses *oas.Responses) (codegen.SnippetType, []string)
- func (g *OperationGenerator) Scan(openapi *oas.OpenAPI)
- func (g *OperationGenerator) WriteOperation(method string, path string, operation *oas.Operation)
- type ServiceClientGenerator
- func (g *ServiceClientGenerator) ClientInstanceName() string
- func (g *ServiceClientGenerator) ClientInterfaceName() string
- func (g *ServiceClientGenerator) OperationMethod(operation *oas.Operation, asInterface bool) codegen.Snippet
- func (g *ServiceClientGenerator) Scan(openapi *oas.OpenAPI)
- func (g *ServiceClientGenerator) WriteClient()
- func (g *ServiceClientGenerator) WriteClientInterface(openapi *oas.OpenAPI)
- type TypeGenerator
- func (g *TypeGenerator) BasicType(schemaType string, format string) codegen.SnippetType
- func (g *TypeGenerator) FieldOf(name string, propSchema *oas.Schema, requiredFields map[string]bool) *codegen.SnippetField
- func (g *TypeGenerator) FieldsFrom(schema *oas.Schema) (fields []*codegen.SnippetField)
- func (g *TypeGenerator) Scan(openapi *oas.OpenAPI)
- func (g *TypeGenerator) Type(schema *oas.Schema) (codegen.SnippetType, bool)
- func (g *TypeGenerator) TypeIndirect(schema *oas.Schema) (codegen.SnippetType, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientGenerator ¶
type ClientGenerator struct { ServiceName string URL *url.URL // contains filtered or unexported fields }
func NewClientGenerator ¶
func NewClientGenerator(serviceName string, u *url.URL) *ClientGenerator
func (*ClientGenerator) Load ¶
func (g *ClientGenerator) Load()
func (*ClientGenerator) Output ¶
func (g *ClientGenerator) Output(cwd string)
type OperationGenerator ¶
func NewOperationGenerator ¶
func NewOperationGenerator(serviceName string, file *codegen.File) *OperationGenerator
func (*OperationGenerator) ID ¶
func (g *OperationGenerator) ID(id string) string
func (*OperationGenerator) ParamField ¶
func (g *OperationGenerator) ParamField(parameter *oas.Parameter) *codegen.SnippetField
func (*OperationGenerator) RequestBodyField ¶
func (g *OperationGenerator) RequestBodyField(requestBody *oas.RequestBody) *codegen.SnippetField
func (*OperationGenerator) ResponseType ¶
func (g *OperationGenerator) ResponseType(responses *oas.Responses) (codegen.SnippetType, []string)
func (*OperationGenerator) Scan ¶
func (g *OperationGenerator) Scan(openapi *oas.OpenAPI)
func (*OperationGenerator) WriteOperation ¶
func (g *OperationGenerator) WriteOperation(method string, path string, operation *oas.Operation)
type ServiceClientGenerator ¶ added in v1.6.0
func NewServiceClientGenerator ¶ added in v1.6.0
func NewServiceClientGenerator(serviceName string, file *codegen.File) *ServiceClientGenerator
func (*ServiceClientGenerator) ClientInstanceName ¶ added in v1.6.0
func (g *ServiceClientGenerator) ClientInstanceName() string
func (*ServiceClientGenerator) ClientInterfaceName ¶ added in v1.6.0
func (g *ServiceClientGenerator) ClientInterfaceName() string
func (*ServiceClientGenerator) OperationMethod ¶ added in v1.6.0
func (*ServiceClientGenerator) Scan ¶ added in v1.6.0
func (g *ServiceClientGenerator) Scan(openapi *oas.OpenAPI)
func (*ServiceClientGenerator) WriteClient ¶ added in v1.6.0
func (g *ServiceClientGenerator) WriteClient()
func (*ServiceClientGenerator) WriteClientInterface ¶ added in v1.6.0
func (g *ServiceClientGenerator) WriteClientInterface(openapi *oas.OpenAPI)
type TypeGenerator ¶
type TypeGenerator struct { ServiceName string File *codegen.File Enums map[string][]enumeration.EnumOption }
func NewTypeGenerator ¶
func NewTypeGenerator(serviceName string, file *codegen.File) *TypeGenerator
func (*TypeGenerator) BasicType ¶
func (g *TypeGenerator) BasicType(schemaType string, format string) codegen.SnippetType
func (*TypeGenerator) FieldOf ¶
func (g *TypeGenerator) FieldOf(name string, propSchema *oas.Schema, requiredFields map[string]bool) *codegen.SnippetField
func (*TypeGenerator) FieldsFrom ¶
func (g *TypeGenerator) FieldsFrom(schema *oas.Schema) (fields []*codegen.SnippetField)
func (*TypeGenerator) Scan ¶
func (g *TypeGenerator) Scan(openapi *oas.OpenAPI)
func (*TypeGenerator) Type ¶
func (g *TypeGenerator) Type(schema *oas.Schema) (codegen.SnippetType, bool)
func (*TypeGenerator) TypeIndirect ¶
func (g *TypeGenerator) TypeIndirect(schema *oas.Schema) (codegen.SnippetType, bool)
Click to show internal directories.
Click to hide internal directories.