mysql

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(opts *Provider)

Option configures the couchdb provider

func WithDBPrefix

func WithDBPrefix(dbPrefix string) Option

WithDBPrefix option is for adding prefix to db name

type Provider

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

Provider represents a MySQL DB implementation of the storage.Provider interface

func NewProvider

func NewProvider(dbPath string, opts ...Option) (p *Provider, err error)

NewProvider instantiates Provider. Example DB Path root:my-secret-pw@tcp(127.0.0.1:3306)/.

func (*Provider) Close

func (p *Provider) Close() error

Close closes the provider.

func (*Provider) CloseStore

func (p *Provider) CloseStore(name string) error

CloseStore closes a previously opened store

func (*Provider) CreateStore

func (p *Provider) CreateStore(name string) (err error)

CreateStore creates a store with the given name.

func (*Provider) OpenStore

func (p *Provider) OpenStore(name string) (storage.Store, error)

OpenStore opens and returns a new DB with the given namespace

Jump to

Keyboard shortcuts

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