helper

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeConnectionString added in v1.0.5

func EncodeConnectionString(connectionString string) string

EncodeConnectionString URL encodes the password and the username from the connection string. It's useful when they contains special characters. Example: mongodb://user:p@ssword@localhost:27017/db -> mongodb://user:p%40word@40localhost:27017/db If there's any conflict, the function returns the original connection string.

func ErrPrint

func ErrPrint(err error)

func IsCosmosDB

func IsCosmosDB(connectionString string) bool

func IsSlice

func IsSlice(o interface{}) bool

func LoadCertificateAndKey

func LoadCertificateAndKey(data []byte) (*tls.Certificate, error)

func LoadCertificateAndKeyFromFile

func LoadCertificateAndKeyFromFile(path string) (*tls.Certificate, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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