model

package
v30.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package model holds the business logic for the operations made available by profileBuilder.

This package is not governed by the SemVer associated with the rest of the Azure-SDK-for-Go.

Package model holds the business logic for the operations made available by profileBuilder.

This package is not governed by the SemVer associated with the rest of the Azure-SDK-for-Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildProfile

func BuildProfile(packageList ListDefinition, name, outputLocation string, outputLog, errLog *log.Logger, recursive bool)

BuildProfile takes a list of packages and creates a profile

func DeleteChildDirs

func DeleteChildDirs(dir string) error

DeleteChildDirs deletes all child directories in the specified directory.

Types

type AliasPackage

type AliasPackage ast.Package

AliasPackage is an abstraction around ast.Package to provide convenience methods for manipulating it.

func NewAliasPackage

func NewAliasPackage(original *ast.Package, importPath string) (*AliasPackage, error)

NewAliasPackage creates an alias package from the specified input package. Parameter importPath is the import path specified to consume the package.

func (*AliasPackage) AddConst

func (alias *AliasPackage) AddConst(decl *ast.GenDecl) error

AddConst adds a Const block with indiviual aliases for each Spec in `decl`.

func (*AliasPackage) AddFunc

func (alias *AliasPackage) AddFunc(decl *ast.FuncDecl) error

AddFunc creates a stub method to redirect the call to the original package, then adds it to the model file.

func (*AliasPackage) AddGeneral

func (alias *AliasPackage) AddGeneral(decl *ast.GenDecl) error

AddGeneral handles dispatching a GenDecl to either AddConst or AddType.

func (*AliasPackage) AddType

func (alias *AliasPackage) AddType(decl *ast.GenDecl) error

AddType adds a Type delcaration block with individual alias for each Spec handed in `decl`

func (AliasPackage) ModelFile

func (alias AliasPackage) ModelFile() *ast.File

ModelFile is a getter for the file accumulating aliased content.

type ErrorUnexpectedToken

type ErrorUnexpectedToken struct {
	Expected token.Token
	Received token.Token
}

func (ErrorUnexpectedToken) Error

func (utoken ErrorUnexpectedToken) Error() string

type ListDefinition

type ListDefinition struct {
	Include      []string          `json:"include"`
	PathOverride map[string]string `json:"pathOverride"`
}

ListDefinition represents a JSON file that contains a list of packages to include

func GetLatestPackages

func GetLatestPackages(rootDir string, includePreview bool, verboseLog *log.Logger) (ListDefinition, error)

Jump to

Keyboard shortcuts

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