sdk

package
v0.0.0-...-3b91dd1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSDK

type ClientSDK struct {
	// CurrentDir sets the path for sgen to run in. Defaults to the
	// current directory.
	CurrentDir string
	// TemplateData is the dynamic data parts fetched and assumed from
	// the swagger.yaml file to render the client api sdk.
	TemplateData
}

func New

func New(specDoc *loads.Document, currentDir string, conf config.Config) (*ClientSDK, error)

New sets up and returns an instance of the SDK generator

func (*ClientSDK) Render

func (c *ClientSDK) Render() error

Render renders the client api sdk from the given templates using the swagger configuration data loaded by viper and applying it to the templates to render a set of .go files.

func (*ClientSDK) RenderClient

func (c *ClientSDK) RenderClient() error

Render renders the client api sdk from the given templates using the swagger configuration data loaded by viper and applying it to the templates to render a set of .go files.

type Operation

type Operation struct {
	Path  string
	Props spec.OperationProps
}

type SGen

type SGen struct {
	// The output path, defined by the -o flag, where the sdk will render
	OutputPath string
	// SGenVersion is the version of the sdk generator library.
	Version string
}

Metadata contains the global details for a typical client sdk

type TemplateData

type TemplateData struct {
	SGen
	Spec       *spec.Swagger
	Operations map[string][]Operation
}

Jump to

Keyboard shortcuts

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