dsn

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: BSD-3-Clause Imports: 4 Imported by: 12

Documentation

Overview

package dsn provides methods for working with data source name (DSN) strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSN

type DSN map[string]string

DSN represents a data source name (DSN) style string.

func StringToDSN

func StringToDSN(str_dsn string) (DSN, error)

StringToDSN parses 'str_dsn` in to a `DSN` instance.

func StringToDSNWithKeys

func StringToDSNWithKeys(str_dsn string, keys ...string) (DSN, error)

StringToDSNWithKeys parse 'str_dsn' in to a `DSN` instance ensuring that the instance contains keys matching 'keys'.

func (DSN) Keys

func (dsn DSN) Keys() []string

Keys returns the list of key names contained in 'dsn'.

func (DSN) String

func (dsn DSN) String() string

String returns a string representation of 'dsn'.

Jump to

Keyboard shortcuts

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