models

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Avatar            = "avatar"
	ProfileBackGround = "profile-background"
)

Variables

View Source
var NullUUID = uuid.MustParse("00000000-0000-0000-0000-000000000000")

Functions

This section is empty.

Types

type Asset

type Asset struct {
	ID         uuid.UUID  `json:"id" validation:"required"`
	References References `json:"refs" validation:"required"`
	Path       string
}

func (*Asset) ClearID

func (r *Asset) ClearID(typeString string) error

func (*Asset) GetPath

func (r *Asset) GetPath(typeString string) (string, error)

func (*Asset) SetID

func (r *Asset) SetID(typeString string) error

type Data

type Data struct {
	ID       int     `json:"id"`
	DataType int     `json:"type"`
	Speed    float32 `json:"speed"`
}

type Details

type Details struct {
	SupportClients bool `json:"support_clients" validation:"required"`
	ClientUI       bool `json:"client_ui" validation:"required"`
	ProjectUI      bool `json:"project_ui" validation:"required"`
	Requires3D     bool `json:"requires_3d" validation:"required"`
}

type Feature

type Feature struct {
	ID     int             `json:"id"`
	Name   string          `json:"name"`
	Config json.RawMessage `json:"config"`
}

Feature describes the available simulation features.

type LeaveType

type LeaveType string

type Privilege

type Privilege struct {
	ID          int    `json:"id" validation:"required"`
	Name        string `json:"name" validation:"required"`
	Description string `json:"description" validation:"required"`
}

type Privileges

type Privileges []Privilege

func (Privileges) IsValidPrivilege

func (l Privileges) IsValidPrivilege(privilege int) bool

type Product

type Product struct {
	ID      uuid.UUID `json:"id" validation:"required"`
	Name    string    `json:"name" validation:"required"`
	Public  bool      `json:"public" validation:"required"`
	Details Details   `json:"details" validation:"required"`
}

type ProductUsers

type ProductUsers map[uuid.UUID]int

type Project

type Project struct {
	ID        uuid.UUID       `json:"id"`
	Name      string          `json:"name"`
	UserID    uuid.UUID       `json:"user_id"`
	FeatureID int             `json:"features_id"`
	Config    json.RawMessage `json:"config"`
}

Project defines the project structure.

type References

type References struct {
	AvatarID          uuid.UUID `json:"avatar_id,omitempty"`
	ProfileBackGround uuid.UUID `json:"profile_backgr,omitempty"`
}

Assets structure contains the identification of all user related documents images.

type Settings

type Settings struct {
	TwoStepsVerif bool `json:"two_steps_verif,omitempty"`
}

Assets structure contains the identification of all user related documents images.

type User

type User struct {
	ID         uuid.UUID `json:"id" validation:"required"`
	Name       string    `json:"name" validation:"required"`
	Email      string    `json:"email" validation:"required"`
	Password   string    `json:"password" validation:"required"`
	SettingsID uuid.UUID `json:"user_settings_id" validation:"required"`
	AssetsID   uuid.UUID `json:"user_assets_id" validation:"required"`
}

User defines the user structures. Each user must have an associated settings entry.

type UserProducts

type UserProducts map[uuid.UUID]int

type UserSetting

type UserSetting struct {
	ID       uuid.UUID `json:"id" validation:"required"`
	Settings Settings  `json:"settings" validation:"required"`
}

Jump to

Keyboard shortcuts

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