models

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLocation        string = "US-VA"
	DefaultDeploymentModel string = "GLOBAL"

	// DeploymentStatusCreated indicates the app deployment has been created but is not in the job queue yet
	DeploymentStatusCreated DeploymentStatus = "created"

	// DeploymentStatusSuccessful indicates the app was successfully deployed
	DeploymentStatusSuccessful DeploymentStatus = "successful"

	// DeploymentStatusFailed indicates the app deployment failed
	DeploymentStatusFailed DeploymentStatus = "failed"

	// DeploymentStatusPending indicates the app deployment is in the job queue but has not yet started
	DeploymentStatusPending DeploymentStatus = "pending"
)

Default deployment settings

View Source
const (
	AppIDField              string = "app_id"
	AppNameField            string = "name"
	AppLocationField        string = "location"
	AppDeploymentModelField string = "deployment_model"
)

App config field identifiers

View Source
const AppConfigFileName string = "stitch.json"

AppConfigFileName is the name of top-level config file describing the app

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID          string `json:"_id"`
	GroupID     string `json:"group_id"`
	ClientAppID string `json:"client_app_id"`
	Name        string `json:"name"`
}

App represents basic Stitch App data

type AppDraft added in v1.6.0

type AppDraft struct {
	ID string `json:"_id"`
}

AppDraft represents a Stitch App Draft

type AppInstanceData

type AppInstanceData map[string]interface{}

AppInstanceData defines data pertaining to a specific deployment of a Stitch application

func (AppInstanceData) AppDeploymentModel added in v1.2.0

func (aic AppInstanceData) AppDeploymentModel() string

AppDeploymentModel returns the app's deployment model

func (AppInstanceData) AppID

func (aic AppInstanceData) AppID() string

AppID returns the app's Client App ID

func (AppInstanceData) AppLocation added in v1.2.0

func (aic AppInstanceData) AppLocation() string

AppLocation returns the app's target location

func (AppInstanceData) AppName

func (aic AppInstanceData) AppName() string

AppName returns the app's user-defined name

func (*AppInstanceData) MarshalFile

func (aic *AppInstanceData) MarshalFile(path string) error

MarshalFile writes the AppInstanceData to the AppConfigFileName at the provided path

func (*AppInstanceData) UnmarshalFile

func (aic *AppInstanceData) UnmarshalFile(path string) error

UnmarshalFile unmarshals data from a local config file into an AppInstanceData

type Deployment added in v1.6.0

type Deployment struct {
	ID     string           `json:"_id"`
	Status DeploymentStatus `json:"status"`
}

Deployment represents a Stitch Deployment

type DeploymentStatus added in v1.6.0

type DeploymentStatus string

DeploymentStatus is the enumeration of values which can be provided in a Deployment's status field

type DraftDiff added in v1.6.0

type DraftDiff struct {
	Diffs            []string    `json:"diffs"`
	HostingFilesDiff HostingDiff `json:"hosting_files_diff"`
}

DraftDiff represents the diff of an AppDraft

func (*DraftDiff) HasChanges added in v1.6.0

func (d *DraftDiff) HasChanges() bool

HasChanges returns whether the DraftDiff contains any changes or not

type HostingDiff added in v1.6.0

type HostingDiff struct {
	Added    []string `json:"added"`
	Deleted  []string `json:"deleted"`
	Modified []string `json:"modified"`
}

HostingDiff represents the hosting files section of a DraftDiff

type UserProfile

type UserProfile struct {
	Roles []role `json:"roles"`
}

UserProfile holds basic metadata for a given user

func (*UserProfile) AllGroupIDs

func (pd *UserProfile) AllGroupIDs() []string

AllGroupIDs returns all available group ids for a given user

Jump to

Keyboard shortcuts

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