persist

package
v0.0.0-...-ce9cc70 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDb

func ConnectDb() (*gorm.DB, error)

ConnectDb connect Db

func InitDatabase

func InitDatabase()

InitDatabase Init Db

func ReConnetDB

func ReConnetDB() error

ReConnetDB ReConnetDB

Types

type Persist

type Persist struct {
	// contains filtered or unexported fields
}

Persist struct

var GPersist *Persist

GPersist global Persist

func GetPersist

func GetPersist() *Persist

GetPersist Get Persist

func (*Persist) AdminLogin

func (persist *Persist) AdminLogin(userID, password string) (bean.AdminUsers, error)

AdminLogin AdminLogin Persist

func (*Persist) AdminUserInfo

func (persist *Persist) AdminUserInfo(userID string) (bean.AdminUserView, error)

AdminUserInfo AdminUserInfo Persist

func (*Persist) Close

func (persist *Persist) Close()

Close Close db

func (*Persist) CountUser

func (persist *Persist) CountUser() (uint64, error)

CountUser CountUser

func (*Persist) CreateAdminUser

func (persist *Persist) CreateAdminUser(user bean.AdminUsers) error

CreateAdminUser CreateAdminUser Persist

func (*Persist) CreateUser

func (persist *Persist) CreateUser(user bean.Users) error

CreateUser CreateUser Persist

func (*Persist) ListUser

func (persist *Persist) ListUser(search string, page int) ([]bean.Users, error)

ListUser ListUser Persist

func (*Persist) Login

func (persist *Persist) Login(userID, password string) (bean.Users, error)

Login Login Persist

func (*Persist) UpdateAdminUserPasswd

func (persist *Persist) UpdateAdminUserPasswd(userID, new string) error

UpdateAdminUserPasswd UpdateAdminUserPasswd Persist

func (*Persist) UpdateUserPasswd

func (persist *Persist) UpdateUserPasswd(userID, new string) error

UpdateUserPasswd UpdateUserPasswd Persist

func (*Persist) UserInfo

func (persist *Persist) UserInfo(userID string) (bean.UserView, error)

UserInfo UserInfo Persist

Jump to

Keyboard shortcuts

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