package
Version:
v0.0.0-...-b7deca7
Opens a new window with list of versions in this module.
Published: Jun 10, 2020
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
New connects to the postgres database and returns the database instance.
CreateKey takes a name and creates for it a new row in the keys table.
GetKeys returns all the keys from the keys table.
RemoveKey takes an id and remove the row associated to it in the keys table.
type Key struct {
Id int `db:"id" json:"id"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
Name string `db:"name" json:"name"`
Key string `db:"key" json:"key"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.