models

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 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 = "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

func (d *DraftDiff) HasChanges() bool

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

Jump to

Keyboard shortcuts

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