service

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const BoxBlank = "blank"
View Source
const BoxCell = "cell"
View Source
const BoxImpressum = "impressum-page"
View Source
const BoxNews = "news"

Variables

View Source
var GRIDLARGE = []Grid{
	{Id: 0, Left: 1, Cols: 2, Top: 2, Rows: 3, Type: BoxCell, Scheme: SCHEMES[1], VAlign: bottom},
	{Id: 0, Left: 3, Cols: 2, Top: 2, Rows: 3, Type: BoxNews, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 5, Cols: 3, Top: 2, Rows: 1, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 8, Cols: 2, Top: 2, Rows: 5, Type: BoxCell, Scheme: SCHEMES[6], VAlign: bottom},
	{Id: 0, Left: 10, Cols: 3, Top: -1, Rows: 4, Type: BoxCell, Scheme: SCHEMES[4], VAlign: bottom},
	{Id: 0, Left: 5, Cols: 3, Top: 3, Rows: 3, Type: BoxCell, Scheme: SCHEMES[2], VAlign: bottom},
	{Id: 0, Left: 10, Cols: 3, Top: 3, Rows: 1, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 10, Cols: 3, Top: 4, Rows: 3, Type: BoxCell, Scheme: SCHEMES[5], VAlign: bottom},
	{Id: 0, Left: 1, Cols: 2, Top: 5, Rows: 4, Type: BoxCell, Scheme: SCHEMES[6], VAlign: bottom},
	{Id: 0, Left: 3, Cols: 2, Top: 5, Rows: 1, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 3, Cols: 4, Top: 6, Rows: 3, Type: BoxCell, Scheme: SCHEMES[4], VAlign: bottom},
	{Id: 0, Left: 7, Cols: 1, Top: 6, Rows: 1, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 7, Cols: 4, Top: 7, Rows: 3, Type: BoxCell, Scheme: SCHEMES[1], VAlign: bottom},
	{Id: 0, Left: 11, Cols: 2, Top: 7, Rows: 6, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 1, Cols: 1, Top: 9, Rows: 4, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 2, Cols: 2, Top: 9, Rows: 4, Type: BoxCell, Scheme: SCHEMES[5], VAlign: bottom},
	{Id: 0, Left: 4, Cols: 2, Top: 9, Rows: 4, Type: BoxCell, Scheme: SCHEMES[6], VAlign: bottom},
	{Id: 0, Left: 6, Cols: 1, Top: 9, Rows: 1, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 6, Cols: 3, Top: 10, Rows: 3, Type: BoxCell, Scheme: SCHEMES[2], VAlign: bottom},
	{Id: 0, Left: 9, Cols: 1, Top: 10, Rows: 3, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
}
View Source
var GRIDSMALL = []Grid{
	{Id: 0, Left: 1, Cols: 3, Top: 2, Rows: 5, Type: BoxCell, Scheme: SCHEMES[1], VAlign: bottom},
	{Id: 0, Left: 4, Cols: 5, Top: 2, Rows: 3, Type: BoxNews, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 4, Cols: 5, Top: 5, Rows: 3, Type: BoxCell, Scheme: SCHEMES[4], VAlign: top},
	{Id: 0, Left: 1, Cols: 3, Top: 7, Rows: 5, Type: BoxCell, Scheme: SCHEMES[2], VAlign: bottom},
	{Id: 0, Left: 4, Cols: 5, Top: 8, Rows: 1, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 4, Cols: 5, Top: 9, Rows: 4, Type: BoxCell, Scheme: SCHEMES[1], VAlign: bottom},
	{Id: 0, Left: 1, Cols: 3, Top: 12, Rows: 1, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: bottom},
	{Id: 0, Left: 1, Cols: 5, Top: 13, Rows: 4, Type: BoxCell, Scheme: SCHEMES[6], VAlign: bottom},
	{Id: 0, Left: 6, Cols: 3, Top: 13, Rows: 4, Type: BoxCell, Scheme: SCHEMES[2], VAlign: bottom},
}
View Source
var IMPRESSUM = map[string]string{"color": black, "background-color": darkgoldenrod, "font-family": fontFamilySansSerif, "font-style": "italic", "vertical-align": "middle"}
View Source
var NEWSLARGE = []Grid{
	{Id: 0, Left: 1, Cols: 4, Top: 2, Rows: 7, Type: BoxNews, Scheme: SCHEMES[3], VAlign: top},
	{Id: 0, Left: 5, Cols: 4, Top: 2, Rows: 7, Type: BoxCell, Scheme: SCHEMES[6], VAlign: top},
	{Id: 0, Left: 9, Cols: 4, Top: 4, Rows: 7, Type: BoxCell, Scheme: SCHEMES[5], VAlign: top},
	{Id: 0, Left: 1, Cols: 5, Top: 9, Rows: 6, Type: BoxCell, Scheme: SCHEMES[1], VAlign: top},
	{Id: 0, Left: 6, Cols: 3, Top: 9, Rows: 1, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: top},
	{Id: 0, Left: 9, Cols: 4, Top: 9, Rows: 6, Type: BoxCell, Scheme: SCHEMES[4], VAlign: top},
	{Id: 0, Left: 1, Cols: 2, Top: 15, Rows: 6, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: top},
	{Id: 0, Left: 3, Cols: 6, Top: 15, Rows: 6, Type: BoxCell, Scheme: SCHEMES[1], VAlign: top},
	{Id: 0, Left: 14, Cols: 4, Top: 4, Rows: 3, Type: BoxBlank, Scheme: SCHEMES[6], VAlign: top},
}
View Source
var NEWSSMALL = []Grid{
	{Id: 0, Left: 1, Cols: 4, Top: 2, Rows: 3, Type: BoxNews, Scheme: SCHEMES[3], VAlign: top},
	{Id: 0, Left: 5, Cols: 4, Top: 3, Rows: 3, Type: BoxCell, Scheme: SCHEMES[2], VAlign: top},
	{Id: 0, Left: 1, Cols: 1, Top: 5, Rows: 3, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: top},
	{Id: 0, Left: 2, Cols: 3, Top: 5, Rows: 3, Type: BoxCell, Scheme: SCHEMES[2], VAlign: top},
	{Id: 0, Left: 5, Cols: 4, Top: 4, Rows: 3, Type: BoxCell, Scheme: SCHEMES[6], VAlign: top},
	{Id: 0, Left: 1, Cols: 4, Top: 6, Rows: 3, Type: BoxCell, Scheme: SCHEMES[2], VAlign: top},
	{Id: 0, Left: 5, Cols: 1, Top: 7, Rows: 2, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: top},
	{Id: 0, Left: 6, Cols: 3, Top: 7, Rows: 4, Type: BoxCell, Scheme: SCHEMES[1], VAlign: top},
	{Id: 0, Left: 1, Cols: 2, Top: 9, Rows: 3, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: top},
	{Id: 0, Left: 3, Cols: 3, Top: 9, Rows: 3, Type: BoxCell, Scheme: SCHEMES[6], VAlign: top},
	{Id: 0, Left: 6, Cols: 3, Top: 11, Rows: 2, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: top},
	{Id: 0, Left: 1, Cols: 5, Top: 12, Rows: 3, Type: BoxCell, Scheme: SCHEMES[4], VAlign: top},
	{Id: 0, Left: 3, Cols: 3, Top: 13, Rows: 3, Type: BoxCell, Scheme: SCHEMES[2], VAlign: top},
	{Id: 0, Left: 5, Cols: 1, Top: 14, Rows: 1, Type: BoxBlank, Scheme: SCHEMES[3], VAlign: top},
}
View Source
var SCHEMES = map[int]map[string]string{
	1: {"color": deeppink, "background-color": darkorchid1, "font-family": fontFamilySansSerifCondensed, "vertical-align": "bottom"},
	2: {"color": darkgoldenrod, "background-color": deeppink, "font-family": fontFamilySansSerif, "font-style": "italic", "vertical-align": "bottom"},
	3: {"color": white, "background-color": dark, "font-family": fontFamilySerif, "vertical-align": "top"},
	4: {"color": black, "background-color": turquoise, "font-family": fontFamilySerif, "vertical-align": "top"},
	5: {"color": darkgoldenrod, "background-color": darkorchid, "font-family": fontFamilySansSerif, "font-style": "italic", "vertical-align": "top"},
	6: {"color": darkorchid, "background-color": darkgoldenrod, "font-family": fontFamilySansSerif, "font-style": "italic", "vertical-align": "bottom"},
}

Functions

func GetErrorStacktrace added in v2.0.1

func GetErrorStacktrace(err error) errors.StackTrace

Types

type Content added in v2.0.1

type Content interface {
	GetId() int64
	GetDate() string
	GetInst() string
	GetTitle() string
	GetUrl() string
	GetTagIDs() []int64
	GetInstitutionID() int64
}

type Grid

type Grid struct {
	Id, Left, Cols, Top, Rows int64
	Type                      string
	Scheme                    map[string]string
	VAlign                    string
	Content                   Content
}

type Impressum added in v2.0.1

type Impressum struct {
	Id, Left, Cols, Top, Rows int64
	Type                      string
	Scheme                    map[string]string
	VAlign                    string
	Text                      string
}

type Server

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

func NewServer

func NewServer(service, addr, addrExt, staticFiles, templateFiles string, templateReload bool, dir *directus.Directus, log *logging.Logger, accessLog io.Writer) (*Server, error)

func (*Server) InitTemplates

func (s *Server) InitTemplates() error

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(cert, key string) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

type StaticContent added in v2.0.1

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

func (*StaticContent) GetDate added in v2.0.1

func (sc *StaticContent) GetDate() string

func (*StaticContent) GetId added in v2.0.1

func (sc *StaticContent) GetId() int64

func (*StaticContent) GetInst added in v2.0.1

func (sc *StaticContent) GetInst() string

func (*StaticContent) GetInstitutionID added in v2.0.1

func (sc *StaticContent) GetInstitutionID() int64

func (*StaticContent) GetTagIDs added in v2.0.1

func (sc *StaticContent) GetTagIDs() []int64

func (*StaticContent) GetTitle added in v2.0.1

func (sc *StaticContent) GetTitle() string

func (*StaticContent) GetUrl added in v2.0.1

func (sc *StaticContent) GetUrl() string

Jump to

Keyboard shortcuts

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