da

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Authenticator        oauth.ForgeAuthenticator
	DesignAutomationPath string
	UploadAppURL         string
}

API struct holds all paths necessary to access Design Automation API

func NewAPI added in v0.2.0

func NewAPI(authenticator oauth.ForgeAuthenticator) API

NewAPI returns a DesignAutomation API client with default configurations

func (API) AppList

func (api API) AppList() (list AppList, err error)

AppList lists all available appbundles.

func (API) CreateActivity

func (api API) CreateActivity(config ActivityConfig) (activity Activity, err error)

CreateActivity creates an activity given an app

name - should be unique and will be the appID
engine - engineId to be used by this app (check EngineList)

func (API) CreateApp

func (api API) CreateApp(name, engine string) (app AppBundle, err error)

CreateApp creates an app with given name and using specified engine

name - should be unique and will be the appID
engine - engineId to be used by this app (check EngineList)

func (API) EngineDetails

func (api API) EngineDetails(id string) (list EngineDetails, err error)

EngineDetails gives details on an engine providing it's id.

func (API) EngineList

func (api API) EngineList() (list EngineList, err error)

EngineList lists all available Engines.

func (API) UserId

func (api API) UserId() (nickname string, err error)

UserId gives you the id used to identify the user

type Activity

type Activity struct {
	ActivityConfig
	// contains filtered or unexported fields
}

func (Activity) CreateAlias

func (activity Activity) CreateAlias(alias string, version uint) (result Alias, err error)

CreateAlias creates a new alias for this Activity.

func (*Activity) Delete

func (activity *Activity) Delete() (err error)

type ActivityConfig

type ActivityConfig struct {
	ID          string           `json:"id"`
	CommandLine []string         `json:"commandLine"`
	Description string           `json:"description"`
	AppBundles  []string         `json:"appbundles"`
	Engine      string           `json:"engine"`
	Parameters  map[string]Param `json:"paramaters"`
	Settings    Setting          `json:"settings"`
}

type Alias

type Alias struct {
	ID      string `json:"id"`
	Version uint   `json:"version"`
}

type AliasesList

type AliasesList struct {
	Pagination string  `json:"paginationToken"`
	Data       []Alias `json:"data"`
}

type AppBundle

type AppBundle struct {
	Parameters AppParameters `json:"uploadParameters"`
	AppData
	// contains filtered or unexported fields
}

func (*AppBundle) AliasDetail

func (app *AppBundle) AliasDetail(alias string) (details Alias, err error)

AliasDetail gets the details on given alias

func (AppBundle) Aliases

func (app AppBundle) Aliases() (list AliasesList, err error)

Aliases lists all aliases for the specified AppBundle.

func (AppBundle) CreateAlias

func (app AppBundle) CreateAlias(alias string, version uint) (result Alias, err error)

CreateAlias creates a new alias for this AppBundle.

Limit: 1. Number of aliases (LimitAliases).

func (AppBundle) CreateVersion

func (app AppBundle) CreateVersion(engine string) (result AppBundle, err error)

func (*AppBundle) Delete

func (app *AppBundle) Delete() (err error)

Delete removes the AppBundle, including all versions and aliases.

func (AppBundle) DeleteAlias

func (app AppBundle) DeleteAlias(alias string) (err error)

DeleteAlias the alias for this AppBundle.

func (AppBundle) DeleteVersion

func (app AppBundle) DeleteVersion(version uint) (err error)

func (*AppBundle) Details

func (app *AppBundle) Details(alias string) (details AppDetails, err error)

Details gets the details of the specified AppBundle, providing an alias

func (AppBundle) ModifyAlias

func (app AppBundle) ModifyAlias(alias string, version uint) (result Alias, err error)

ModifyAlias will switch the given alias to another existing version

func (AppBundle) Upload

func (app AppBundle) Upload(data []byte) (err error)

func (*AppBundle) VersionDetails

func (app *AppBundle) VersionDetails(version uint) (details AppData, err error)

func (AppBundle) Versions

func (app AppBundle) Versions() (list VersionList, err error)

Versions lists all aliases for the specified AppBundle.

type AppData

type AppData struct {
	Engine  string `json:"engine"`
	Version uint   `json:"version"`
	ID      string `json:"id"`
}

type AppDetails

type AppDetails struct {
	Package string `json:"package"`
	AppData
}

type AppList

type AppList struct {
	InfoList
}

type AppParameters

type AppParameters struct {
	URL  string   `json:"endpointURL"`
	Data FormData `json:"formData"`
}

type AppUploadError

type AppUploadError struct {
	Code          string `xml:"Code"`
	Message       string `xml:"Message"`
	Argument      string `xml:"Argument"`
	ArgumentValue string `xml:"ArgumentValue"`
	Condition     string `xml:"Condition"`
	RequestID     string `xml:"RequestId"`
	HostID        string `xml:"HostId"`
}

type CreateAppRequest

type CreateAppRequest struct {
	ID     string `json:"id"`
	Engine string `json:"engine"`
}

type EngineDetails

type EngineDetails struct {
	ProductVersion string `json:"productVersion"`
	Description    string `json:"description"`
	Version        uint   `json:"version"`
	Id             string `json:"id"`
}

type EngineList

type EngineList struct {
	InfoList
}

type FormData

type FormData struct {
	Key         string `json:"key"`
	ContentType string `json:"content-type"`
	Policy      string `json:"policy"`
	Status      string `json:"success_action_status"`
	Redirect    string `json:"success_action_redirect"`
	Signature   string `json:"x-amz-signature"`
	Credential  string `json:"x-amz-credential"`
	Algorithm   string `json:"x-amz-algorithm"`
	Date        string `json:"x-amz-date"`
	Encryption  string `json:"x-amz-server-side-encryption"`
	Token       string `json:"x-amz-security-token"`
}

type InfoList

type InfoList struct {
	Pagination string   `json:"paginationToken"`
	Data       []string `json:"data"`
}

type Param

type Param struct {
	Zip         bool   `json:"zip"`
	Description string `json:"description"`
	OnDemand    bool   `json:"ondemand"`
	Required    bool   `json:"required"`
	Verb        string `json:"verb"`
	LocalName   string `json:"localName"`
}

type Setting

type Setting struct {
	Script string `json:"script"`
}

type VersionList

type VersionList struct {
	Pagination string `json:"paginationToken"`
	Data       []uint `json:"data"`
}

Jump to

Keyboard shortcuts

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