Documentation
¶
Index ¶
- Constants
- func Archive(sourcePath, targetArchivePath string) (e error)
- func CloseFile(file io.Closer, err error) error
- func CopyByPatterns(source, target string, patterns []string) error
- func CopyDir(src string, dst string, withParents bool) error
- func CopyEntries(entries []os.FileInfo, src, dst string) (rerr error)
- func CopyFile(src, dst string) (rerr error)
- func CopyFileWithMode(src, dst string, mode os.FileMode) (rerr error)
- func CreateDirIfNotExist(dir string) error
- func CreateFile(path string) (file *os.File, err error)
- func Read(ep IMtaYaml) ([]byte, error)
- func ReadExt(ep IMtaExtYaml, platform string) ([]byte, error)
- func ValidateDeploymentDescriptor(descriptor string) error
- type IDescriptor
- type IModule
- type IMtaExtYaml
- type IMtaParser
- type IMtaYaml
- type ISourceModule
- type ITargetArtifacts
- type ITargetModule
- type ITargetPath
- type Loc
- func (ep *Loc) GetDescriptor() string
- func (ep *Loc) GetManifestPath() string
- func (ep *Loc) GetMetaPath() string
- func (ep *Loc) GetMtaExtYamlPath(platform string) string
- func (ep *Loc) GetMtaYamlFilename() string
- func (ep *Loc) GetMtaYamlPath() string
- func (ep *Loc) GetMtadPath() string
- func (ep *Loc) GetSource() string
- func (ep *Loc) GetSourceModuleDir(modulePath string) string
- func (ep *Loc) GetTarget() string
- func (ep *Loc) GetTargetModuleDir(moduleName string) string
- func (ep *Loc) GetTargetModuleZipPath(moduleName string) string
- func (ep *Loc) GetTargetTmpDir() string
- func (ep *Loc) IsDeploymentDescriptor() bool
- func (ep *Loc) ParseExtFile(platform string) (*mta.EXT, error)
- func (ep *Loc) ParseFile() (*mta.MTA, error)
Constants ¶
const ( //Dep - deployment descriptor Dep = "dep" //Dev - development descriptor Dev = "dev" // TempFolderSuffix - temporary folder suffix TempFolderSuffix = "_mta_build_tmp" )
Variables ¶
This section is empty.
Functions ¶
func Archive ¶
Archive module and mtar artifacts, compatible with the JAR specification to support the spec requirements Source Path to be zipped Target artifact
func CloseFile ¶
CloseFile - closes file error handling takes into account error of the calling function
func CopyByPatterns ¶
CopyByPatterns - copy files/directories according to patterns from source folder to target folder patterns are relative to source folder
func CopyEntries ¶
CopyEntries - copies entries (files and directories) from source to destination folder
func CopyFileWithMode ¶
CopyFileWithMode - copy file content using file mode parameter
func CreateDirIfNotExist ¶
CreateDirIfNotExist - Create new dir
func CreateFile ¶
CreateFile - create new file
func ReadExt ¶
func ReadExt(ep IMtaExtYaml, platform string) ([]byte, error)
ReadExt returns mta extension byte slice.
func ValidateDeploymentDescriptor ¶
ValidateDeploymentDescriptor validates the deployment descriptor.
Types ¶
type IDescriptor ¶
IDescriptor - descriptor interface
type IMtaExtYaml ¶
IMtaExtYaml - MTA Extension Yaml interface
type IMtaParser ¶
type IMtaParser interface {
ParseFile() (*mta.MTA, error)
ParseExtFile(platform string) (*mta.EXT, error)
}
IMtaParser - MTA Parser interface
type ISourceModule ¶
ISourceModule - source module interface
type ITargetArtifacts ¶
type ITargetArtifacts interface {
GetMetaPath() string
GetMtadPath() string
GetManifestPath() string
}
ITargetArtifacts - target artifacts interface
type ITargetModule ¶
type ITargetModule interface {
GetTargetModuleDir(moduleName string) string
GetTargetModuleZipPath(moduleName string) string
}
ITargetModule - Target Module interface
type ITargetPath ¶
ITargetPath - target path interface
type Loc ¶
type Loc struct {
// SourcePath - Path to MTA project
SourcePath string
// TargetPath - Path to results
TargetPath string
// MtaFilename - MTA yaml filename "mta.yaml" by default
MtaFilename string
// Descriptor - indicator of deployment descriptor usage (mtad.yaml)
Descriptor string
}
Loc - MTA tool file properties
func (*Loc) GetDescriptor ¶
GetDescriptor - gets descriptor type of Location
func (*Loc) GetManifestPath ¶
GetManifestPath gets the path to the generated manifest file.
func (*Loc) GetMetaPath ¶
GetMetaPath gets the path to the generated META-INF directory.
func (*Loc) GetMtaExtYamlPath ¶
GetMtaExtYamlPath gets the MTA extension .yaml file path.
func (*Loc) GetMtaYamlFilename ¶
GetMtaYamlFilename - Gets the MTA .yaml file name.
func (*Loc) GetMtaYamlPath ¶
GetMtaYamlPath gets the MTA .yaml file path.
func (*Loc) GetMtadPath ¶
GetMtadPath gets the path to the generated MTAD file.
func (*Loc) GetSource ¶
GetSource gets the processed project path; if it is not provided, use the current directory.
func (*Loc) GetSourceModuleDir ¶
GetSourceModuleDir gets the path to the module to be packed. The subdirectory is in the source.
func (*Loc) GetTarget ¶
GetTarget gets the target path; if it is not provided, use the path of the processed project.
func (*Loc) GetTargetModuleDir ¶
GetTargetModuleDir gets the path to the packed module directory. The subdirectory in the temporary target directory is named by the module name.
func (*Loc) GetTargetModuleZipPath ¶
GetTargetModuleZipPath gets the path to the packed module data.zip file. The subdirectory in temporary target directory is named by the module name.
func (*Loc) GetTargetTmpDir ¶
GetTargetTmpDir gets the temporary target directory path. The subdirectory in the target folder is named as the source project folder.
func (*Loc) IsDeploymentDescriptor ¶
IsDeploymentDescriptor checks whether the flag is related to the deployment descriptor.
func (*Loc) ParseExtFile ¶
ParseExtFile returns a reference to the MTA object from a given mta.yaml file.