Documentation ¶
Index ¶
- func AuthPortToUser(port int64, userId int64) error
- func AuthSubDomainToUser(subDomain string, userId int64) error
- func CanUserUsePort(userId int64, port int64) bool
- func CanUserUseSubDomain(userId int64, subDomain string) bool
- func CreateUser(user *User) error
- func GetConnection() (*gorm.DB, error)
- func InitTables()
- type ApplyAuth
- type PortAuth
- type SubDomainAuth
- type User
- type UserWithAuth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthPortToUser ¶
func AuthSubDomainToUser ¶
func CanUserUsePort ¶
func CanUserUseSubDomain ¶
func CreateUser ¶
func GetConnection ¶
func InitTables ¶
func InitTables()
Types ¶
type SubDomainAuth ¶
type User ¶
type User struct { UserId int64 `gorm:"primary_key;AUTO_INCREMENT"` Username string Password string Token string Role string Status string }
func GetUserById ¶
func GetUserByToken ¶
type UserWithAuth ¶
func GetAllPortAuth ¶
func GetAllPortAuth(userId int64) (ports []UserWithAuth, err error)
func GetAllSubDomainAuth ¶
func GetAllSubDomainAuth(userId int64) (subDomains []UserWithAuth, err error)
Click to show internal directories.
Click to hide internal directories.