salon

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LABLeft  = 1 << 0
	LABRight = 1 << 1
	LABTop   = 1 << 2
	LABDown  = 1 << 3
)

Variables

View Source
var Field = map[string]int{
	"cross":      LABLeft | LABRight | LABTop | LABDown,
	"downleft":   LABLeft | LABDown,
	"downright":  LABRight | LABDown,
	"edown":      LABDown,
	"eleft":      LABLeft,
	"empty":      0,
	"eright":     LABRight,
	"etop":       LABTop,
	"full":       LABLeft | LABRight | LABTop | LABDown,
	"horizontal": LABLeft | LABRight,
	"lefttop":    LABLeft | LABTop,
	"rightdown":  LABRight | LABDown,
	"tdown":      LABLeft | LABRight | LABDown,
	"tleft":      LABLeft | LABTop | LABDown,
	"topleft":    LABTop | LABLeft,
	"topright":   LABTop | LABRight,
	"tright":     LABRight | LABTop | LABDown,
	"ttop":       LABTop | LABLeft | LABRight,
	"vertical":   LABTop | LABDown,
}
View Source
var SalonDigitalImage []byte
View Source
var SalonDigitalJSON []byte
View Source
var StaticFS embed.FS
View Source
var TemplateFS embed.FS

Functions

This section is empty.

Types

type FieldEntry

type FieldEntry struct {
	Name string
	Work *Work
}

type Labyrinth

type Labyrinth struct {
	Fields                   [][]FieldEntry
	Detail                   string
	Size                     int
	North, East, South, West bool
	// contains filtered or unexported fields
}

func NewLabyrinth

func NewLabyrinth(size int, works map[string]*Work) *Labyrinth

func (*Labyrinth) GetMovements

func (lab *Labyrinth) GetMovements() (left, right, top, down bool)

func (*Labyrinth) Move

func (lab *Labyrinth) Move(x, y int)

type Salon

type Salon struct {
	// contains filtered or unexported fields
}

func NewSalon

func NewSalon(works map[string]*Work, addrExt string, staticFS, templateFS fs.FS, templateDev bool, imageFS fs.FS, responsive bool, log *logging.Logger) (*Salon, error)

func (*Salon) MainHandler

func (s *Salon) MainHandler(w http.ResponseWriter, r *http.Request)

func (*Salon) MoveHandler

func (s *Salon) MoveHandler(w http.ResponseWriter, r *http.Request)

func (*Salon) SetRoutes

func (s *Salon) SetRoutes(pathPrefix string, router *mux.Router) error

type Work

type Work struct {
	Signature    string
	Title        string
	Year         string
	Authors      []string
	Description  string
	ImageUrl     string
	ThumbnailUrl string
	IFrameUrl    string
}

Jump to

Keyboard shortcuts

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