landscape

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright © 2022 Aleksandr Ivanov <shamrockspb@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Id             string
	Template       string
	Configurations map[string]*Configuration
}

type Configuration

type Configuration struct {
	Environment string
	Parameters  []*Parameter
}

type Environment

type Environment struct {
	Id     string
	Name   string
	Suffix string
	System *System
}

type Landscape

type Landscape struct {
	Name                string
	Systems             map[string]*System
	Packages            map[string]*Package
	Environments        map[string]*Environment
	OriginalEnvironment *Environment
}

import cpiclient

func NewLandscape

func NewLandscape(configFile string) (*Landscape, error)

func (*Landscape) GetArtifactConfiguration

func (landscape *Landscape) GetArtifactConfiguration(environment string, pkg string, artifact string) ([]*Parameter, error)

func (*Landscape) GetArtifactsByTemplate added in v0.5.0

func (landscape *Landscape) GetArtifactsByTemplate(template string) []*Artifact

Get list of artifacts, that are based on selected template

func (*Landscape) GetEnvironment

func (landscape *Landscape) GetEnvironment(environment string) (*Environment, error)

Get environment by ID

func (*Landscape) GetSystem4Environment

func (landscape *Landscape) GetSystem4Environment(environment *string) (*System, error)

type LandscapeYAML

type LandscapeYAML struct {
	Landscape struct {
		Name    string
		Systems []struct {
			Id       string
			Name     string
			Host     string
			Login    string
			Password string
		}
		Packages []struct {
			Id        string
			Artifacts []struct {
				Id             string
				Template       string
				Configurations []struct {
					Environment string
					Parameters  []struct {
						Key   string
						Value string
						Type  string
					}
				}
			}
		}
		Environments []struct {
			Id     string
			Name   string
			Suffix string
			System string
		}
		OriginalEnvironment string `yaml:"originalEnvironment"`
	}
}

type Package

type Package struct {
	Id        string
	Artifacts map[string]*Artifact
}

type Parameter

type Parameter struct {
	Key   string
	Value string
	Type  string
}

type System

type System struct {
	Id     string
	Name   string
	Client *cpiclient.CPIClient
}

Jump to

Keyboard shortcuts

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