Code Monkey home page Code Monkey logo

go-pghelpers's Introduction

go-pghelpers

Golang helpers for Postgres.

Installation

go get github.com/neighborly/go-pghelpers

Usage

PostgresConfig

PostgresConfig holds the information for postgres database connection. For example

var postgresConfig = pghelpers.PostgresConfig{
	Host:       "localhost",
	Port:       5432,
	Username:   "postgres",
	Password:   "",
	Database:   "postgres",
}

Connect Postgres

pghelpers.ConnectPostgres function returns db object and error if any. You can use pghelpers.ConnectPostgres as follows

db, err := pghelpers.ConnectPostgres(postgresConfig)

GenerateAddress

GenerateAddress returns a Postgres connection string, which can be used for sql.open().

addr := postgresConfig.GenerateAddress()

License

This project is licensed under the MIT License.

go-pghelpers's People

Contributors

josemarluedke avatar strobus avatar dependabot-preview[bot] avatar kparikh-nei avatar billyudders avatar dependabot[bot] avatar

Stargazers

Serge Simard avatar

Watchers

 avatar Jason Evans avatar James Cloos avatar Gene Armstrong avatar Marc Bodmer avatar Jeffrey DeFond avatar  avatar Andrew Colello avatar David Beam avatar Casey O'Kelly avatar Eugene Yakhnenko avatar Rishub Nahar avatar

go-pghelpers's Issues

Reporting a vulnerability

Hello!

I hope you are doing well!

We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.

Can you enable it, so that we can report it?

Thanks in advance!

PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository

[Security] Workflow release-drafter.yml is using vulnerable action toolmantim/release-drafter

The workflow release-drafter.yml is referencing action toolmantim/release-drafter using references v5.2.0. However this reference is missing the commit 70eb821099dbcd875c2cba75dad4332d3cf5544d which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

[Security] Workflow release-drafter.yml is using vulnerable action toolmantim/release-drafter

The workflow release-drafter.yml is referencing action toolmantim/release-drafter using references v5.2.0. However this reference is missing the commit 70eb821099dbcd875c2cba75dad4332d3cf5544d which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.