models

package
v0.0.0-...-1ceba2e Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2014 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	ID bson.ObjectId `bson:"_id" json:"id"`

	Name        string `bson:"name"        json:"name"`
	Description string `bson:"description" json:"description"`

	Size       Size   `bson:"size"       json:"size"`
	Background string `bson:"background" json:"background"`

	Members []Member `bson:"members" json:"-"`

	CreatedAt time.Time     `bson:"created_at" json:"createdAt"`
	CreatedBy bson.ObjectId `bson:"created_by" json:"createdBy"`
}

func (*Board) GetMember

func (b *Board) GetMember(userID bson.ObjectId) *Member

func (*Board) GetRole

func (b *Board) GetRole(userID bson.ObjectId) string

func (*Board) IsMember

func (b *Board) IsMember(userID bson.ObjectId) bool

type Member

type Member struct {
	Role        string        `bson:"role"         json:"role"`
	UserID      bson.ObjectId `bson:"user_id"      json:"userID"`
	MemberSince time.Time     `bson:"member_since" json:"memberSince"`
}

type Position

type Position struct {
	X int `bson:"x" json:"x"`
	Y int `bson:"y" json:"y"`
	Z int `bson:"z" json:"z"`
}

type Size

type Size struct {
	Width  int `bson:"width"  json:"width"`
	Height int `bson:"height" json:"height"`
}

type Ticket

type Ticket struct {
	ID        bson.ObjectId `bson:"_id"        json:"id"`
	BoardID   bson.ObjectId `bson:"board_id"   json:"-"`
	CreatedBy bson.ObjectId `bson:"created_by" json:"createdBy"`
	CreatedAt time.Time     `bson:"created_at" json:"createdAt"`

	Color   string `bson:"color"   json:"color"`
	Heading string `bson:"heading" json:"heading"`
	Content string `bson:"content" json:"content"`

	Position Position `bson:"position" json:"position"`
}

type Token

type Token struct {
	Secret string        `bson:"secret"`
	UserID bson.ObjectId `bson:"user_id"`
}

type User

type User struct {
	ID           bson.ObjectId `bson:"_id"           json:"id"`
	Email        string        `bson:"email"         json:"email"`
	Username     string        `bson:"username"      json:"username"`
	RegisteredAt time.Time     `bson:"registered_at" json:"registeredAt"`
}

Jump to

Keyboard shortcuts

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