storm

package
v0.0.0-...-19e15d3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName service.Name = "storm"

Variables

View Source
var (
	ErrNotFound = storm.ErrNotFound
)

Functions

func From

func From(container *service.Container) (*storm.DB, error)

From retrieves the storm service in the given container

func Must

func Must(container *service.Container) *storm.DB

Must retrieves the storm service in the given container or panic otherwise

func ServiceProvider

func ServiceProvider(funcs ...OptionFunc) service.Provider

Types

type Option

type Option struct {
	Path    string
	Objects []interface{}
	ReIndex bool
	Init    bool
}

func DefaultOption

func DefaultOption() *Option

func MergeOption

func MergeOption(opt *Option, funcs ...OptionFunc) *Option

type OptionFunc

type OptionFunc func(*Option)

func WithInit

func WithInit(init bool) OptionFunc

func WithObjects

func WithObjects(objects ...interface{}) OptionFunc

func WithPath

func WithPath(path string) OptionFunc

func WithReIndex

func WithReIndex(reindex bool) OptionFunc

Jump to

Keyboard shortcuts

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