service

package
v0.0.0-...-03efb0c Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeartbeatService

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

func NewHeartbeatService

func NewHeartbeatService(
	repo repo.HeartbeatRepo,
) *HeartbeatService

func (*HeartbeatService) CheckUserStatus

func (s *HeartbeatService) CheckUserStatus(ctx context.Context, userId string) (string, error)

func (*HeartbeatService) Pulse

func (s *HeartbeatService) Pulse(ctx context.Context, userId string) error

type LocationService

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

func NewLocationService

func NewLocationService(
	hrs *HeartbeatService,
	us *UserService,
	repo repo.LocationRepo,
) *LocationService

func (*LocationService) CheckMemberBuildingExist

func (svc *LocationService) CheckMemberBuildingExist(
	ctx context.Context,
	userID,
	buildingID string,
) (bool, error)

func (*LocationService) CreateBuilding

func (svc *LocationService) CreateBuilding(
	ctx context.Context,
	name,
	userID string,
) error

func (*LocationService) DeleteBuilding

func (svc *LocationService) DeleteBuilding(
	ctx context.Context,
	buildingId,
	memberId string,
) error

func (*LocationService) EditMemberName

func (svc *LocationService) EditMemberName(
	ctx context.Context,
	memberID,
	name string,
) error

func (*LocationService) GetBuildingByID

func (svc *LocationService) GetBuildingByID(
	ctx context.Context,
	buildingID string,
) (ent.BuildingQuery, error)

func (*LocationService) GetBuildings

func (svc *LocationService) GetBuildings(
	ctx context.Context,
) ([]ent.BuildingQuery, error)

func (*LocationService) GetBuildingsByUserID

func (svc *LocationService) GetBuildingsByUserID(
	ctx context.Context,
	userID string,
) ([]ent.BuildingMemberQuery, error)

func (*LocationService) GetFriendsByMemberId

func (svc *LocationService) GetFriendsByMemberId(ctx context.Context, userId string) ([]ent.MemberQuery, error)

func (*LocationService) GetListMemberByBuildingID

func (svc *LocationService) GetListMemberByBuildingID(
	ctx context.Context,
	buildingID string,
) ([]ent.MemberQuery, error)

func (*LocationService) GetListMyOwnedBuilding

func (svc *LocationService) GetListMyOwnedBuilding(
	ctx context.Context,
	userID string,
) ([]ent.BuildingQuery, error)

func (*LocationService) GetListOnlineMembers

func (svc *LocationService) GetListOnlineMembers(
	ctx context.Context,
	roomId string,
) ([]ent.Member, error)

func (*LocationService) GetMemberByID

func (svc *LocationService) GetMemberByID(
	ctx context.Context,
	memberID string,
) (ent.MemberQuery, error)

func (*LocationService) GetMemberByName

func (svc *LocationService) GetMemberByName(ctx context.Context, name string) (ent.MemberQuery, error)

func (*LocationService) GetMyInvitation

func (svc *LocationService) GetMyInvitation(
	ctx context.Context,
	userID string,
) ([]ent.BuildingMemberQuery, error)

func (*LocationService) GetNumberOfBuildingOwned

func (svc *LocationService) GetNumberOfBuildingOwned(
	ctx context.Context,
	ownerID string,
) (int64, error)

func (*LocationService) GetRoomsByBuildingId

func (svc *LocationService) GetRoomsByBuildingId(
	ctx context.Context,
	buildingId string,
) ([]ent.RoomQuery, error)

func (*LocationService) InviteMemberToBuilding

func (svc *LocationService) InviteMemberToBuilding(
	ctx context.Context,
	memberName,
	userID,
	buildingId string,
) error

func (*LocationService) JoinBuilding

func (svc *LocationService) JoinBuilding(
	ctx context.Context,
	memberID,
	buildingID string,
) error

type NotificationService

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

func NewNotificationService

func NewNotificationService(
	repo repo.NotificationRepo,
) *NotificationService

type RemoteConfigService

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

func NewRemoteConfigService

func NewRemoteConfigService(repo repo.RemoteConfigRepo) *RemoteConfigService

func (*RemoteConfigService) CreateRemoteConfig

