storage

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFlags

func ConfigFlags(cmd *cobra.Command, prefix string) error

ConfigFlags helps configure cobra and viper flags.

Types

type Config

type Config struct {
	File  string `mapstructure:"file"`
	Debug bool   `mapstructure:"debug"`

	Driver    string `mapstructure:"driver"`
	DriverURL string `mapstructure:"driverurl"`
}

Config is store configuration

func (*Config) Validate

func (c *Config) Validate() error

Validate configuration is ok

type Conn

type Conn struct {
	*ent.Client
	// contains filtered or unexported fields
}

Conn represents a datastore connection.

func Connect

func Connect(ctx context.Context, config *Config) (*Conn, error)

Connect creates a connection to a messaging service with the given config.

func (*Conn) Close

func (c *Conn) Close() error

Close cleanly closes the database connection.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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