rest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAuthenticationMiddleware

func CreateAuthenticationMiddleware(userService *user.UserService) echo.MiddlewareFunc

func CreateRestApi

func CreateRestApi(metricsService *DbMetricsService, journalService *JournalLogService, userService *user.UserService)

func ParseTime

func ParseTime(timeString string, durationDifference int, timezone string) time.Time

Types

type Api

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

func NewApi

func NewApi(metricsService *DbMetricsService, journalService *JournalLogService, store sessions.Store, userService *user.UserService) *Api

func (*Api) AuthCallback

func (a *Api) AuthCallback(c echo.Context) error

func (*Api) Authenticate

func (a *Api) Authenticate(c echo.Context) error

func (*Api) DeleteMetric

func (a *Api) DeleteMetric(c echo.Context) error

func (*Api) Logout

func (a *Api) Logout(c echo.Context) error

func (*Api) PostJournal

func (a *Api) PostJournal(c echo.Context) error

func (*Api) ShowDashboard

func (a *Api) ShowDashboard(c echo.Context) error

func (*Api) ShowJournal

func (a *Api) ShowJournal(c echo.Context) error

type DashboardData

type DashboardData struct {
	Metrics []DashboardMetric
}

type DashboardMetric

type DashboardMetric struct {
	MetricValues
	Id        string
	Timestamp string
}

type JournalBody

type JournalBody struct {
	Logs string `json:"logs"`
}

type Templates

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

func (*Templates) Render

func (t *Templates) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Jump to

Keyboard shortcuts

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