Documentation
¶
Index ¶
- type FileUploadService
- func (s *FileUploadService) DeleteFile(id string) (*model.FileUpload, error)
- func (s *FileUploadService) GetFileById(id string) (*model.FileUpload, error)
- func (s *FileUploadService) SaveFile(file *graphql.Upload, user *model.User) (*model.FileUpload, error)
- func (s *FileUploadService) UpdateFile(input *model.UpdateFile) (*model.FileUpload, error)
- type FriendService
- type JwtService
- func (s *JwtService) ClearJwtCookie(w *http.ResponseWriter)
- func (s *JwtService) CreateAuthPayload(user *model.User) jwt.Claims
- func (s *JwtService) CreateJwtCookie(token string) *http.Cookie
- func (s *JwtService) Decode(jwtToken string) (jwt.MapClaims, error)
- func (s *JwtService) Encode(payload jwt.Claims) (string, error)
- func (s *JwtService) PutJwtCookie(w *http.ResponseWriter, cookie *http.Cookie)
- func (s *JwtService) Regenerate(oldToken string) (string, error)
- type PublicChatService
- type UserService
- func (s *UserService) AlreadyRegistered(email string) bool
- func (s *UserService) DeleteAccount(id string) (*model.User, error)
- func (s *UserService) GetAllExcept(user *model.User) ([]*model.User, error)
- func (s *UserService) GetById(id string) (*model.User, error)
- func (s *UserService) Login(email string, password string) (*model.User, error)
- func (s *UserService) Register(input *model.Register) (*model.User, error)
- func (s *UserService) UpdateAccount(id string, input *model.UpdateUser) (*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileUploadService ¶
type FileUploadService struct { Factory *file_upload.Factory Repository *repository.FileUploadRepository }
func NewFileUploadService ¶
func NewFileUploadService(db *gorm.DB) *FileUploadService
func (*FileUploadService) DeleteFile ¶
func (s *FileUploadService) DeleteFile(id string) (*model.FileUpload, error)
func (*FileUploadService) GetFileById ¶
func (s *FileUploadService) GetFileById(id string) (*model.FileUpload, error)
func (*FileUploadService) SaveFile ¶
func (s *FileUploadService) SaveFile(file *graphql.Upload, user *model.User) (*model.FileUpload, error)
func (*FileUploadService) UpdateFile ¶
func (s *FileUploadService) UpdateFile(input *model.UpdateFile) (*model.FileUpload, error)
type FriendService ¶
type FriendService struct {
// contains filtered or unexported fields
}
func NewFriendService ¶
func NewFriendService(db *gorm.DB) *FriendService
type JwtService ¶
type JwtService struct {
// contains filtered or unexported fields
}
func NewJwtService ¶
func NewJwtService(secret []byte) *JwtService
func (*JwtService) ClearJwtCookie ¶
func (s *JwtService) ClearJwtCookie(w *http.ResponseWriter)
func (*JwtService) CreateAuthPayload ¶
func (s *JwtService) CreateAuthPayload(user *model.User) jwt.Claims
func (*JwtService) CreateJwtCookie ¶
func (s *JwtService) CreateJwtCookie(token string) *http.Cookie
func (*JwtService) Decode ¶
func (s *JwtService) Decode(jwtToken string) (jwt.MapClaims, error)
func (*JwtService) Encode ¶
func (s *JwtService) Encode(payload jwt.Claims) (string, error)
func (*JwtService) PutJwtCookie ¶
func (s *JwtService) PutJwtCookie(w *http.ResponseWriter, cookie *http.Cookie)
func (*JwtService) Regenerate ¶
func (s *JwtService) Regenerate(oldToken string) (string, error)
type PublicChatService ¶
type PublicChatService struct {
Repository *repository.PublicChatRepository
}
func NewPublicChatService ¶
func NewPublicChatService(db *gorm.DB) *PublicChatService
func (*PublicChatService) All ¶
func (s *PublicChatService) All() ([]*model.PublicMessage, error)
func (*PublicChatService) Save ¶
func (s *PublicChatService) Save(message *model.PublicMessage) (*model.PublicMessage, error)
type UserService ¶
type UserService struct { UserRepository *repository.UserRepository UserRoleRepository *repository.UserRoleRepository }
func NewUserService ¶
func NewUserService(db *gorm.DB) *UserService
func (*UserService) AlreadyRegistered ¶
func (s *UserService) AlreadyRegistered(email string) bool
func (*UserService) DeleteAccount ¶
func (s *UserService) DeleteAccount(id string) (*model.User, error)
func (*UserService) GetAllExcept ¶
func (*UserService) UpdateAccount ¶
func (s *UserService) UpdateAccount(id string, input *model.UpdateUser) (*model.User, error)
Click to show internal directories.
Click to hide internal directories.