models

package
v0.0.0-...-2ed13ab Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApp

func AddApp(ctx context.Context, name string, userUUID gguuid.UUID) (app *ent.App, err error)

func AddHome

func AddHome(ctx context.Context, name string) (home *ent.Home, err error)

func AddHomeConnection

func AddHomeConnection(ctx context.Context, startTime string, endTime string, userUUID gguuid.UUID, homeUUID gguuid.UUID) (homeconnection *ent.HomeConnection, err error)

func AddRoom

func AddRoom(ctx context.Context, name string, homeUUID gguuid.UUID) (room *ent.Room, err error)

func AddRoomConnection

func AddRoomConnection(ctx context.Context, startTime string, endTime string, userUUID gguuid.UUID, roomUUID gguuid.UUID) (roomconnection *ent.RoomConnection, err error)

func AddThing

func AddThing(ctx context.Context, name string, roomUUID gguuid.UUID) (thing *ent.Thing, err error)

func AddThingConnection

func AddThingConnection(ctx context.Context, startTime string, endTime string, userUUID gguuid.UUID, thingUUID gguuid.UUID) (thingconnection *ent.ThingConnection, err error)

func AddUser

func AddUser(ctx context.Context, name string, password string, superUser bool) (user *ent.User, err error)

func ChangeUserPassword

func ChangeUserPassword(ctx context.Context, uuid gguuid.UUID, password string) (num int, err error)

func DeleteApp

func DeleteApp(ctx context.Context, uuid gguuid.UUID) (num int, err error)

func DeleteHome

func DeleteHome(ctx context.Context, uuid gguuid.UUID) (num int, err error)

func DeleteHomeConnection

func DeleteHomeConnection(ctx context.Context, id int) (num int, err error)

func DeleteRoom

func DeleteRoom(ctx context.Context, uuid gguuid.UUID) (num int, err error)

func DeleteRoomConnection

func DeleteRoomConnection(ctx context.Context, id int) (num int, err error)

func DeleteThing

func DeleteThing(ctx context.Context, uuid gguuid.UUID) (num int, err error)

func DeleteThingConnection

func DeleteThingConnection(ctx context.Context, id int) (num int, err error)

func DeleteUser

func DeleteUser(ctx context.Context, uuid gguuid.UUID) (num int, err error)

func GetApp

func GetApp(ctx context.Context, uuid gguuid.UUID) (app *ent.App, err error)

func GetApps

func GetApps(ctx context.Context, pageNum int, pageSize int, userUUID gguuid.UUID) (apps []*ent.App, err error)

func GetAppsCount

func GetAppsCount(ctx context.Context, userUUID gguuid.UUID) (total int, err error)

func GetHomeConnections

func GetHomeConnections(ctx context.Context, pageNum int, pageSize int, userUUID gguuid.UUID, homeUUID gguuid.UUID) (homeconnections []*ent.HomeConnection, err error)

func GetHomeConnectionsCount

func GetHomeConnectionsCount(ctx context.Context, userUUID gguuid.UUID, homeUUID gguuid.UUID) (total int, err error)

func GetHomes

func GetHomes(ctx context.Context, pageNum int, pageSize int) (homes []*ent.Home, err error)

func GetHomesCount

func GetHomesCount(ctx context.Context) (total int, err error)

func GetRoomConnections

func GetRoomConnections(ctx context.Context, pageNum int, pageSize int, userUUID gguuid.UUID, roomUUID gguuid.UUID) (roomconnections []*ent.RoomConnection, err error)

func GetRoomConnectionsCount

func GetRoomConnectionsCount(ctx context.Context, userUUID gguuid.UUID, roomUUID gguuid.UUID) (total int, err error)

func GetRooms

func GetRooms(ctx context.Context, pageNum int, pageSize int, homeUUID gguuid.UUID) (rooms []*ent.Room, err error)

func GetRoomsCount

func GetRoomsCount(ctx context.Context, homeUUID gguuid.UUID) (total int, err error)

func GetThing

func GetThing(ctx context.Context, uuid gguuid.UUID) (thing *ent.Thing, err error)

func GetThingConnections

func GetThingConnections(ctx context.Context, pageNum int, pageSize int, userUUID gguuid.UUID, thingUUID gguuid.UUID) (thingconnections []*ent.ThingConnection, err error)

func GetThingConnectionsCount

func GetThingConnectionsCount(ctx context.Context, userUUID gguuid.UUID, thingUUID gguuid.UUID) (total int, err error)

func GetThings

func GetThings(ctx context.Context, pageNum int, pageSize int, roomUUID gguuid.UUID) (things []*ent.Thing, err error)

func GetThingsCount

func GetThingsCount(ctx context.Context, roomUUID gguuid.UUID) (total int, err error)

func GetUserByAccessKey

func GetUserByAccessKey(ctx context.Context, accessKey gguuid.UUID) (user *ent.User, err error)

func GetUserByName

func GetUserByName(ctx context.Context, name string) (user *ent.User, err error)

func GetUsers

func GetUsers(ctx context.Context, pageNum int, pageSize int, uuid gguuid.UUID) (users []*ent.User, err error)

func GetUsersCount

func GetUsersCount(ctx context.Context) (total int, err error)

func Setup

func Setup(option settings.Config)

func SetupDatabase

func SetupDatabase(option settings.Config)

func UpdateApp

func UpdateApp(ctx context.Context, uuid gguuid.UUID, name string, userUUID gguuid.UUID) (num int, err error)

func UpdateHome

func UpdateHome(ctx context.Context, uuid gguuid.UUID, name string) (num int, err error)

func UpdateHomeConnection

func UpdateHomeConnection(ctx context.Context, id int, startTime string, endTime string, userUUID gguuid.UUID, homeUUID gguuid.UUID) (num int, err error)

func UpdateRoom

func UpdateRoom(ctx context.Context, uuid gguuid.UUID, name string, homeUUID gguuid.UUID) (num int, err error)

func UpdateRoomConnection

func UpdateRoomConnection(ctx context.Context, id int, startTime string, endTime string, userUUID gguuid.UUID, roomUUID gguuid.UUID) (num int, err error)

func UpdateThing

func UpdateThing(ctx context.Context, uuid gguuid.UUID, name string, roomUUID gguuid.UUID) (num int, err error)

func UpdateThingConnection

func UpdateThingConnection(ctx context.Context, id int, startTime string, endTime string, userUUID gguuid.UUID, thingUUID gguuid.UUID) (num int, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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