store

package
v0.0.0-...-ef910b2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(setting *entity.GlobalConfig)

InitDB doing init work of db:create database...

Types

type GeneralDBClient

type GeneralDBClient struct {
	GormDB *gorm.DB
	DBName string
	DBType string
	// contains filtered or unexported fields
}

GeneralDBClient support sqlite3, mysql and so on...

func NewGeneralDBClient

func NewGeneralDBClient(configPath string) *GeneralDBClient

NewGeneralDBClient

func (*GeneralDBClient) Create

func (gclient *GeneralDBClient) Create(url *entity.URL)

func (*GeneralDBClient) DropDatabase

func (gclient *GeneralDBClient) DropDatabase()

DropDatabase drop self hold database

func (*GeneralDBClient) GetByOriginURL

func (gclient *GeneralDBClient) GetByOriginURL(originURL string) *entity.URL

func (*GeneralDBClient) GetByShortPath

func (gclient *GeneralDBClient) GetByShortPath(shortPath string) *entity.URL

func (*GeneralDBClient) GetSenderWorker

func (gclient *GeneralDBClient) GetSenderWorker() *entity.SenderWorker

func (*GeneralDBClient) SaveSenderWorker

func (gclient *GeneralDBClient) SaveSenderWorker(sender *entity.SenderWorker)

func (*GeneralDBClient) Update

func (gclient *GeneralDBClient) Update(url *entity.URL)

func (*GeneralDBClient) UpdateSenderWorker

func (gclient *GeneralDBClient) UpdateSenderWorker(sender *entity.SenderWorker)

Jump to

Keyboard shortcuts

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