account

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCorsOrigin

func AddCorsOrigin(appID string, origin string) error

func FormatHostingUrl

func FormatHostingUrl(app App) string

func GetCorsOrigins

func GetCorsOrigins(appID string) []string

func GetObjects added in v1.0.4

func GetObjects(collection, filter string) ([]map[string]interface{}, error)

func Login

func Login(email string, password string) (sessionID string, userID string, accountID string, err error)

func SaveApp

func SaveApp(app App) error

func Signup added in v1.0.1

func Signup(firstName, lastName, email, password string) (sessionID string, userID string, accountID string, err error)

Types

type App

type App struct {
	AppID            string       `json:"appID,omitempty"`
	AppKey           string       `json:"appKey,omitempty"`
	AppName          string       `json:"appName"`
	AppDescription   string       `json:"appDescription"`
	AccountID        string       `json:"accountId"`
	PaymentPlan      string       `json:"paymentPlan"`
	HostingSubdomain string       `json:"hostingSubdomain,omitempty"`
	Collections      []Collection `json:"collections,omitempty"`
}

func GetAppByID

func GetAppByID(appID string) (App, error)

func GetAppByKey

func GetAppByKey(appKey string) (App, error)

func GetCurrentApp

func GetCurrentApp() (App, error)

func GetUserApps

func GetUserApps() ([]App, error)

func SaveNewApp added in v1.0.3

func SaveNewApp(app App) (App, error)

func (App) CollectionNames added in v1.0.3

func (app App) CollectionNames() []string

type Collection added in v1.0.3

type Collection struct {
	CollectionID   string                 `json:"collectionId,omitempty"`
	AppID          string                 `json:"appId"`
	AccountID      string                 `json:"accountId"`
	CollectionName string                 `json:"collectionName"`
	Schema         map[string]interface{} `json:"schema"`
}

func GetCollectionByID added in v1.0.3

func GetCollectionByID(id string) (Collection, error)

func GetCollectionByName added in v1.0.3

func GetCollectionByName(name string) (Collection, error)

func SaveNewCollection added in v1.0.3

func SaveNewCollection(collection Collection) (Collection, error)

func (Collection) SortedColumnNames added in v1.0.4

func (coll Collection) SortedColumnNames() []string

type Relation added in v1.1.0

type Relation struct {
	RelationID         string `json:"relationId,omitempty"`
	FromCollectionName string `json:"fromCollectionName"`
	FromProperty       string `json:"fromProperty"`
	ToCollectionName   string `json:"toCollectionName"`
	Type               string `json:"type"`
}

func SaveNewRelation added in v1.1.0

func SaveNewRelation(relation Relation) (Relation, error)

func (Relation) Description added in v1.1.0

func (rel Relation) Description() string

type User

type User struct {
	Email     string `json:"email"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
	Apps      []App  `json:"apps"`
}

func GetUser

func GetUser() (User, error)

Jump to

Keyboard shortcuts

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