models

package
v0.0.0-...-427f7ba Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InviteCode

type InviteCode struct {
	Id             int64     `xorm:"pk autoincr notnull"`
	InviteCode     string    `xorm:"not null"`
	PackageLimit   int       `xorm:"not null"`
	Available      bool      `xorm:"not null default 1"`
	AvailableLimit int       `xorm:"not null default 1"` //unit: month
	Created        time.Time `xorm:"created"`
	Updated        time.Time `xorm:"updated"`
}

type PageData

type PageData struct {
	Total     int64       `json:"total"`
	PageIndex int         `json:"pageIndex"`
	PageSize  int         `json:"pageSize"`
	Data      interface{} `json:"data"`
}

type Response

type Response struct {
	Success bool        `json:"success"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Response struct for http response

type ServiceResult

type ServiceResult struct {
	ID           string `json:"serviceId"`
	Host         string `json:"host"`
	Port         int    `json:"servicePort"`
	Password     string `json:"servicePwd"`
	PackageLimit int    `json:"packageLimit"`
}

ServiceResult struct for new created SS service

type User

type User struct {
	Id              int64 `xorm:"pk autoincr notnull"`
	Username        string
	HashedPwd       []byte `xorm:"blob"`
	InviteCode      string
	PackageLimit    int        `xorm:"not null"` //Package bandwidth limit, unit: GB
	PackageUsed     float32    //Package bandwidth used, unit: GB
	Status          int        `xorm:"default 0"` // 0=>not created 1=>running 2=>stopped
	ServiceId       string     //SS container id
	ServiceType     string     //SS container type
	ServicePort     int        `xorm:"not null default 0"` //Docker service port for SS
	ServicePwd      string     //Password for SS
	ServiceMethod   string     //Encryption method for SS
	LastStatsResult uint64     //Last time stats result,unit: byte
	LastStatsTime   *time.Time //Last time stats time
	Created         time.Time  `xorm:"created"`
	Updated         time.Time  `xorm:"updated"`
	Expired         time.Time  `xorm:"expired"`
}

type UserInfo

type UserInfo struct {
	Id                 int64
	Host               string
	Username           string
	Status             int
	PackageLimit       int
	PackageUsed        string
	PackageLeft        string
	PackageLeftPercent string
	ServicePort        int
	ServicePwd         string
	ServiceMethod      string
	ServiceType        string
	ServiceURL         string
	Expired            string
}

Jump to

Keyboard shortcuts

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