area

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package area 公司/家庭

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreaDelSa added in v1.9.1

func AreaDelSa(c *gin.Context)

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 ProcessDelArea added in v1.9.1

func ProcessDelArea(c *gin.Context, areaID uint64, isDelCloudDiskFile bool) (resp clouddisk.DelAreaStatus, err error)

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
	AreaType    entity.AreaType `json:"area_type,omitempty"`     // 该区域类型
	IsBindCloud bool            `json:"is_bind_cloud,omitempty"` // 是否绑定云端sa
}

Area 家庭信息

func WrapAreas

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

type AreaDelSaReq added in v1.9.1

type AreaDelSaReq struct {
	AreaID           uint64 `uri:"id" binding:"required"`
	IsMigrationSA    bool   `json:"is_migration_sa"`
	IsDelCloudDisk   bool   `json:"is_del_cloud_disk"`
	CloudAreaId      string `json:"cloud_area_id"`
	CloudAccessToken string `json:"cloud_access_token"`
}

type AreaInfo

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

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(areaType entity.AreaType) (err error)

Jump to

Keyboard shortcuts

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