Documentation ¶
Index ¶
- func DecodeRequestToNewSession(r *http.Response) (*model.Session, error)
- func WriteResponse(w http.ResponseWriter, object interface{}, err error)
- type AuthService
- func (a *AuthService) CreateSession(newSession model.NewSession) (*model.Session, error)
- func (a *AuthService) DoWithValidSession(w http.ResponseWriter, r *http.Request, ...)
- func (a *AuthService) DoWithValidSessionAndUser(w http.ResponseWriter, r *http.Request, userUuid uuid.UUID, ...)
- func (a *AuthService) GetSessionFromRequest(r *http.Request) *model.Session
- type NotificationService
- func (n *NotificationService) AcknowledgeNotifications(userUuid uuid.UUID, ack *model.NotificationAcknowledgement) error
- func (n *NotificationService) CreateFollowNotification(userUuid uuid.UUID, followingUuid uuid.UUID)
- func (n *NotificationService) GetNotifications(userUuid uuid.UUID, limit int) ([]*model.Notification, error)
- type PostService
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) 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(userUuid uuid.UUID, followingUuid uuid.UUID)
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)
Click to show internal directories.
Click to hide internal directories.