dao

package
v0.0.0-...-b9d6e19 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TmplUsing = iota
	TmplDeleted
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SpaceDao

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

func NewSpaceDao

func NewSpaceDao() *SpaceDao

func (*SpaceDao) DeleteSpaceById

func (d *SpaceDao) DeleteSpaceById(id uint32) error

func (*SpaceDao) FindAllSpaceByUserId

func (d *SpaceDao) FindAllSpaceByUserId(userId uint32) (spaces []model.Space, err error)

func (*SpaceDao) FindByIdAndUserId

func (d *SpaceDao) FindByIdAndUserId(id, userId uint32) (space *model.Space, err error)

func (*SpaceDao) FindByUserIdAndName

func (d *SpaceDao) FindByUserIdAndName(userId uint32, name string) error

FindByUserIdAndName TODO 增加联合索引 idx_userid_name 根据userid和name查询, 用于查询某个用户下的space名称是否重复

func (*SpaceDao) FindCountByUserId

func (d *SpaceDao) FindCountByUserId(userId uint32) (count uint32, err error)

func (*SpaceDao) Insert

func (d *SpaceDao) Insert(space *model.Space) (uint32, error)

func (*SpaceDao) UpdateNameById

func (d *SpaceDao) UpdateNameById(name string, id uint32) error

func (*SpaceDao) UpdateStatusById

func (d *SpaceDao) UpdateStatusById(id, status uint32) error

type SpaceTemplateDao

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

func NewSpaceTemplateDao

func NewSpaceTemplateDao() *SpaceTemplateDao

func (*SpaceTemplateDao) GetAllSpec

func (s *SpaceTemplateDao) GetAllSpec() (specs []model.SpaceSpec, err error)

func (*SpaceTemplateDao) GetAllTmpl

func (s *SpaceTemplateDao) GetAllTmpl() (tmpls []model.SpaceTemplate, err error)

func (*SpaceTemplateDao) GetAllTmplKind

func (s *SpaceTemplateDao) GetAllTmplKind() (kinds []model.TmplKind, err error)

func (*SpaceTemplateDao) GetAllUsingTmpl

func (s *SpaceTemplateDao) GetAllUsingTmpl() (tmpls []model.SpaceTemplate, err error)

type UserDao

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

func NewUserDao

func NewUserDao() *UserDao

func (*UserDao) AddUser

func (u *UserDao) AddUser(user *model.User) error

func (*UserDao) FindByEmail

func (u *UserDao) FindByEmail(email string) error

func (*UserDao) FindByUsername

func (u *UserDao) FindByUsername(username string) error

func (*UserDao) FindByUsernameDetailed

func (u *UserDao) FindByUsernameDetailed(username string) (user *model.User, _ error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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