Documentation ¶
Index ¶
- type CardDoc
- type DB
- type Tx
- func (tx *Tx) Commit() error
- func (tx *Tx) CreateCard(c *cs.Card) (string, error)
- func (tx *Tx) DeleteCard(c *cs.Card) (int, error)
- func (tx *Tx) EmbedCard(p, c *cs.Card) (int, error)
- func (tx *Tx) GetCard(c *cs.Card) (*cs.Card, error)
- func (tx *Tx) RemoveCard(p, c *cs.Card) (int, error)
- func (tx *Tx) Rollback() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
*mgo.Session
}
type Tx ¶
type Tx struct {
*mgo.Session
}
func (*Tx) CreateCard ¶
CreateCard creates a new card. Returns the id of the card that was created or an error if the tx fails.
func (*Tx) DeleteCard ¶
DeleteCard deletes a card based on its id. Returns the number of records deleted or an error if the tx fails.
func (*Tx) EmbedCard ¶
EmbedCard embeds one card inside another. Returns the number of records amended or an error if the tx fails.
func (*Tx) GetCard ¶
GetCard returns a card based on its identifier. Returns the card or an error if the tx fails.
func (*Tx) RemoveCard ¶
RemoveCard embeds one card inside another. Returns the number of records amended or an error if the tx fails.
Click to show internal directories.
Click to hide internal directories.