package
Version:
v3.1.0+incompatible
Opens a new window with list of versions in this module.
Published: Jul 23, 2019
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Config struct {
Host, User, Password, Database, Table, SSLMode string
Port int32
}
Config contains the configuration for the PostgreSQL server and database
type Provider struct {
Config *Config
}
Provider implements a PostgreSQL-based storage system
New returns a new Provider instance
Exists checks if there is a URL with the requested alias
Get attempts to find a URL by its alias and returns its original URL
Init sets up the PostgreSQL database connection and creates the table if needed
Store creates a new short URL
Source Files
¶
Click to show internal directories.
Click to hide internal directories.