Skip to content

technology16/pgpass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central License

PgPass

Simple Java library for easy PostgreSQL password files loading

Maven Repository

You can pull PgPass from the central maven repository, just add these to your pom.xml file:

<dependency>
  <groupId>com.github.technology16</groupId>
  <artifactId>pgpass</artifactId>
  <version>2.0.1</version>
</dependency>

Usage

API is simple. Currently static getters are available:

// Look at default location
PgPass.get(String host, String port, String dbName, String user)

// Look at provided location
PgPass.get(Path pgPassPath, String host, String port, String dbName, String user)

// Returns all PgPassEntry from default location
PgPass.getAll()

// Returns all PgPassEntry from provided location
PgPass.get(Path pgPassPath)

// Return pgpass file default location
PgPass.getPgPassPath()

Docker Testing

docker-compose -f docker-compose.test.yml run --rm t1

License

This application is licensed under the Apache License, Version 2.0. See LICENCE for details.