Documentation
¶
Index ¶
Constants ¶
View Source
const ( // AuthCodeSecretKey ... AuthCodeSecretKey = "AUTH_CODE_SECRET_KEY" // AccessTokenSecretKey ... AccessTokenSecretKey = "ACCESS_TOKEN_SECRET_KEY" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmService ¶
type AlarmService interface { Create(memberID, roomID uint, code vo.TaskCode, roomName, diaryTitle, authorNickname string) (*entity.Alarm, error) GetAll(memberID uint) (*entity.Alarms, error) PushByID(memberID uint, al *entity.Alarm) error PushByEmail(email string, al *entity.Alarm) error BroadCast(memberIDs []uint, al *entity.Alarm) error }
AlarmService ...
func NewAlarmService ¶
func NewAlarmService(ms MemberService, mdr repository.MemberDeviceRepository, ar repository.AlarmRepository) AlarmService
NewAlarmService ...
type FileService ¶
type FileService interface {
UploadFile(bkt *cloudstorage.VBucket, roomID uint, fileUUID string, file *multipart.FileHeader, ftype FileType) (vItem *cloudstorage.VItem, err error)
}
FileService ...
type MemberService ¶
type MemberService interface { Create(email string, name string, profileURL string, authType string) (*entity.Member, error) Get(ID uint) (*entity.Member, error) GetByEmail(email string) (*entity.Member, error) Update(member *entity.Member) (*entity.Member, error) Delete(email string) error VerifyNickName(name string) (bool, error) }
MemberService ...
func NewMemberService ¶
func NewMemberService(repository repository.MemberRepository) MemberService
NewMemberService ...
type RoomMemberService ¶
type RoomMemberService interface { Add(roomID, accountID uint) (*entity.RoomMember, error) Get(roomID, accountID uint) (*entity.RoomMember, error) GetAllRoomIDs(accountID uint) ([]uint, error) Delete(roomID, accountID uint) error PopulateRoomsMembers(rooms *entity.Rooms) (*entity.Rooms, error) PopulateRoomMembers(room *entity.Room) (*entity.Room, error) PopulateMembersByOrders(room *entity.Room) (*entity.Room, error) }
RoomMemberService ...
func NewRoomMemberService ¶
func NewRoomMemberService(r repository.RoomMemberRepository, mr repository.MemberRepository) RoomMemberService
NewRoomMemberService ...
type RoomService ¶
type RoomService interface { Create(masterID uint, name, code, hint, theme string, period uint8) (*entity.Room, error) Get(id uint, orderBy entity.RoomMemberOrderBy) (*entity.Room, error) GetAllJoinedRooms(accountID uint) (*entity.Rooms, error) Update(room *entity.Room) (*entity.Room, error) Delete(room *entity.Room) error JoinRoom(id, accountID uint, code string) (bool, error) LeaveRoom(id, accountID uint) error }
RoomService ...
func NewRoomService ¶
func NewRoomService(rr repository.RoomRepository, rms RoomMemberService) RoomService
NewRoomService ...
type TaskService ¶
type TaskService interface { DoRoomPeriodFINTask(roomID uint, baseURL string) error DoMemberOnDutyTask(roomID uint, email string) (err error) DoMemberBeforeTask(roomID uint, email string, code vo.TaskCode) (err error) DoMemberPostedDiaryTask(roomID uint, baseURL string) error RegisterRoomPeriodFINTask(c *tasks.Client, baseURL string, roomID, accountID uint, dueAt *time.Time) (taskID string, err error) RegisterMemberPostedDiaryTask(roomID uint, baseURL string) (taskID string, err error) GetTask(c *tasks.Client, code vo.TaskCode, roomID, turnAccountID uint) (*taskspb.Task, error) DeleteTask(c *tasks.Client, code vo.TaskCode, roomID, turnAccountID uint) error }
TaskService ...
func NewTaskService ¶
func NewTaskService(as AlarmService, rs RoomService, ms MemberService) TaskService
NewTaskService ...
type TokenService ¶
type TokenService interface { IssueAuthCode(email string, authType string) (string, error) IssueAccessToken(authCode, deviceToken string) (string, error) IssueRefreshToken(authCode string) (string, error) RefreshAccessToken(refreshToken string) (string, error) }
TokenService ...
func NewTokenService ¶
func NewTokenService(service MemberService, authCodeVerifier TokenVerifier, refreshTokenVerifier TokenVerifier, mdr repository.MemberDeviceRepository) TokenService
NewTokenService ...
type TokenVerifier ¶
type TokenVerifier struct {
SecretKey string
}
TokenVerifier ...
func (*TokenVerifier) Verify ¶
func (t *TokenVerifier) Verify(authCode string) (claims *entity.AuthCodeClaims, err error)
Verify ...
Click to show internal directories.
Click to hide internal directories.