database

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: MIT Imports: 6 Imported by: 0

README

☕️ database GoDoc Build Status codecov Go Report Card

Package database provides PostgreSQL management for Temporal, an easy-to-use interface into distributed and decentralized storage technologies for personal and enterprise use cases.

Documentation

Overview

Package database provides PostgreSQL management for Temporal (https://github.com/RTradeLtd/Temporal), an easy-to-use interface into distributed and decentralized storage technologies for personal and enterprise use cases.

Index

Constants

This section is empty.

Variables

View Source
var (
	UploadObj        *models.Upload
	UserObj          *models.User
	PaymentObj       *models.Payments
	IpnsObj          *models.IPNS
	HostedIpfsNetObj *models.HostedIPFSPrivateNetwork
)

Functions

func OpenDBConnection

func OpenDBConnection(opts DBOptions) (*gorm.DB, error)

OpenDBConnection is used to create a database connection

Types

type DBOptions

type DBOptions struct {
	User           string
	Password       string
	Address        string
	Port           string
	SSLModeDisable bool
}

DBOptions declares options for opening a database connection

type DatabaseManager

type DatabaseManager struct {
	DB     *gorm.DB
	Upload *models.UploadManager
}

func Initialize

func Initialize(cfg *config.TemporalConfig, opts DatabaseOptions) (*DatabaseManager, error)

func (*DatabaseManager) Close

func (dbm *DatabaseManager) Close() error

Close shuts down database connection

func (*DatabaseManager) RunMigrations

func (dbm *DatabaseManager) RunMigrations()

RunMigrations runs all migrations

type DatabaseOptions

type DatabaseOptions struct {
	RunMigrations  bool
	SSLModeDisable bool
	LogMode        bool
}

Directories

Path Synopsis
Package models provides the models used by Temporal's databases
Package models provides the models used by Temporal's databases
Package utils implements helpers and utility functions for package database and models
Package utils implements helpers and utility functions for package database and models

Jump to

Keyboard shortcuts

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