Versions in this module Expand all Collapse all v1 v1.21.3 Jul 14, 2021 Changes in this version + func VendorImportsFromContext(ctx context.Context) map[string]bool + func WithGenOption(ctx context.Context, simpleDict GenOption) context.Context + func WithVendorImports(ctx context.Context, vendorImports map[string]bool) context.Context + type ClientGenerator struct + ServiceName string + URL *url.URL + func NewClientGenerator(serviceName string, u *url.URL, opts ...GenOptionFn) *ClientGenerator + func (g *ClientGenerator) Load() + func (g *ClientGenerator) Output(cwd string) + type GenOption struct + DefaultEndpoint string + MetricSource string + MetricTarget string + VendorImportByGoMod bool + Version string + func GenOptionFromContext(ctx context.Context) GenOption + type GenOptionFn = func(o *GenOption) + func OptionDefaultEndpoint(defaultEndpoint string) GenOptionFn + func OptionMetricSource(metricSource string) GenOptionFn + func OptionMetricTarget(metricTarget string) GenOptionFn + func OptionVendorImportByGoMod() GenOptionFn + func OptionVersion(version string) GenOptionFn + type OperationGenerator struct + File *codegen.File + ServiceName string + func NewOperationGenerator(serviceName string, file *codegen.File) *OperationGenerator + func (g *OperationGenerator) ID(id string) string + func (g *OperationGenerator) ParamField(ctx context.Context, parameter *oas.Parameter) *codegen.SnippetField + func (g *OperationGenerator) RequestBodyField(ctx context.Context, requestBody *oas.RequestBody) *codegen.SnippetField + func (g *OperationGenerator) ResponseType(ctx context.Context, responses *oas.Responses) (codegen.SnippetType, []string) + func (g *OperationGenerator) Scan(ctx context.Context, openapi *oas.OpenAPI) + func (g *OperationGenerator) WriteOperation(ctx context.Context, method string, path string, operation *oas.Operation) + type ServiceClientGenerator struct + File *codegen.File + ServiceName string + func NewServiceClientGenerator(serviceName string, file *codegen.File) *ServiceClientGenerator + func (g *ServiceClientGenerator) ClientInstanceName() string + func (g *ServiceClientGenerator) ClientInterfaceName() string + func (g *ServiceClientGenerator) OperationMethod(ctx context.Context, operation *oas.Operation, asInterface bool) codegen.Snippet + func (g *ServiceClientGenerator) OperationMethodSimplify(ctx context.Context, operation *oas.Operation, asInterface bool) codegen.Snippet + func (g *ServiceClientGenerator) Scan(ctx context.Context, openapi *oas.OpenAPI) + func (g *ServiceClientGenerator) ScanSimplifyV1(ctx context.Context, openapi *oas.OpenAPI) + func (g *ServiceClientGenerator) ScanSimplifyV2(ctx context.Context, openapi *oas.OpenAPI) + func (g *ServiceClientGenerator) WriteClient() + func (g *ServiceClientGenerator) WriteClientImplSimplifyV1(ctx context.Context) + func (g *ServiceClientGenerator) WriteClientImplSimplifyV2(ctx context.Context) + func (g *ServiceClientGenerator) WriteClientInterface(ctx context.Context, openapi *oas.OpenAPI) + func (g *ServiceClientGenerator) WriteClientSimplify(ctx context.Context, openapi *oas.OpenAPI) + type SimplifyDict map[string]string + type TypeGenerator struct + Enums map[string]scanner.Options + File *codegen.File + ServiceName string + func NewTypeGenerator(serviceName string, file *codegen.File) *TypeGenerator + func (g *TypeGenerator) BasicType(schemaType string, format string) codegen.SnippetType + func (g *TypeGenerator) FieldOf(ctx context.Context, name string, propSchema *oas.Schema, ...) *codegen.SnippetField + func (g *TypeGenerator) FieldsFrom(ctx context.Context, schema *oas.Schema) (fields []*codegen.SnippetField) + func (g *TypeGenerator) Scan(ctx context.Context, openapi *oas.OpenAPI) + func (g *TypeGenerator) Type(ctx context.Context, schema *oas.Schema) (codegen.SnippetType, bool) + func (g *TypeGenerator) TypeIndirect(ctx context.Context, schema *oas.Schema) (codegen.SnippetType, bool)