Documentation ¶
Index ¶
- func AddImport(fset *token.FileSet, f *ast.File, ipath string) (added bool)
- func Copy(src, dst string, copyMode bool) error
- func CopyFile(srcFile, destFile string) error
- func CreateVersionFile(cmdPath, currentVersion string) error
- func DeleteFile(path string) error
- func DeleteImport(fset *token.FileSet, f *ast.File, path string) (deleted bool)
- func DirExists(path string) bool
- func ExecCmd(cmd *exec.Cmd, workingDir string) error
- func FileExists(path string) bool
- func FindGoModPackageSrc(pkg string, version string, latest bool) (srcPath, srcVer string, err error)
- func FindOldPackageSrc(pkg string) (srcPath, srcVer string, err error)
- func GetCLIInfo() (string, string, error)
- func GetContribType(depManager DepManager, ref string) (string, error)
- func GetGoPath() string
- func GetPackageVersionFromGit(dir string) string
- func GetPackageVersionFromSource(pkg string) string
- func IsPkgNotFoundError(err error) bool
- func IsRemote(path string) bool
- func LoadLocalFile(path string) (string, error)
- func LoadRemoteFile(sourceURL string) (string, error)
- func Rename(srcPath string) error
- func ReplaceEnvValue(env []string, envKey string, newValue string) []string
- func SetVerbose(enable bool)
- func Verbose() bool
- type AppImportDetails
- type AppImports
- type DepManager
- type EngineImportDetails
- type EngineImports
- type EngineServiceDetails
- type FlogoAppDescriptor
- type FlogoContribBundleDescriptor
- type FlogoContribDescriptor
- type FlogoImport
- func (flogoImport *FlogoImport) Alias() string
- func (flogoImport *FlogoImport) CanonicalAlias() string
- func (flogoImport *FlogoImport) CanonicalImport() string
- func (flogoImport *FlogoImport) GoGetImportPath() string
- func (flogoImport *FlogoImport) GoImportPath() string
- func (flogoImport *FlogoImport) GoModImportPath() string
- func (flogoImport *FlogoImport) IsClassic() bool
- func (flogoImport *FlogoImport) ModulePath() string
- func (flogoImport *FlogoImport) RelativeImportPath() string
- func (flogoImport *FlogoImport) String() string
- func (flogoImport *FlogoImport) Version() string
- type FlogoTriggerConfig
- type Import
- type Imports
- type ModDepManager
- func (m *ModDepManager) AddDependency(flogoImport Import) error
- func (m *ModDepManager) AddReplacedContribForBuild() error
- func (m *ModDepManager) GetAllImports() (map[string]Import, error)
- func (m *ModDepManager) GetPath(flogoImport Import) (string, error)
- func (m *ModDepManager) Init() error
- func (m *ModDepManager) InstallReplacedPkg(pkg1 string, pkg2 string) error
- func (m *ModDepManager) RemoveImport(flogoImport Import) error
- type PartialAppDescriptor
- type PartialEngineDescriptor
- type Resp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateVersionFile ¶
func DeleteFile ¶
func DeleteImport ¶
DeleteImport deletes the import path from the file f, if present.
func FileExists ¶
func FindGoModPackageSrc ¶
func FindOldPackageSrc ¶
func GetCLIInfo ¶
func GetContribType ¶
func GetContribType(depManager DepManager, ref string) (string, error)
func GetPackageVersionFromGit ¶
retrieve the package version from source in a directory using "git describe" command
func GetPackageVersionFromSource ¶
retrieve the package version from source in GOPATH using "git describe" command
func IsPkgNotFoundError ¶
func LoadLocalFile ¶
func LoadRemoteFile ¶
func SetVerbose ¶
func SetVerbose(enable bool)
Types ¶
type AppImportDetails ¶
type AppImportDetails struct { Imp Import ContribDesc *FlogoContribDescriptor TopLevel bool // a toplevel import i.e. from imports section HasAliasRef bool // imports alias is used by a contrib reference HasDirectRef bool // a direct reference exists for this import }
func (*AppImportDetails) IsCoreContrib ¶
func (d *AppImportDetails) IsCoreContrib() bool
func (*AppImportDetails) Referenced ¶
func (d *AppImportDetails) Referenced() bool
type AppImports ¶
type AppImports struct {
// contains filtered or unexported fields
}
func GetAppImports ¶
func GetAppImports(appJsonFile string, depManager DepManager, resolveContribs bool) (*AppImports, error)
func (*AppImports) GetAllImportDetails ¶
func (ai *AppImports) GetAllImportDetails() []*AppImportDetails
func (*AppImports) GetAllImports ¶
func (ai *AppImports) GetAllImports() []Import
func (*AppImports) GetOrphanedReferences ¶
func (ai *AppImports) GetOrphanedReferences() []string
type DepManager ¶
type DepManager interface { Init() error AddDependency(flogoImport Import) error GetPath(flogoImport Import) (string, error) AddReplacedContribForBuild() error InstallReplacedPkg(string, string) error GetAllImports() (map[string]Import, error) }
func NewDepManager ¶
func NewDepManager(sourceDir string) DepManager
type EngineImportDetails ¶
type EngineImports ¶
type EngineImports struct {
// contains filtered or unexported fields
}
func GetEngineImports ¶
func GetEngineImports(engJsonFile string, depManager DepManager) (*EngineImports, error)
func (*EngineImports) GetAllImportDetails ¶
func (ai *EngineImports) GetAllImportDetails() []*EngineImportDetails
func (*EngineImports) GetAllImports ¶
func (ai *EngineImports) GetAllImports() []Import
func (*EngineImports) GetOrphanedReferences ¶
func (ai *EngineImports) GetOrphanedReferences() []string
type EngineServiceDetails ¶
type EngineServiceDetails struct {
Ref string
}
type FlogoAppDescriptor ¶
type FlogoAppDescriptor struct { Name string `json:"name"` Type string `json:"type"` Version string `json:"version"` Description string `json:"description"` AppModel string `json:"appModel,omitempty"` Imports []string `json:"imports"` Triggers []*FlogoTriggerConfig `json:"triggers"` }
FlogoAppDescriptor is the descriptor for a Flogo application
func ParseAppDescriptor ¶
func ParseAppDescriptor(appJson string) (*FlogoAppDescriptor, error)
ParseAppDescriptor parse the application descriptor
type FlogoContribDescriptor ¶
type FlogoContribDescriptor struct { Name string `json:"name"` Type string `json:"type"` Version string `json:"version"` Description string `json:"description"` Homepage string `json:"homepage"` Shim string `json:"shim"` Ref string `json:"ref"` //legacy IsLegacy bool `json:"-"` }
FlogoAppDescriptor is the descriptor for a Flogo application
func GetContribDescriptor ¶
func GetContribDescriptor(contribPath string) (*FlogoContribDescriptor, error)
func GetContribDescriptorFromImport ¶
func GetContribDescriptorFromImport(depManager DepManager, contribImport Import) (*FlogoContribDescriptor, error)
func ReadContribDescriptor ¶
func ReadContribDescriptor(descriptorFile string) (*FlogoContribDescriptor, error)
func (*FlogoContribDescriptor) GetContribType ¶
func (d *FlogoContribDescriptor) GetContribType() string
type FlogoImport ¶
type FlogoImport struct {
// contains filtered or unexported fields
}
func (*FlogoImport) Alias ¶
func (flogoImport *FlogoImport) Alias() string
func (*FlogoImport) CanonicalAlias ¶
func (flogoImport *FlogoImport) CanonicalAlias() string
func (*FlogoImport) CanonicalImport ¶
func (flogoImport *FlogoImport) CanonicalImport() string
func (*FlogoImport) GoGetImportPath ¶
func (flogoImport *FlogoImport) GoGetImportPath() string
func (*FlogoImport) GoImportPath ¶
func (flogoImport *FlogoImport) GoImportPath() string
func (*FlogoImport) GoModImportPath ¶
func (flogoImport *FlogoImport) GoModImportPath() string
func (*FlogoImport) IsClassic ¶
func (flogoImport *FlogoImport) IsClassic() bool
func (*FlogoImport) ModulePath ¶
func (flogoImport *FlogoImport) ModulePath() string
func (*FlogoImport) RelativeImportPath ¶
func (flogoImport *FlogoImport) RelativeImportPath() string
func (*FlogoImport) String ¶
func (flogoImport *FlogoImport) String() string
func (*FlogoImport) Version ¶
func (flogoImport *FlogoImport) Version() string
type FlogoTriggerConfig ¶
type Import ¶
type Import interface { fmt.Stringer ModulePath() string RelativeImportPath() string Version() string Alias() string CanonicalImport() string // canonical import is used in flogo.json imports array and to check for equality of imports GoImportPath() string // the import path used in .go files GoGetImportPath() string // the import path used by "go get" command GoModImportPath() string // the import path used by "go mod edit" command IsClassic() bool // an import is "classic" if it has no : character separator, hence no relative import path CanonicalAlias() string // canonical alias is the alias used in the flogo.json }
func NewFlogoImport ¶
func NewFlogoImportFromPath ¶
func ParseImport ¶
type ModDepManager ¶
type ModDepManager struct {
// contains filtered or unexported fields
}
func (*ModDepManager) AddDependency ¶
func (m *ModDepManager) AddDependency(flogoImport Import) error
func (*ModDepManager) AddReplacedContribForBuild ¶
func (m *ModDepManager) AddReplacedContribForBuild() error
func (*ModDepManager) GetAllImports ¶
func (m *ModDepManager) GetAllImports() (map[string]Import, error)
func (*ModDepManager) GetPath ¶
func (m *ModDepManager) GetPath(flogoImport Import) (string, error)
GetPath gets the path of where the
func (*ModDepManager) Init ¶
func (m *ModDepManager) Init() error
func (*ModDepManager) InstallReplacedPkg ¶
func (m *ModDepManager) InstallReplacedPkg(pkg1 string, pkg2 string) error
func (*ModDepManager) RemoveImport ¶
func (m *ModDepManager) RemoveImport(flogoImport Import) error
type PartialAppDescriptor ¶
type PartialAppDescriptor struct { AppModel string `json:"appModel"` Imports []string `json:"imports"` Triggers []interface{} `json:"triggers"` Resources []interface{} `json:"resources"` Actions []interface{} `json:"actions"` }
PartialAppDescriptor is the descriptor for a Flogo application
type PartialEngineDescriptor ¶
type PartialEngineDescriptor struct { Imports []string `json:"imports"` Services []*EngineServiceDetails `json:"services"` }
PartialEngineDescriptor is the descriptor for a Flogo application
Click to show internal directories.
Click to hide internal directories.