collection

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultOptions = &Options{
		file:      "models.db",
		dbTimeout: 50 * time.Millisecond,
	}
)

Functions

This section is empty.

Types

type Collection

type Collection struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Collection) Create

func (c *Collection) Create(i model.Interface) error

func (*Collection) Load

func (c *Collection) Load() error

func (*Collection) Save

func (c *Collection) Save(i model.Interface) error

type Collections

type Collections struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func Init

func Init(options *Options) *Collections

func (*Collections) Close

func (cs *Collections) Close() error

func (*Collections) Get

func (*Collections) Register

type Options

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

func (*Options) String

func (opt *Options) String() string

Jump to

Keyboard shortcuts

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