services

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteSuperUserByName

func DeleteSuperUserByName(ctx context.Context, name string) error

Types

type AppRo

type AppRo struct {
	UUID  uuid.UUID    `json:"uuid,omitempty"`
	Name  string       `json:"name,omitempty"`
	Edges ent.AppEdges `json:"edges"`
}

func GetApps

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

type ThingRo

type ThingRo struct {
	UUID  uuid.UUID      `json:"uuid,omitempty"`
	Name  string         `json:"name,omitempty"`
	Edges ent.ThingEdges `json:"edges"`
}

func GetThings

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

type UserRo

type UserRo struct {
	UUID      gguuid.UUID `json:"uuid,omitempty"`
	Name      string      `json:"name,omitempty"`
	SuperUser bool        `json:"super_user"`
}

func GetUsers

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

func Login

func Login(ctx context.Context, username string, password string) (string, *UserRo, error)

Jump to

Keyboard shortcuts

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