service

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeRequestToNewSession

func DecodeRequestToNewSession(r *http.Response) (*model.Session, error)

func WriteResponse

func WriteResponse(w http.ResponseWriter, object interface{}, err error)

Types

type AuthService

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

func CreateDefaultAuthService

func CreateDefaultAuthService() *AuthService

func (*AuthService) CreateSession

func (a *AuthService) CreateSession(newSession model.NewSession) (*model.Session, error)

func (*AuthService) DoWithValidSession

func (a *AuthService) DoWithValidSession(w http.ResponseWriter, r *http.Request, doAction func(session *model.Session) (interface{}, error))

func (*AuthService) DoWithValidSessionAndUser

func (a *AuthService) DoWithValidSessionAndUser(w http.ResponseWriter, r *http.Request, userUuid uuid.UUID, doAction func() (interface{}, error))

func (*AuthService) GetSessionFromRequest

func (a *AuthService) GetSessionFromRequest(r *http.Request) *model.Session

type NotificationService

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

func CreateNotificationService

func CreateNotificationService() *NotificationService

func (*NotificationService) GetNotificationsForUser

func (n *NotificationService) GetNotificationsForUser(userUuid uuid.UUID, limit int) ([]*model.Notification, error)

Jump to

Keyboard shortcuts

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