portal

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 13 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 {
	SubscriptionCode             string
	ApplicationCode              string
	ApplicationDefinitionVersion string
	Code                         string
	Name                         string
	CreatedBy                    string
	Status                       string
	Branch                       string
	BuildVersion                 string
	BuildStartTimeStamp          string
	BuildEndTimeStamp            string
	Properties                   []Properties
}

type BuildPage

type BuildPage struct {
	Count int
	Value []BuildMeta
}

type BuildResponse added in v0.6.1

type BuildResponse struct {
	SubscriptionCode string
	Code             string
}

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) (r BuildResponse)

func (*Client) CreateDeployment

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

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 DeploymentPage)

func (*Client) GetInitialPasswords

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

func (*Client) GetRunningDeployments

func (pc *Client) GetRunningDeployments(environment string) (r DeploymentPage)

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"`
	BuildCode          string `json:"buildCode"`
}

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

func NewDeployment

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

type DeploymentMeta added in v0.6.1

type DeploymentMeta struct {
	Code                          string
	SubscriptionCode              string
	CreatedBy                     string
	CreatedTimestamp              string
	BuildCode                     string
	EnvironmentCode               string
	DatabaseUpdateMode            string
	Strategy                      string
	ScheduledTimestamp            string
	DeployedTimestamp             string
	FailedTimestamp               string
	UndeployedTimestamp           string
	Status                        string
	CanceledBy                    string
	CanceledTimestamp             string
	CancellationFinishedTimestamp string
	CancellationFailed            string
	Cancelation                   string
}

type DeploymentPage added in v0.6.1

type DeploymentPage struct {
	Value []DeploymentMeta
	Count int
}

type DeploymentResponse added in v0.6.1

type DeploymentResponse struct {
	SubscriptionCode string
	Code             string
}

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

Jump to

Keyboard shortcuts

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