model

package
v0.0.0-...-3e9a8c4 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileStructure

func GetFileStructure(username string) (*types.FileStructure, error)

GetFileStructure read file structure and return it

Types

type User

type User struct {
	ID         int        `xorm:"pk autoincr 'id'"`
	Username   string     `xorm:"notnull unique"`
	Email      string     `xorm:"notnull unique"`
	Password   string     `xorm:"notnull"`
	CreateTime *time.Time `xorm:"created"`
}

User correspond user table in mysql

func (*User) AddUserHome

func (u *User) AddUserHome() error

AddUserHome create user home directory

func (*User) GetWithEmail

func (u *User) GetWithEmail(session *xorm.Session) (bool, error)

GetWithEmail get user with given email

func (*User) GetWithUserID

func (u *User) GetWithUserID(session *xorm.Session) (bool, error)

GetWithUserID get user with given id

func (*User) GetWithUsername

func (u *User) GetWithUsername(session *xorm.Session) (bool, error)

GetWithUsername get user with given username

func (*User) Insert

func (u *User) Insert(session *xorm.Session) (int, error)

Insert a user to the table

func (User) TableName

func (u User) TableName() string

TableName defines table name

Jump to

Keyboard shortcuts

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