services

package
v0.0.0-...-3c27b1e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMiddlewareConfig

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

func InitAuthMiddleware

func InitAuthMiddleware(svc *AuthService) AuthMiddlewareConfig

func (*AuthMiddlewareConfig) AuthRequired

func (c *AuthMiddlewareConfig) AuthRequired(ctx *gin.Context)

func (*AuthMiddlewareConfig) CORSMiddleware

func (c *AuthMiddlewareConfig) CORSMiddleware(ctx *gin.Context)

type AuthService

type AuthService struct {
	DB           repositories.Store
	EmailService *gmail.SendgridService
	JWT          *utils.JwtWrapper
	Config       *utils.Config
}

func NewAuthService

func NewAuthService(db repositories.Store, sendgrid *gmail.SendgridService, jwt *utils.JwtWrapper, c *utils.Config) *AuthService

func (*AuthService) ChangePassword

func (s *AuthService) ChangePassword(ctx *gin.Context)

func (*AuthService) Login

func (s *AuthService) Login(ctx *gin.Context)

func (*AuthService) LoginCallback

func (s *AuthService) LoginCallback(ctx *gin.Context)

func (*AuthService) LoginProvider

func (s *AuthService) LoginProvider(ctx *gin.Context)

func (*AuthService) ProviderCallback

func (s *AuthService) ProviderCallback(ctx *gin.Context)

func (*AuthService) Refresh

func (s *AuthService) Refresh(ctx *gin.Context)

func (*AuthService) Register

func (s *AuthService) Register(ctx *gin.Context)

func (*AuthService) ResendEmail

func (s *AuthService) ResendEmail(ctx *gin.Context)

func (*AuthService) Verify

func (s *AuthService) Verify(ctx *gin.Context)

type GroupService

type GroupService struct {
	DB           repositories.Store
	EmailService *gmail.SendgridService
	Config       *utils.Config
}

func NewGroupService

func NewGroupService(db repositories.Store, sendgrid *gmail.SendgridService, c *utils.Config) *GroupService

func (*GroupService) AssignRole

func (s *GroupService) AssignRole(ctx *gin.Context)

func (*GroupService) CreateGroup

func (s *GroupService) CreateGroup(ctx *gin.Context)

func (*GroupService) GetGroupByID

func (s *GroupService) GetGroupByID(ctx *gin.Context)
func (s *GroupService) GetGroupLink(ctx *gin.Context)

func (*GroupService) InviteMember

func (s *GroupService) InviteMember(ctx *gin.Context)

func (*GroupService) JoinGroup

func (s *GroupService) JoinGroup(ctx *gin.Context)

func (*GroupService) KickMember

func (s *GroupService) KickMember(ctx *gin.Context)

func (*GroupService) LeaveGroup

func (s *GroupService) LeaveGroup(ctx *gin.Context)

func (*GroupService) ListGroupCreatedByUser

func (s *GroupService) ListGroupCreatedByUser(ctx *gin.Context)

func (*GroupService) ListGroupJoinedByUser

func (s *GroupService) ListGroupJoinedByUser(ctx *gin.Context)

func (*GroupService) ShowGroupMember

func (s *GroupService) ShowGroupMember(ctx *gin.Context)

type Server

type Server struct {
	AuthService  *AuthService
	GroupService *GroupService
	UserService  *UserService
}

func NewServer

func NewServer(store repositories.Store, c *utils.Config) *Server

type UserService

type UserService struct {
	DB                repositories.Store
	CloudinaryService *cloudinary.CloudinaryService
	Config            *utils.Config
}

func NewUserService

func NewUserService(db repositories.Store, cloudinary *cloudinary.CloudinaryService, c *utils.Config) *UserService

func (*UserService) GetProfile

func (s *UserService) GetProfile(ctx *gin.Context)

func (*UserService) GetProfileByUserID

func (s *UserService) GetProfileByUserID(ctx *gin.Context)

func (*UserService) UpdateProfile

func (s *UserService) UpdateProfile(ctx *gin.Context)

func (*UserService) UploadAvatar

func (s *UserService) UploadAvatar(ctx *gin.Context)

Jump to

Keyboard shortcuts

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