client

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLayout

func AddLayout(uname string, lo *Layout)

func GetSize

func GetSize(c echo.Context) error

@Title get client viewport & others' size @Summary get client viewport, header, menu, content, & post-title size @Description @Tags Client @Accept json @Produce json @Success 200 "OK - get client viewport & other parts' size ok" @Failure 400 "Fail - viewport is not set" @Router /api/client/get/size [get] @Security ApiKeyAuth

func SetClientView

func SetClientView(c echo.Context) error

@Title set client browser's viewport @Summary set client browser's viewport ( width, height ) @Description @Tags Client @Accept json @Produce json @Param innerSize body string true "width: window.innerWidth & height: window.innerHeight" @Success 200 "OK - set client viewport ok" @Failure 400 "Fail - invalid width or height for setting viewport" @Router /api/client/set/view [put] @Security ApiKeyAuth

Types

type Area

type Area struct {
	Width  int `json:"width" form:"width" query:"width"`
	Height int `json:"height" form:"height" query:"height"`
}

func (Area) String

func (a Area) String() string

type Layout

type Layout struct {
	Viewport Area `json:"viewport"` // whole page area
	Header   Area `json:"header"`   // header area for title etc.
	Menu     Area `json:"menubar"`  // left area for menu
	Content  Area `json:"content"`  // right area for content
	Footer   Area `json:"footer"`   // bottom area for extra message
}

func GetLayout

func GetLayout(uname string) *Layout

func (*Layout) PostContentHeight

func (lo *Layout) PostContentHeight() int

func (*Layout) PostTitleHeight

func (lo *Layout) PostTitleHeight() int

func (*Layout) PostWidth

func (lo *Layout) PostWidth() int

func (Layout) String

func (lo Layout) String() string

Jump to

Keyboard shortcuts

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