handler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Copyright (c) 2024 Eli Janssen Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func New

func New(opts Options) (*Handler, error)

func (*Handler) AccessDeniedError

func (x *Handler) AccessDeniedError(w http.ResponseWriter)

func (*Handler) AddFavorite

func (x *Handler) AddFavorite(w http.ResponseWriter, r *http.Request)

func (*Handler) BadFormDataError

func (x *Handler) BadFormDataError(w http.ResponseWriter, err error, hints ...string)

func (*Handler) BadRefIDError

func (x *Handler) BadRefIDError(w http.ResponseWriter, reftyp string, err error)

func (*Handler) BadRequestError

func (x *Handler) BadRequestError(w http.ResponseWriter, msg string)

func (*Handler) BadSessionDataError

func (x *Handler) BadSessionDataError(w http.ResponseWriter)

func (*Handler) CreateAccount

func (x *Handler) CreateAccount(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateEarmark

func (x *Handler) CreateEarmark(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateEvent

func (x *Handler) CreateEvent(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateEventItem

func (x *Handler) CreateEventItem(w http.ResponseWriter, r *http.Request)

func (*Handler) DBError

func (x *Handler) DBError(w http.ResponseWriter, err error)

func (*Handler) DeleteAccount

func (x *Handler) DeleteAccount(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteAllNotifications

func (x *Handler) DeleteAllNotifications(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteEarmark

func (x *Handler) DeleteEarmark(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteEvent

func (x *Handler) DeleteEvent(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteEventItem

func (x *Handler) DeleteEventItem(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteFavorite

func (x *Handler) DeleteFavorite(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteNotification

func (x *Handler) DeleteNotification(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteWebAuthnKey

func (x *Handler) DeleteWebAuthnKey(w http.ResponseWriter, r *http.Request)

func (*Handler) Error

func (x *Handler) Error(w http.ResponseWriter, statusMsg string, code int)

func (*Handler) ForbiddenError

func (x *Handler) ForbiddenError(w http.ResponseWriter, msg string)

func (*Handler) InternalServerError

func (x *Handler) InternalServerError(w http.ResponseWriter, msg string)

func (*Handler) Json

func (x *Handler) Json(w http.ResponseWriter, code int, payload interface{})

func (*Handler) ListEarmarks

func (x *Handler) ListEarmarks(w http.ResponseWriter, r *http.Request)

func (*Handler) ListEvents

func (x *Handler) ListEvents(w http.ResponseWriter, r *http.Request)

func (*Handler) ListFavorites

func (x *Handler) ListFavorites(w http.ResponseWriter, r *http.Request)

func (*Handler) ListNotifications

func (x *Handler) ListNotifications(w http.ResponseWriter, r *http.Request)

func (*Handler) Login

func (x *Handler) Login(w http.ResponseWriter, r *http.Request)

func (*Handler) Logout

func (x *Handler) Logout(w http.ResponseWriter, r *http.Request)

func (*Handler) NotFoundError

func (x *Handler) NotFoundError(w http.ResponseWriter)

func (*Handler) NotFoundHandler

func (x *Handler) NotFoundHandler(w http.ResponseWriter, r *http.Request)

func (*Handler) PostmarkCallback

func (x *Handler) PostmarkCallback(w http.ResponseWriter, r *http.Request)

func (*Handler) ResetPassword

func (x *Handler) ResetPassword(w http.ResponseWriter, r *http.Request)

func (*Handler) SendResetPasswordEmail

func (x *Handler) SendResetPasswordEmail(w http.ResponseWriter, r *http.Request)

func (*Handler) SendVerificationEmail

func (x *Handler) SendVerificationEmail(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowAbout

func (x *Handler) ShowAbout(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowCreateAccount

func (x *Handler) ShowCreateAccount(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowCreateEarmarkForm

func (x *Handler) ShowCreateEarmarkForm(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowCreateEventForm

func (x *Handler) ShowCreateEventForm(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowCreateEventItemForm

func (x *Handler) ShowCreateEventItemForm(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowDashboard

func (x *Handler) ShowDashboard(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowEditEventForm

func (x *Handler) ShowEditEventForm(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowEvent

func (x *Handler) ShowEvent(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowEventItemEditForm

func (x *Handler) ShowEventItemEditForm(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowForgotPasswordForm

func (x *Handler) ShowForgotPasswordForm(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowIndex

func (x *Handler) ShowIndex(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowLoginForm

func (x *Handler) ShowLoginForm(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowPasswordResetForm

func (x *Handler) ShowPasswordResetForm(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowProfile

func (x *Handler) ShowProfile(w http.ResponseWriter, r *http.Request)

func (*Handler) ShowSettings

func (x *Handler) ShowSettings(w http.ResponseWriter, r *http.Request)

func (*Handler) Template

func (x *Handler) Template(name string) (resources.TExecuter, error)

func (*Handler) TemplateError

func (x *Handler) TemplateError(w http.ResponseWriter)

func (*Handler) TemplateExecute

func (x *Handler) TemplateExecute(w io.Writer, name string, vars MapSA) error

func (*Handler) TemplateExecuteSub

func (x *Handler) TemplateExecuteSub(w io.Writer, name, subname string, vars MapSA) error

func (*Handler) UpdateApiAuthSettings

func (x *Handler) UpdateApiAuthSettings(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateAuthSettings

func (x *Handler) UpdateAuthSettings(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateEvent

func (x *Handler) UpdateEvent(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateEventItem

func (x *Handler) UpdateEventItem(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateEventItemSorting

func (x *Handler) UpdateEventItemSorting(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateRemindersSettings

func (x *Handler) UpdateRemindersSettings(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateSettings

func (x *Handler) UpdateSettings(w http.ResponseWriter, r *http.Request)

func (*Handler) VerifyEmail

func (x *Handler) VerifyEmail(w http.ResponseWriter, r *http.Request)

func (*Handler) WebAuthnBeginLogin

func (x *Handler) WebAuthnBeginLogin(w http.ResponseWriter, r *http.Request)

func (*Handler) WebAuthnBeginRegistration

func (x *Handler) WebAuthnBeginRegistration(w http.ResponseWriter, r *http.Request)

func (*Handler) WebAuthnFinishLogin

func (x *Handler) WebAuthnFinishLogin(w http.ResponseWriter, r *http.Request)

func (*Handler) WebAuthnFinishRegistration

func (x *Handler) WebAuthnFinishRegistration(w http.ResponseWriter, r *http.Request)

type MapSA

type MapSA = map[string]any

type Options

type Options struct {
	Db           model.PgxHandle        `validate:"required"`
	Redis        *redis.Client          `validate:"required"`
	Templates    resources.TGetter      `validate:"required"`
	SessMgr      session.SessionManager `validate:"required"`
	Mailer       mail.MailSender        `validate:"required"`
	HMACKeyBytes []byte                 `validate:"required"`
	BaseURL      string                 `validate:"required"`
	IsProd       bool
}

type PostMarkRecord

type PostMarkRecord struct {
	RecordType        string
	MessageStream     string
	SuppressionReason string
	Recipient         string
	SuppressSending   bool
}

Jump to

Keyboard shortcuts

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