web

package
v0.0.0-...-63eaebe Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "github.com/nasermirzaei89/fullstackgo/web"

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(
	cookieStore *sessions.CookieStore,
	sessionName string,
	authSvc authentication.Service,
	authzSvc *authorization.Service,
	blogSvc blog.Service,
	mediaSvc media.Service,
	mailer mail.Mailer,
	csrfAuthKeys []byte,
	csrfTrustedOrigins []string,
) *Handler

func (*Handler) AuthMiddleware

func (h *Handler) AuthMiddleware() func(http.Handler) http.Handler

func (*Handler) AuthenticatedOnly

func (h *Handler) AuthenticatedOnly(next http.Handler) http.Handler

func (*Handler) GuestOnly

func (h *Handler) GuestOnly(next http.Handler) http.Handler

func (*Handler) HandleCreatePost

func (h *Handler) HandleCreatePost() http.Handler

func (*Handler) HandleDeleteComment

func (h *Handler) HandleDeleteComment() http.Handler

func (*Handler) HandleDeleteCommentPage

func (h *Handler) HandleDeleteCommentPage() http.Handler

func (*Handler) HandleDeleteMedia

func (h *Handler) HandleDeleteMedia() http.Handler

func (*Handler) HandleDeleteMediaPage

func (h *Handler) HandleDeleteMediaPage() http.Handler

func (*Handler) HandleDeletePost

func (h *Handler) HandleDeletePost() http.Handler

func (*Handler) HandleDeletePostPage

func (h *Handler) HandleDeletePostPage() http.Handler

func (*Handler) HandleEditComment

func (h *Handler) HandleEditComment() http.Handler

func (*Handler) HandleEditCommentPage

func (h *Handler) HandleEditCommentPage() http.Handler

func (*Handler) HandleEditPost

func (h *Handler) HandleEditPost() http.Handler

func (*Handler) HandleEditPostPage

func (h *Handler) HandleEditPostPage() http.Handler

func (*Handler) HandleForgotPassword

func (h *Handler) HandleForgotPassword() http.Handler

func (*Handler) HandleForgotPasswordPage

func (h *Handler) HandleForgotPasswordPage() http.Handler

func (*Handler) HandleGetMedia

func (h *Handler) HandleGetMedia() http.Handler

func (*Handler) HandleHealthz

func (h *Handler) HandleHealthz(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleHomePage

func (h *Handler) HandleHomePage(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleIndex

func (h *Handler) HandleIndex(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleListMedia

func (h *Handler) HandleListMedia() http.Handler

func (*Handler) HandleLogin

func (h *Handler) HandleLogin() http.Handler

func (*Handler) HandleLoginPage

func (h *Handler) HandleLoginPage() http.Handler

func (*Handler) HandleLogout

func (h *Handler) HandleLogout() http.Handler

func (*Handler) HandleLogoutPage

func (h *Handler) HandleLogoutPage() http.Handler

func (*Handler) HandleMediaDialog

func (h *Handler) HandleMediaDialog() http.Handler

func (*Handler) HandleNewPostPage

func (h *Handler) HandleNewPostPage() http.Handler

func (*Handler) HandleProfilePage

func (h *Handler) HandleProfilePage() http.Handler

func (*Handler) HandleProfilePasswordUpdate

func (h *Handler) HandleProfilePasswordUpdate() http.Handler

func (*Handler) HandleProfileUpdate

func (h *Handler) HandleProfileUpdate() http.Handler

func (*Handler) HandleRegister

func (h *Handler) HandleRegister() http.Handler

func (*Handler) HandleRegisterPage

func (h *Handler) HandleRegisterPage() http.Handler

func (*Handler) HandleResetPassword

func (h *Handler) HandleResetPassword() http.Handler

func (*Handler) HandleResetPasswordPage

func (h *Handler) HandleResetPasswordPage() http.Handler

func (*Handler) HandleStatic

func (h *Handler) HandleStatic(w http.ResponseWriter, r *http.Request)

func (*Handler) HandleSubmitComment

func (h *Handler) HandleSubmitComment() http.Handler

func (*Handler) HandleUploadMedia

func (h *Handler) HandleUploadMedia() http.Handler

func (*Handler) HandleUploadMediaPage

func (h *Handler) HandleUploadMediaPage() http.Handler

func (*Handler) HandleViewMedia

func (h *Handler) HandleViewMedia() http.Handler

func (*Handler) HandleViewPostPage

func (h *Handler) HandleViewPostPage() http.Handler

func (*Handler) RecoverMiddleware

func (h *Handler) RecoverMiddleware(next http.Handler) http.Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Handler) Shutdown

func (h *Handler) Shutdown()

type Notification

type Notification struct {
	Type    NotificationType
	Message string
}

type NotificationType

type NotificationType string
const (
	NotificationTypeInfo    NotificationType = "info"
	NotificationTypeWarning NotificationType = "warning"
	NotificationTypeError   NotificationType = "error"
	NotificationTypeSuccess NotificationType = "success"
)

type SessionValueNotFoundError

type SessionValueNotFoundError struct {
	Key string
}

func (SessionValueNotFoundError) Error

func (err SessionValueNotFoundError) Error() string

Jump to

Keyboard shortcuts

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