model

package
v0.0.0-...-9fd81f0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Desktop

type Desktop struct {
	ID          string   `json:"id,omitempty"`
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	State       string   `json:"state,omitempty"`
	Type        string   `json:"type,omitempty"`
	Template    string   `json:"template,omitempty"`
	Viewers     []string `json:"viewers,omitempty"`
	Icon        string   `json:"icon,omitempty"`
	Image       string   `json:"image,omitempty"`
	IP          string   `json:"ip,omitempty"`
}

type Template

type Template struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Icon        string `json:"icon,omitempty"`
	Image       string `json:"image,omitempty"`
}

type User

type User struct {
	UID      string
	Username string
	Provider string

	Category string
	Role     string `json:"role"`
	Group    string `json:"group"`

	Desktops    []Desktop
	Templates   []Template
	Deployments []UserDeployment

	Name  string `json:"name"`
	Email string `json:"email"`
	Photo string `json:"photo"`
}

User is an user of IsardVDI

func (*User) ID

func (u *User) ID() string

func (*User) LoadFromID

func (u *User) LoadFromID(id string)

type UserDeployment

type UserDeployment struct {
	ID              string `json:"id,omitempty"`
	Name            string `json:"name,omitempty"`
	TotalDesktops   int    `json:"totalDesktops,omitempty"`
	StartedDesktops int    `json:"startedDesktops"`
}

Jump to

Keyboard shortcuts

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