model

package
v0.0.0-...-de1b681 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppCollection

func AppCollection(session *mgo.Session) *mgo.Collection

func Dial

func Dial() *mgo.Session

func EnsureIndex

func EnsureIndex(concurrent bool)

func EntityCollection

func EntityCollection(session *mgo.Session) *mgo.Collection

func Session

func Session() *mgo.Session

func UserCollection

func UserCollection(session *mgo.Session) *mgo.Collection

Types

type Application

type Application struct {
	Id          bson.ObjectId `json:"id" bson:"_id,omitempty"`
	UserId      bson.ObjectId `json:"userid" bson:"userid"`
	Name        string        `json:"name" bson:"name"`
	Secret      string        `json:"-" bson:"secret"`
	Description string        `json:"description" bson:"description"`
}

func (*Application) Save

func (a *Application) Save(session *mgo.Session) error

type Entity

type Entity struct {
	Id        bson.ObjectId          `json:"id" bson:"_id,omitempty"`
	Name      string                 `json:"entity" bson:"name"`
	AppId     bson.ObjectId          `json:"-" bson:"appid"`
	CreatedAt time.Time              `json:"createdAt" bson:"createdat"`
	Data      map[string]interface{} `json:"data" bson:"data"`
}

func (*Entity) Save

func (e *Entity) Save(session *mgo.Session) error

type User

type User struct {
	Id    bson.ObjectId `json:"id" bson:"_id,omitempty"`
	FbId  int64         `json:"-" bson:"fbid"`
	Name  string        `json:"name" bson:"name"`
	Email string        `json:"-" bson:"email"`
}

func (*User) Save

func (u *User) Save(session *mgo.Session) error

Jump to

Keyboard shortcuts

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