transaction

package
v0.0.0-...-75eb559 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

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) Copy

func (tx *Transaction) Copy(tnode *google.Node, newName string) (node *google.Node, err error)

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

func (*Transaction) Rm

func (tx *Transaction) Rm(rmnode *google.Node) (err error)

func (*Transaction) Unlock

func (tx *Transaction) Unlock(node *google.Node) (err error)

Jump to

Keyboard shortcuts

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