mmysql

package
v0.0.0-...-6b52b4a Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WaitingPaid = iota
	Success
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ID          uint   `gorm:"primarykey"`
	CreatedAt   int64  `gorm:"autoCreateTime"`
	UpdatedAt   int64  `gorm:"autoUpdateTime"`
	UserUUID    string `json:"user_uuid" gorm:"user_uuid"`
	Name        string `json:"name"`
	PeerID      string `json:"peer_id"`
	UUID        string `json:"uuid" gorm:"column:uuid"`
	Port        int    `json:"port"`
	Duration    uint   `json:"duration"` // 使用时间:小时
	Price       uint   `json:"price"`    // 金额
	ResourceCid string `json:"resource_cid"`
	ServerCid   string `json:"server_cid"`
	ClientCid   string `json:"client_cid"`
	Status      uint   `json:"status"` // 0:待支付,1:已支付,待回调,2:已完成
}

func (Client) TableName

func (Client) TableName() string

type ClientTarget

type ClientTarget struct {
	Host string `json:"host" binding:"required"`
	Port int    `json:"port" binding:"required"`
}

func (*ClientTarget) Scan

func (c *ClientTarget) Scan(input interface{}) error

func (ClientTarget) Value

func (c ClientTarget) Value() (driver.Value, error)

type Resource

type Resource struct {
	ID        uint   `gorm:"primarykey"`
	CreatedAt int64  `gorm:"autoCreateTime"`
	UpdatedAt int64  `gorm:"autoUpdateTime"`
	Name      string `json:"name"`
	UUID      string `json:"uuid" gorm:"column:uuid"`
	UserUUID  string `json:"user_uuid" gorm:"user_uuid"`
	Type      string `json:"type"`
	Host      string `json:"host"`                    // api.github.com
	Port      string `json:"port" gorm:"column:port"` // 80-443;3306;6379
	Cid       string `json:"cid"`
}

func (Resource) TableName

func (Resource) TableName() string

Jump to

Keyboard shortcuts

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