clients

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient() (clientUUID, token string, err error)

CreateClient 创建新客户端

func CreateClientWithName

func CreateClientWithName(name string) (clientUUID, token string, err error)

func DeleteClient

func DeleteClient(clientUuid string) error

func GetAllClientBasicInfo

func GetAllClientBasicInfo() (clients []models.Client, err error)

func GetClientByUUID

func GetClientByUUID(uuid string) (client models.Client, err error)

// GetAllClients 获取所有客户端配置

func getAllClients() (clients []models.Client, err error) {
	db := dbcore.GetDBInstance()
	err = db.Find(&clients).Error
	if err != nil {
		return nil, err
	}
	return clients, nil
}

func GetClientTokenByUUID

func GetClientTokenByUUID(uuid string) (token string, err error)

func GetClientUUIDByToken

func GetClientUUIDByToken(token string) (clientUUID string, err error)

func HiddenClients added in v0.1.13

func HiddenClients() (map[string]bool, error)

HiddenClients returns an immutable snapshot. Successful client writes invalidate it immediately; only uuid/hidden are loaded, never tokens or hardware details.

func ReportVerify

func ReportVerify(report v2.Report) error

检查数据防止异常数据导致数据库损坏

func SaveClient

func SaveClient(updates map[string]interface{}) error

func SaveClientInfo

func SaveClientInfo(update map[string]interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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