dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	DB    *gorm.DB
	DBApm *gorm.DB
	// contains filtered or unexported fields
}

Dao dao.

func New

func New(c *conf.Config) (d *Dao)

New new a dao and return.

func (*Dao) Auth

func (d *Dao) Auth(c context.Context, cookie string) (msg map[string]interface{}, err error)

Auth get Token.

func (*Dao) Close

func (d *Dao) Close()

Close close connection of db , mc.

func (*Dao) NodeTree

func (d *Dao) NodeTree(c context.Context, token, bu, team string) (nodes []*model.Node, err error)

NodeTree get service tree.

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping check connection of db , mc.

func (*Dao) Role

func (d *Dao) Role(c context.Context, user, token string) (nodes *model.CacheData, err error)

Role get service tree.

func (*Dao) Token

func (d *Dao) Token(c context.Context, body string) (msg map[string]interface{}, err error)

Token get Token.

func (*Dao) Tree

func (d *Dao) Tree(c context.Context, token string) (data interface{}, err error)

Tree get service tree.

Jump to

Keyboard shortcuts

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