func (svc *RemoteConfigService) CreateRemoteConfig(
	ctx context.Context,
	key,
	value string,
) error

func (*RemoteConfigService) GetAPKVersion

func (svc *RemoteConfigService) GetAPKVersion(
	ctx context.Context,
) (ent.APKVersionQuery, error)

func (*RemoteConfigService) UpdateRemoteConfig

func (svc *RemoteConfigService) UpdateRemoteConfig(
	ctx context.Context,
	key,
	value string,
) error

type ScheduleService

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

func NewScheduleService

func NewScheduleService(
	repo repo.ScheduleRepo,
	cache repo.ScheduleCacheRepo,
) *ScheduleService

func (*ScheduleService) AddTask

func (svc *ScheduleService) AddTask(
	ctx context.Context,
	task domain.TaskWithDetailCommand,
) error

func (*ScheduleService) AutoSchedulePreview

func (svc *ScheduleService) AutoSchedulePreview(
	ctx context.Context,
	scheduleID string,
) ([]domain.TaskWithDetailQuery, error)

func (*ScheduleService) AutoScheduleSave

func (svc *ScheduleService) AutoScheduleSave(
	ctx context.Context,
	scheduleID string,
) error

func (*ScheduleService) CreateSchedule

func (svc *ScheduleService) CreateSchedule(
	ctx context.Context,
	sch domain.ScheduleCommand,
) (string, error)

func (*ScheduleService) CreateTaskDependency

func (svc *ScheduleService) CreateTaskDependency(
	ctx context.Context,
	taskDep ent.TaskDependencyCommand,
) error

func (*ScheduleService) DeleteTaskDependency

func (svc *ScheduleService) DeleteTaskDependency(
	ctx context.Context,
	taskDep ent.TaskDependencyCommand,
) error

func (*ScheduleService) EditTask

func (svc *ScheduleService) EditTask(
	ctx context.Context,
	taskID string,
	task domain.TaskWithDetailCommand,
) error

func (*ScheduleService) EditTaskDependency

func (svc *ScheduleService) EditTaskDependency(
	ctx context.Context,
	taskDep ent.TaskDependencyCommand,
) error

func (*ScheduleService) GetListScheduleByRoomID

func (svc *ScheduleService) GetListScheduleByRoomID(
	ctx context.Context,
	roomID string,
) ([]domain.ScheduleQuery, error)

func (*ScheduleService) GetListTaskByScheduleID

func (svc *ScheduleService) GetListTaskByScheduleID(
	ctx context.Context,
	scheduleID string,
	queryFilter domain.TaskQueryFilter,
) ([]domain.TaskQuery, error)

func (*ScheduleService) GetTaskDetail

func (svc *ScheduleService) GetTaskDetail(
	ctx context.Context,
	taskID string,
) (domain.TaskDetailQuery, error)

type Token

type Token string

type UserClaims

type UserClaims struct {
	jwt.RegisteredClaims
	Username string
	UserID   string
	RoleID   int32
}

type UserService

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

func NewUserService

func NewUserService(
	repo repo.UserRepo,
) *UserService

func (*UserService) CheckUserExistance

func (svc *UserService) CheckUserExistance(ctx context.Context, username string) (bool, error)

func (*UserService) GetListFeatureByProductID

func (svc *UserService) GetListFeatureByProductID(
	ctx context.Context,
	productID int32,
) ([]user.FeatureQuery, error)

func (*UserService) GetListProduct

func (svc *UserService) GetListProduct(
	ctx context.Context,
) ([]user.ProductQuery, error)

func (*UserService) GetListUserByUsername

func (svc *UserService) GetListUserByUsername(
	ctx context.Context,
	username string,
) ([]user.UserQuery, error)

func (*UserService) GetProductByUserID

func (svc *UserService) GetProductByUserID(
	ctx context.Context,
	userID string,
) (user.ProductQuery, error)

func (*UserService) Login

func (svc *UserService) Login(ctx context.Context, username, password string, roleID int32) (Token, error)

func (*UserService) RegisterUser

func (svc *UserService) RegisterUser(
	ctx context.Context, username, password string,
	roleID int32,
) (string, error)

Jump to

Keyboard shortcuts

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