dao

package
v0.0.0-...-d45e184 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewDB

func NewDB() (db *sql.DB, cf func(), err error)

func NewRedis

func NewRedis() (r *redis.Redis, cf func(), err error)

Types

type Dao

type Dao interface {
	Close()
	Ping(ctx context.Context) (err error)
	LicensesByOrg(ctx context.Context, orgId string) (licenses []*pb.License, err error)
	License(ctx context.Context, orgId string, licenseId string) (license *pb.License, err error)
	AddLicense(ctx context.Context, license *pb.License) (err error)
	UpdateLicense(ctx context.Context, license *pb.License) (err error)
	DeleteLicense(ctx context.Context, license *pb.License) (err error)
}

Dao dao interface

func New

func New(r *redis.Redis, db *sql.DB) (d Dao, cf func(), err error)

New new a dao and return.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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