portal

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const CLOUD_APPLICATION = "commerce-cloud"

Variables

View Source
var AllowedDeploymentModes = map[string]struct{}{
	"ROLLING_UPDATE": {},
	"RECREATE":       {},
}

.../v1/deploymentmodes {"deploymentMode":["ROLLING_UPDATE","RECREATE"],"dataMigrationMode":["NONE","UPDATE","INITIALIZE"]}

View Source
var AllowedMigrationModes = map[string]struct{}{
	"NONE":       {},
	"UPDATE":     {},
	"INITIALIZE": {},
}
View Source
var PORTAL, _ = url.Parse("https://portal.commerce.ondemand.com/")

Functions

This section is empty.

Types

type Build

type Build struct {
	Name             string `json:"name"`
	Branch           string `json:"branch"`
	ApplicationCode  string `json:"applicationCode"`
	SubscriptionCode string `json:"subscriptionCode"`
}

func NewBuild

func NewBuild(subscription, name, branch string) Build

type BuildMeta

type BuildMeta struct {
	Code                         string
	Name                         string
	CreatedBy                    string
	Status                       string
	Branch                       string
	BuildVersion                 string
	BuildStartTime               string
	BuildEndTime                 string
	ApplicationName              string
	ApplicationCode              string
	ApplicationDefinitionVersion string
	CreatedOn                    string
	ProgressData                 interface{}
	Properties                   []Properties
}

type BuildPage

type BuildPage struct {
	Params  PageParams
	Content []BuildMeta
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(subscription string, certPEMBlock, keyPEMBlock []byte, jarfile string) Client

func (*Client) CreateBuild

func (pc *Client) CreateBuild(name, branch string) (newBuild BuildMeta)

func (*Client) CreateDeployment

func (pc *Client) CreateDeployment(environment, migrationMode, deploymentMode, release string) (r RunningDeployment)

func (*Client) GetAllBuilds

func (pc *Client) GetAllBuilds() (meta []BuildMeta)

func (*Client) GetBuild

func (pc *Client) GetBuild(code string) (meta BuildMeta)

func (*Client) GetBuildLogReader

func (pc *Client) GetBuildLogReader(code string) io.ReadCloser

func (*Client) GetCustomerProperties

func (pc *Client) GetCustomerProperties(environment, aspect string) (p Properties)

func (*Client) GetDeployments

func (pc *Client) GetDeployments(environment string) (r []RunningDeployment)

func (*Client) GetInitialPasswords

func (pc *Client) GetInitialPasswords(environment string) (p InitialPasswords)

func (*Client) GetRunningDeployments

func (pc *Client) GetRunningDeployments(environment string) (r []RunningDeployment)

func (*Client) SaveCookieJar

func (pc *Client) SaveCookieJar() error

func (*Client) SetCustomerProperties

func (pc *Client) SetCustomerProperties(environment, aspect, filename string) (p Properties)

type Deployment

type Deployment struct {
	EnvironmentCode     string `json:"environmentCode"`
	DatabaseUpdateMode  string `json:"databaseUpdateMode"`
	Strategy            string `json:"strategy"`
	CustomerReleaseCode string `json:"customerReleaseCode"`
	ApplicationCode     string `json:"applicationCode"`
}

{"environmentCode":"d8","databaseUpdateMode":"NONE","strategy":"RECREATE","customerReleaseCode":"20180912.2","applicationCode":"commerce-cloud"}

func NewDeployment

func NewDeployment(environment, migrationMode, updateMode, releaseCode string) Deployment

type InitialPasswordEntry

type InitialPasswordEntry struct {
	Uid      string
	Password string
}

type InitialPasswords

type InitialPasswords struct {
	Key   string
	Value []InitialPasswordEntry
}

type PageParams

type PageParams struct {
	TotalPages       int
	TotalElements    int
	Number           int
	Size             int
	NumberOfElements int
	First            bool
	Last             bool
	Sort             string
}

type Properties

type Properties struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func NewProperties

func NewProperties(key, value string) Properties

type RunningDeployment

type RunningDeployment struct {
	CustomerReleaseCode          string
	EnvironmentCode              string
	Mode                         string
	ApplicationCode              string
	ScheduledDate                string
	RollingDeployment            bool
	ApplicationDefinitionVersion string
	Status                       string
}

Jump to

Keyboard shortcuts

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