area

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package area 公司/家庭

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSync

func DataSync(c *gin.Context)

DataSync 用于处理数据同步接口的请求

func DelArea

func DelArea(c *gin.Context)

DelArea 用于处理删除家庭接口的请求

func InfoArea

func InfoArea(c *gin.Context)

InfoArea 用于处理家庭详情接口的请求

func ListArea

func ListArea(c *gin.Context)

ListArea 用于处理家庭列表接口的请求

func QuitArea

func QuitArea(c *gin.Context)

QuitArea 用于处理退出家庭接口的请求

func RegisterAreaRouter

func RegisterAreaRouter(r gin.IRouter)

RegisterAreaRouter 用于注册与家庭相关的路由及其处理函数

func UpdateArea

func UpdateArea(c *gin.Context)

UpdateArea 用于处理修改家庭接口的请求

Types

type Area

type Area struct {
	Name string `json:"name,omitempty"` // 家庭名称
	ID   string `json:"id"`             // 家庭ID
}

Area 家庭信息

func WrapAreas

func WrapAreas(areas []entity.Area) (result []Area)

type AreaInfo

type AreaInfo struct {
	Name      string         `json:"name"`      // 家庭名称
	Locations []LocationInfo `json:"locations"` // 家庭下的房间列表
}

AreaInfo 需要同步的家庭数据

type DataSyncReq

type DataSyncReq struct {
	Nickname string   `json:"nickname"` // 用户昵称
	Area     AreaInfo `json:"area"`     // 家庭数据
}

DataSyncReq 数据同步接口请求参数

type DelAreaReq

type DelAreaReq struct {
	IsDelCloudDisk *bool `json:"is_del_cloud_disk"`
}

type LocationInfo

type LocationInfo struct {
	Name string `json:"name"` // 房间名称
	Sort int    `json:"sort"` // 房间在房间列表中的索引
}

LocationInfo 需要同步的房间数据

type UpdateAreaReq

type UpdateAreaReq struct {
	Name string `json:"name"`
}

UpdateAreaReq 修改家庭接口请求参数

func (*UpdateAreaReq) Validate

func (req *UpdateAreaReq) Validate() (err error)

Jump to

Keyboard shortcuts

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