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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provider = wire.NewSet(New, NewDB, NewRedis)

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)
	Organization(c context.Context, orgId string) (*pb.Organization, error)
	InsertOrganization(c context.Context, organization *pb.Organization) (err error)
	UpdateOrganization(c context.Context, organization *pb.Organization) (err error)
	DeleteOrganization(c context.Context, organization *pb.Organization) (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.

Jump to

Keyboard shortcuts

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