Documentation
¶
Index ¶
- type Transaction
- func (tx *Transaction) AllNodes() (nodes []*google.Node, err error)
- func (tx *Transaction) Close()
- func (tx *Transaction) Copy(tnode *google.Node, newName string) (node *google.Node, err error)
- func (tx *Transaction) FindNodes(query string) (nodes []*google.Node, err error)
- func (tx *Transaction) GetByName(fn string) (node *google.Node, err error)
- func (tx *Transaction) GetByNum(num int) (node *google.Node, err error)
- func (tx *Transaction) LastNum() (last int, err error)
- func (tx *Transaction) NextNum() (next int, err error)
- func (tx *Transaction) OpenCreate(r *http.Request, template, filename, unlockPrefix, title string) (node *google.Node, err error)
- func (tx *Transaction) OpenPrefix(prefix string) (node *google.Node, err error)
- func (tx *Transaction) Rm(rmnode *google.Node) (err error)
- func (tx *Transaction) Unlock(node *google.Node) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func Start ¶
func Start(gf *google.Folder) (tx *Transaction)
func (*Transaction) AllNodes ¶
func (tx *Transaction) AllNodes() (nodes []*google.Node, err error)
AllNodes returns all nodes and caches the results.
func (*Transaction) Close ¶
func (tx *Transaction) Close()
func (*Transaction) FindNodes ¶
func (tx *Transaction) FindNodes(query string) (nodes []*google.Node, err error)
FindNodes takes a query string and returns all matching nodes.
func (*Transaction) GetByName ¶
func (tx *Transaction) GetByName(fn string) (node *google.Node, err error)
func (*Transaction) GetByNum ¶
func (tx *Transaction) GetByNum(num int) (node *google.Node, err error)
func (*Transaction) LastNum ¶
func (tx *Transaction) LastNum() (last int, err error)
return the last used document number
func (*Transaction) NextNum ¶
func (tx *Transaction) NextNum() (next int, err error)
return the next (unused) document number
func (*Transaction) OpenCreate ¶
func (tx *Transaction) OpenCreate(r *http.Request, template, filename, unlockPrefix, title string) (node *google.Node, err error)
open or create file XXX pass in opts struct instead of http.Request
func (*Transaction) OpenPrefix ¶
func (tx *Transaction) OpenPrefix(prefix string) (node *google.Node, err error)
open single file with name matching prefix XXX refactor to OpenByNum
Click to show internal directories.
Click to hide internal directories.