models

package
v0.0.0-...-0b86ddf Latest Latest
Warning

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

Go to latest
Published: May 12, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Id          bson.ObjectId `bson:"_id,omitempty" json:"Id"`
	Name        string        `bson:"Name" json:"Name"`
	Description string        `bson:"Description" json:"Description"`
	Token       string        `bson:"Token" json:"Token"`
	TOC         time.Time     `bson:"TOC" json:"TOC"`
	TTL         int64         `bson:"TTL" json:"TTL"`
	Roles       []Role        `bson:"Roles" json:"Roles"`
}

func (App) DbFetchOne

func (this App) DbFetchOne(q *mgo.Query) (interface{}, error)

func (App) DbInsertOne

func (this App) DbInsertOne(uc *mgo.Collection) (uu interface{}, er error)

func (App) DbReplaceOne

func (this App) DbReplaceOne(uc *mgo.Collection) (uu interface{}, er error)

func (App) DbUpdateOne

func (this App) DbUpdateOne(uc *mgo.Collection, sel bson.M, updates bson.M) (uu interface{}, er error)

type Apps

type Apps []App

func (Apps) DbFetchAll

func (this Apps) DbFetchAll(q *mgo.Query) (interface{}, error)

func (Apps) DbInsertAll

func (this Apps) DbInsertAll(uc *mgo.Collection) (uu interface{}, er error)

func (Apps) DbReplaceAll

func (this Apps) DbReplaceAll(uc *mgo.Collection) (uu interface{}, er error)

func (Apps) DbUpdateAll

func (this Apps) DbUpdateAll(uc *mgo.Collection, sel bson.M, updates bson.M) (uu interface{}, er error)

type Path

type Path struct {
	Path        string `bson:"Path" json:"Path"`
	AccessLevel int8   `bson:"AccessLevel" json:"AccessLevel"`
}

type Role

type Role struct {
	Name        string `bson:"Name" json:"Name"`
	Description string `bson:"Description" json:"Description"`
	Paths       []Path `bson:"Paths" json:"Paths"`
}

Jump to

Keyboard shortcuts

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