model

package
v0.5.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeamonKeyName = "_daemon"
View Source
var DefaultConfig = &Config{
	MBU:           MBU(time.Minute),
	CommitMessage: " [{{.}}]",
	AutoPush:      true,
}
View Source
var MetaBucketName = "meta"

Functions

This section is empty.

Types

type Config added in v0.5.0

type Config struct {
	MBU           MBU    `json:"mbu"`
	CommitMessage string `json:"commit_message"`
	AutoPush      bool   `json:"auto_push"`
}

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 MBU added in v0.5.0

type MBU time.Duration

func (MBU) String added in v0.5.0

func (m MBU) String() string

func (*MBU) UnmarshalJSON added in v0.5.0

func (t *MBU) UnmarshalJSON(data []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) ReadConfig added in v0.5.0

func (m *Model) ReadConfig() (*Config, 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