model

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2015 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeamonKeyName = "_daemon"
View Source
var MetaBucketName = "meta"

Functions

This section is empty.

Types

type Daemon

type Daemon struct {
	Repo string `json:"repo"`
	Addr string `json:"addr"`
}

func NewDaemonFromSerialized

func NewDaemonFromSerialized(data []byte) (*Daemon, error)

func NewDeamon

func NewDeamon(repopath string, addr string) *Daemon

func (*Daemon) Serialize

func (d *Daemon) Serialize() ([]byte, error)

type Model

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

func New

func New(dir string) *Model

func (*Model) Close

func (m *Model) Close(db *bolt.DB)

func (*Model) Open

func (m *Model) Open() (*bolt.DB, error)

func (*Model) ReadDaemonInfo

func (m *Model) ReadDaemonInfo() (*Daemon, error)

func (*Model) UpsertDaemonInfo

func (m *Model) UpsertDaemonInfo(info *Daemon) error

Jump to

Keyboard shortcuts

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