Documentation ¶
Index ¶
- Constants
- type App
- type AppDraft
- type AppInstanceData
- func (aic AppInstanceData) AppDeploymentModel() string
- func (aic AppInstanceData) AppID() string
- func (aic AppInstanceData) AppLocation() string
- func (aic AppInstanceData) AppName() string
- func (aic *AppInstanceData) MarshalFile(path string) error
- func (aic *AppInstanceData) UnmarshalFile(path string) error
- type Deployment
- type DeploymentStatus
- type DraftDiff
- type HostingDiff
- type UserProfile
Constants ¶
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
const ( AppIDField string = "app_id" AppNameField string = "name" AppLocationField string = "location" AppDeploymentModelField string = "deployment_model" )
App config field identifiers
const AppConfigFileName string = "config.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 Realm App data
type AppDraft ¶
type AppDraft struct {
ID string `json:"_id"`
}
AppDraft represents a Realm App Draft
type AppInstanceData ¶
type AppInstanceData map[string]interface{}
AppInstanceData defines data pertaining to a specific deployment of a Realm application
func (AppInstanceData) AppDeploymentModel ¶
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 ¶
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 ¶
type Deployment struct { ID string `json:"_id"` Status DeploymentStatus `json:"status"` }
Deployment represents a Realm Deployment
type DeploymentStatus ¶
type DeploymentStatus string
DeploymentStatus is the enumeration of values which can be provided in a Deployment's status field
type DraftDiff ¶
type DraftDiff struct { Diffs []string `json:"diffs"` HostingFilesDiff HostingDiff `json:"hosting_files_diff"` }
DraftDiff represents the diff of an AppDraft
func (*DraftDiff) HasChanges ¶
HasChanges returns whether the DraftDiff contains any changes or not
type HostingDiff ¶
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