database

package
v0.0.0-...-5f7400d Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Id         string
	Column     string
	Revealed   bool
	Votes      int
	TotalVotes int
}

type Column

type Column struct {
	Id    string
	Retro string
	Name  string
	Order int
}

type Content

type Content struct {
	Id     string
	Card   string
	Text   string
	Author string
}

type Database

type Database struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string) (*Database, error)

func (*Database) AddCard

func (d *Database) AddCard(card Card) error

func (*Database) AddColumn

func (d *Database) AddColumn(column Column) error

func (*Database) AddContent

func (d *Database) AddContent(content Content) error

func (*Database) AddParticipant

func (d *Database) AddParticipant(retroId, username string) error

func (*Database) AddRetro

func (d *Database) AddRetro(retro Retro) error

func (*Database) Close

func (d *Database) Close() error

func (*Database) DeleteCard

func (d *Database) DeleteCard(id string) error

func (*Database) DeleteParticipant

func (d *Database) DeleteParticipant(retroId, username string) error

func (*Database) EnsureUser

func (d *Database) EnsureUser(username, secret string) error

func (*Database) GetCards

func (d *Database) GetCards(username, columnId string) (cards []Card, err error)

func (*Database) GetColumn

func (d *Database) GetColumn(id string) (Column, error)

func (*Database) GetColumns

func (d *Database) GetColumns(retroId string) (columns []Column, err error)

func (*Database) GetContent

func (d *Database) GetContent(id string) (Content, error)

func (*Database) GetContents

func (d *Database) GetContents(cardId string) (contents []Content, err error)

func (*Database) GetParticipants

func (d *Database) GetParticipants(retroId string) (participants []string, err error)

func (*Database) GetRetro

func (d *Database) GetRetro(id string) (Retro, error)

func (*Database) GetRetros

func (d *Database) GetRetros(username string) (retros []Retro, err error)

func (*Database) GetUser

func (d *Database) GetUser(username string) (User, error)

func (*Database) GetUsers

func (d *Database) GetUsers() (users []User, err error)

func (*Database) GroupCards

func (d *Database) GroupCards(cardFrom, cardTo string) error

func (*Database) MoveCard

func (d *Database) MoveCard(id, columnId string) error

func (*Database) Reset

func (d *Database) Reset() error

func (*Database) RevealCard

func (d *Database) RevealCard(id string) error

func (*Database) SetStage

func (d *Database) SetStage(id, stage string) error

func (*Database) Unvote

func (d *Database) Unvote(username, cardId string) error

func (*Database) UpdateContent

func (d *Database) UpdateContent(id string, text string) error

func (*Database) Vote

func (d *Database) Vote(username, cardId string) error

type Retro

type Retro struct {
	Id        string
	Name      string
	Stage     string
	CreatedAt time.Time
}

type User

type User struct {
	Username string
	Secret   string
}

type Vote

type Vote struct {
	Username string
	Card     string
	Count    int
}

Jump to

Keyboard shortcuts

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