proto

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

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypePaint  = "paint"
	TypeCursor = "cursor"
	TypeGraph  = "graph"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	Proto
	Point
}

Cursor represents touch/cursor position

type DrawTab

type DrawTab struct {
	ID   int64
	User User
}

type FreeDraw

type FreeDraw struct {
	Graph
	Opacity     int
	FillStyle   string
	StrokeWidth float64
	StrokeColor float64
	UpdatedAt   int64
	Points      []Point
}

type Graph

type Graph struct {
	ID int64
	Point
}

type Paint

type Paint struct {
	Proto
	Version string
	DrawTab DrawTab
	// userId -> []Graph
	Elements map[int64][]Graph
}

type Point

type Point struct {
	X float64
	Y float64
}

type Proto

type Proto struct {
	Type string
}

Proto is basic data transfer structure

type User

type User struct {
	ID       int64
	Nickname string
}

Jump to

Keyboard shortcuts

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