database

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() *pg.DB

Connect function

If you want to connect with your database, you should run this function.

This function work for Postgres, if you want to use another database, you can see the Gorm documentation

func ConnectRedis

func ConnectRedis() *redis.Client

ConnectRedis function

If you want to connect with your redis, you should run this function.

Redis will be used to stored refresh token authentication but you can used it for caches

func Repository

func Repository() *pg.DB

Repository to handle database connection

This function is used when you want to query something

Types

This section is empty.

Jump to

Keyboard shortcuts

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