utils

package
v0.0.0-...-53ff618 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGitEmail

func AddGitEmail(email string) error

func AddGitUserName

func AddGitUserName(userName string) error

func AddToKnownHost

func AddToKnownHost(host string, logger logr.Logger) error

func GetRepoHostnameFromURL

func GetRepoHostnameFromURL(url string) (string, error)

Types

type MongoDB

type MongoDB struct {
	// contains filtered or unexported fields
}

MongoDB will manage the connection with the database.

func NewMongoDB

func NewMongoDB(logger logr.Logger) *MongoDB

NewMongoDB is a constructor function.

func (*MongoDB) Connect

func (m *MongoDB) Connect(uri string) (*mongo.Client, error)

Connect open a database connection and check if it is connecting using ping.

func (*MongoDB) Disconnect

func (m *MongoDB) Disconnect()

Disconnect closes the connection with the database.

Jump to

Keyboard shortcuts

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