cloud-mta

command module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

README

CircleCI Go Report Card Coverage Status contributions welcome GoDoc GitHub license pre-alpha

Description

MTA tool for exploring and validating the multitarget application descriptor (mta.yaml).

The tool commands (APIs) are used to do the following:

  • Explore the structure of the mta.yaml file objects, such as retrieving a list of resources required by a specific module.
  • Validate an mta.yaml file against a specified schema version.
  • Ensure semantic correctness of an mta.yaml file, such as the uniqueness of module/resources names, the resolution of requires/provides pairs, and so on.
  • Validate the descriptor against the project folder structure, such as the path attribute reference in an existing project folder.
  • Get data for constructing a deployment MTA descriptor, such as deployment module types.

Multitarget Applications

A multitarget application is a package comprised of multiple application and resource modules that have been created using different technologies and deployed to different run-times; however, they have a common life cycle. A user can bundle the modules together using the mta.yaml file, describe them along with their inter-dependencies to other modules, services, and interfaces, and package them in an MTA project.

Requirements

Download and Installation

  1. Set your workspace.

  2. Download and install it:

    $ go get github.com/SAP/cloud-mta/mta
    

Usage

  • Import it into your source code:

    import "github.com/SAP/cloud-mta/mta"
    
  • Quick start example:

    
    // sets the path to the MTA project.
    mf, _ := ioutil.ReadFile("/path/mta.yaml")
    // Returns an MTA object.
    if err != nil {
    	return err
    }
    // unmarshal MTA content.
    m := Unmarshal(mf)
    if err != nil {
    	return err
    }
    // Returns the module properties.
    module, err := m.GetModuleByName(moduleName)
    if err != nil {
    	return err
    }
    

Contributions

Contributions are greatly appreciated. See CONTRIBUTING.md for details.

Known Issues

No known major issues. To report a new issue, please use our GitHub bug tracking system.

Support

Please follow our issue template on how to report an issue.

License

Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.

This file is licensed under the Apache 2.0 License except as noted otherwise in the LICENSE file.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
fs
Package mta provides a convenient way of exploring the structure of `mta.yaml` file objects such as retrieving a list of resources required by a specific module.
Package mta provides a convenient way of exploring the structure of `mta.yaml` file objects such as retrieving a list of resources required by a specific module.

Jump to

Keyboard shortcuts

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