service

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 15 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 ConsumerService added in v0.1.21

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

func CreateConsumerService added in v0.1.21

func CreateConsumerService() *ConsumerService

func (*ConsumerService) CreatePostLikeNotification added in v0.1.22

func (c *ConsumerService) CreatePostLikeNotification(postLike *model.PostLike)

func (*ConsumerService) UpdateProfilePic added in v0.1.21

func (c *ConsumerService) UpdateProfilePic(userUuid uuid.UUID, s3Key string)

func (*ConsumerService) UpsertFollow added in v0.1.21

func (c *ConsumerService) UpsertFollow(followModel *model.Follow)

func (*ConsumerService) UpsertPost added in v0.1.21

func (c *ConsumerService) UpsertPost(postModel *model.Post)

func (*ConsumerService) UpsertUser added in v0.1.21

func (c *ConsumerService) UpsertUser(userModel *model.User)

type FollowService added in v0.1.21

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

func CreateFollowService added in v0.1.21

func CreateFollowService() *FollowService

func (*FollowService) UpsertFollow added in v0.1.21

func (f *FollowService) UpsertFollow(followModel *model.Follow) bool

type NotificationService

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

func CreateNotificationService

func CreateNotificationService() *NotificationService

func (*NotificationService) AcknowledgeNotifications added in v0.1.17

func (n *NotificationService) AcknowledgeNotifications(userUuid uuid.UUID, ack *model.NotificationAcknowledgement) error

func (*NotificationService) CreateFollowNotification added in v0.1.17

func (n *NotificationService) CreateFollowNotification(followModel *model.Follow)

func (*NotificationService) CreatePostLikeNotification added in v0.1.22

func (n *NotificationService) CreatePostLikeNotification(postLikeModel *model.PostLike)

func (*NotificationService) GetNotifications added in v0.1.17

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

type PostService added in v0.1.18

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

func CreatePostService added in v0.1.18

func CreatePostService() *PostService

func (*PostService) UpsertPost added in v0.1.18

func (p *PostService) UpsertPost(postModel *model.Post)

type UserService added in v0.1.17

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

func CreateUserService added in v0.1.17

func CreateUserService() *UserService

func (*UserService) UpdateProfilePic added in v0.1.17

func (u *UserService) UpdateProfilePic(userUuid uuid.UUID, s3Key string)

func (*UserService) UpsertUser added in v0.1.17

func (u *UserService) UpsertUser(userModel *model.User)

Jump to

Keyboard shortcuts

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