db

package
v0.0.0-...-33909b6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conn = &Connection{}

Functions

func InitializeConnection

func InitializeConnection()

InitializeConnection は,Connectionを確立して,Connに保存します

func NewMySQLConnection

func NewMySQLConnection() (*gorm.DB, error)

NewMySQLConnection は,migrationを行い,*gorm.DBを生成します

func NewRedisConnection

func NewRedisConnection() *redis.Client

NewRedisConnection は,*redis.Clientを生成します

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func (*Connection) GetMySQLConn

func (c *Connection) GetMySQLConn() *gorm.DB

GetMySQLConn は,構造体Connectionが保持している *gorm.DBを返します

func (*Connection) GetRedisConn

func (c *Connection) GetRedisConn() *redis.Client

GetRedisConn は,構造体Connectionが保持している *redis.Clientを返します

Jump to

Keyboard shortcuts

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