exporter

package
v0.714.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SyslRefToJSONSchema added in v0.76.0

func SyslRefToJSONSchema(syslRef string) string

Types

type EndpointExporter

type EndpointExporter struct {
	// contains filtered or unexported fields
}

type Exporter added in v0.249.0

type Exporter interface {
	// ExportFile reads in a Sysl file from path, converts it to the output format, and writes it to
	// the file system.
	ExportFile(path string) error
	// ExportApp takes a Sysl app, converts it to the output format, and writes it to the file
	// system.
	ExportApp(app *sysl.Application) error
}

Exporter is an interface implemented by all Sysl exporters.

type OpenAPI3Exporter added in v0.76.0

type OpenAPI3Exporter struct {
	// contains filtered or unexported fields
}

func MakeOpenAPI3Exporter added in v0.76.0

func MakeOpenAPI3Exporter(apps map[string]*syslwrapper.App, logger *logrus.Logger) *OpenAPI3Exporter

func (*OpenAPI3Exporter) Export added in v0.76.0

func (s *OpenAPI3Exporter) Export() error

func (*OpenAPI3Exporter) GenerateOpenAPI3 added in v0.76.0

func (s *OpenAPI3Exporter) GenerateOpenAPI3(app *syslwrapper.App) (*openapi3.T, error)

func (*OpenAPI3Exporter) SerializeOutput added in v0.76.0

func (s *OpenAPI3Exporter) SerializeOutput(appName string, mode string) ([]byte, error)

type SwaggerExporter

type SwaggerExporter struct {
	// contains filtered or unexported fields
}

func MakeSwaggerExporter

func MakeSwaggerExporter(app *proto.Application, logger *logrus.Logger) *SwaggerExporter

func (*SwaggerExporter) GenerateSwagger

func (s *SwaggerExporter) GenerateSwagger() error

func (*SwaggerExporter) SerializeOutput

func (s *SwaggerExporter) SerializeOutput(mode string) ([]byte, error)

type TransformExporter added in v0.505.0

type TransformExporter struct {
	// contains filtered or unexported fields
}

TransformExporter enables exporting into various formats by running embedded arr.ai transform scripts that convert Sysl.

func MakeTransformExporter added in v0.505.0

func MakeTransformExporter(
	fs afero.Fs,
	logger *logrus.Logger,
	rootPath, outPath,
	transformName string,
) *TransformExporter

func (*TransformExporter) ExportApp added in v0.505.0

func (e *TransformExporter) ExportApp(*sysl.Application) error

func (*TransformExporter) ExportFile added in v0.505.0

func (e *TransformExporter) ExportFile(modules []*sysl.Module, modulePaths []string) error

ExportFile reads in a Sysl file from path, converts it to the output format, and writes it to the file system.

func (*TransformExporter) ExportToWriter added in v0.511.0

func (e *TransformExporter) ExportToWriter(w io.Writer, modules []*sysl.Module, modulePaths []string) error

type TypeExporter

type TypeExporter struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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