domain

package
v0.0.0-...-5b7eff6 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package name : domain Filename : domain.go Description : Host code for application entities : Users, Devices, Company

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	CompanyID   string             `json:"company_id"`
	CompanyName string             `json:"company_name"`
	Image       string             `json:"image"`
	Devices     map[string]*Device `json:"devices"`
	Users       map[string]*User   `json:"users"`
}

type Device

type Device struct {
	DeviceID   string `json:"device_id"`
	DeviceName string `json:"device_name"`
	Image      string `json:"image"`
	Capacity   int64  `json:"capacity"`
	Client     struct {
		CompanyID   string `json:"company_id"`
		CompanyName string `json:"company_name"`
	} `json:"client"`
	Env       string `json:"env"`
	AppType   string `json:"app_type"`
	Latitude  int64  `json:"latitude"`
	Longitude int64  `json:"longitude"`
}

type User

type User struct {
	UserID    string `json:"user_id"`
	FirstName string `json:"firstname"`
	Lastname  string `json:"lastname"`
	Email     string `json:"email"`
	Phone     int64  `json:"phone"`
	Password  string `json:"password"`
	Image     string `json:"image"`
	Client    struct {
		CompanyID   string `json:"company_id"`
		CompanyName string `json:"company_name"`
	} `json:"client"`
	Devices []*struct {
		DeviceID   string `json:"device_id"`
		DeviceName string `json:"device_name"`
	} `json:"devices"`
	IsAdmin      bool `json:"is_admin"`
	IsSuperUser  bool `json:"is_super_user"`
	IsInstaller  bool `json:"is_installer"`
	IsClient     bool `json:"is_client"`
	IsManager    bool `json:"is_manager"`
	IsTechnician bool `json:"is_technician"`
}

func (User) CheckPasswordHash

func (u User) CheckPasswordHash(password string) bool

func (*User) HashPassword

func (u *User) HashPassword() error

Jump to

Keyboard shortcuts

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