internal

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TEMPLATE_SUFFIX = ".tmpl"

Variables

This section is empty.

Functions

func GetTypeName

func GetTypeName(n ast.Node) string

Types

type AWSInterfaceVisitor

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

func NewAWSInterfaceVisitor

func NewAWSInterfaceVisitor(fileSet *token.FileSet) *AWSInterfaceVisitor

func (*AWSInterfaceVisitor) String

func (g *AWSInterfaceVisitor) String() string

func (*AWSInterfaceVisitor) Visit

func (g *AWSInterfaceVisitor) Visit(node ast.Node) ast.Visitor

type AWSSDKDefinition

type AWSSDKDefinition struct {
	Version  string
	Services []*InterfaceDefinition
}

type AWSStructVisitor

type AWSStructVisitor struct {
	Structs []*StructDefinition
	Current *StructDefinition
	// contains filtered or unexported fields
}

func NewAWSStructVisitor

func NewAWSStructVisitor(fileSet *token.FileSet, packageName string) *AWSStructVisitor

func (*AWSStructVisitor) String

func (g *AWSStructVisitor) String() string

func (*AWSStructVisitor) Visit

func (g *AWSStructVisitor) Visit(node ast.Node) ast.Visitor

type FieldDefinition

type FieldDefinition struct {
	Name string
	Type string
}

type InterfaceDefinition

type InterfaceDefinition struct {
	// Service name (lower-cased, URL compatible service name)
	ID string
	// Service name (friendly name)
	Name string
	// Service methods
	Methods []*MethodDefinition
}

func ParseAwsSdk

func ParseAwsSdk(serviceName string) ([]*InterfaceDefinition, error)

ParseAwsSdk calls generator function for each AWS Service iDefinition

func (InterfaceDefinition) Imports

func (i InterfaceDefinition) Imports() []string

func (InterfaceDefinition) String

func (i InterfaceDefinition) String() string

type MethodDefinition

type MethodDefinition struct {
	// Method name
	Name string
	// Input structure
	Input *StructDefinition
	// Output structure
	Output *StructDefinition
}

func (*MethodDefinition) String

func (m *MethodDefinition) String() string

type MultiFileWriter

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

func (*MultiFileWriter) Close

func (m *MultiFileWriter) Close()

func (*MultiFileWriter) SetCurrentFile

func (m *MultiFileWriter) SetCurrentFile(name string) error

func (*MultiFileWriter) Write

func (m *MultiFileWriter) Write(p []byte) (n int, err error)

type StructDefinition

type StructDefinition struct {
	Package string
	Name    string
	Fields  map[string]*FieldDefinition
}

func NewStructDefinition

func NewStructDefinition(pkg, name string) *StructDefinition

func (*StructDefinition) HasField

func (s *StructDefinition) HasField(fieldName string) bool

type TemporalAWSGenerator

type TemporalAWSGenerator struct {
	TemplateDir string
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(templateDir string) *TemporalAWSGenerator

func (*TemporalAWSGenerator) GenerateCode

func (g *TemporalAWSGenerator) GenerateCode(outputDir string, definitions []*InterfaceDefinition) error

Jump to

Keyboard shortcuts

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