Documentation ¶
Index ¶
- type Auth
- func (s *Auth) GenerateCookie(ctx context.Context, userID int32) (*entity.Session, error)
- func (s *Auth) GetUserInfo(ctx context.Context, userID int32) (*entity.User, error)
- func (s *Auth) Login(ctx context.Context, req *dto.LoginDTO) (*entity.User, error)
- func (s *Auth) Logout(ctx context.Context, sessionID int32) error
- func (s *Auth) Register(ctx context.Context, req *dto.RegisterDTO) (*entity.User, error)
- func (s *Auth) ValidateCookie(ctx context.Context, sessionToken string) (*entity.Session, error)
- type Event
- func (s *Event) CreateEvent(ctx context.Context, userID int32, req *dto.CreateEventDTO) (*entity.Event, error)
- func (s *Event) CreateType(ctx context.Context, userID int32, req *dto.CreateEventTypeDTO) (*entity.EventType, error)
- func (s *Event) DeleteEvent(ctx context.Context, userID int32, id int32) error
- func (s *Event) DeleteType(ctx context.Context, userID int32, id int32) error
- func (s *Event) EditType(ctx context.Context, userID int32, req *dto.EditEventTypeDTO) (*entity.EventType, error)
- func (s *Event) FriendsFeed(ctx context.Context, userID int32) ([]*dto.FeedResponseDTO, int32, error)
- func (s *Event) ListEvent(ctx context.Context, userID int32, req *dto.ListEventDTO) ([]*entity.Event, int32, error)
- func (s *Event) ListType(ctx context.Context, userID int32) ([]*entity.EventType, int32, error)
- type Friend
- func (s *Friend) AcceptFriendship(ctx context.Context, userID, inviteID int32) error
- func (s *Friend) InviteFriend(ctx context.Context, req *dto.InviteFriendDTO) error
- func (s *Friend) InviteListPending(ctx context.Context, userID int32) ([]*dto.InviteListResponseDTO, int32, error)
- func (s *Friend) ListOfFriends(ctx context.Context, userID int32) ([]*entity.User, int32, error)
- func (s *Friend) RejectFriendship(ctx context.Context, userID, inviteID int32) error
- type IAuth
- type IEvent
- type IFriend
- type ISystem
- type IUser
- type System
- type User
- func (s *User) Get(ctx context.Context, id, userID int32) (*entity.User, error)
- func (s *User) Password(ctx context.Context, req *dto.UpdatePasswordDTO, userID int32) error
- func (s *User) UpdateImage(ctx context.Context, req *dto.UpdateProfileImageDTO) (*entity.User, error)
- func (s *User) UpdateProfile(ctx context.Context, req *dto.UpdateProfileDTO) (*entity.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func NewAuth ¶
func NewAuth(db *db.DB, cfg *config.Config, user repository.IUser, password repository.IPassword, session repository.ISession) *Auth
func (*Auth) GenerateCookie ¶
func (*Auth) GetUserInfo ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) CreateEvent ¶
func (*Event) CreateType ¶
func (*Event) DeleteEvent ¶
func (*Event) DeleteType ¶
func (*Event) FriendsFeed ¶
type Friend ¶
type Friend struct {
// contains filtered or unexported fields
}
func NewFriend ¶
func NewFriend(db *db.DB, repository repository.IFriend, user repository.IUser) *Friend
func (*Friend) AcceptFriendship ¶
func (*Friend) InviteFriend ¶
func (*Friend) InviteListPending ¶
func (*Friend) ListOfFriends ¶
type IAuth ¶
type IAuth interface { Register(ctx context.Context, req *dto.RegisterDTO) (*entity.User, error) Login(ctx context.Context, req *dto.LoginDTO) (*entity.User, error) Logout(ctx context.Context, sessionID int32) error GenerateCookie(ctx context.Context, userID int32) (*entity.Session, error) ValidateCookie(ctx context.Context, session string) (*entity.Session, error) GetUserInfo(ctx context.Context, userID int32) (*entity.User, error) }
type IEvent ¶
type IEvent interface { CreateType(ctx context.Context, userID int32, req *dto.CreateEventTypeDTO) (*entity.EventType, error) DeleteType(ctx context.Context, userID int32, id int32) error ListType(ctx context.Context, userID int32) ([]*entity.EventType, int32, error) EditType(ctx context.Context, userID int32, req *dto.EditEventTypeDTO) (*entity.EventType, error) CreateEvent(ctx context.Context, userID int32, req *dto.CreateEventDTO) (*entity.Event, error) DeleteEvent(ctx context.Context, userID int32, id int32) error ListEvent(ctx context.Context, userId int32, req *dto.ListEventDTO) ([]*entity.Event, int32, error) FriendsFeed(ctx context.Context, userID int32) ([]*dto.FeedResponseDTO, int32, error) }
type IFriend ¶
type IFriend interface { InviteFriend(ctx context.Context, req *dto.InviteFriendDTO) error InviteListPending(ctx context.Context, userID int32) ([]*dto.InviteListResponseDTO, int32, error) AcceptFriendship(ctx context.Context, userID, inviteID int32) error RejectFriendship(ctx context.Context, userID, inviteID int32) error ListOfFriends(ctx context.Context, userID int32) ([]*entity.User, int32, error) }
type IUser ¶
type IUser interface { Get(ctx context.Context, id, userID int32) (*entity.User, error) Password(ctx context.Context, req *dto.UpdatePasswordDTO, userID int32) error UpdateProfile(ctx context.Context, req *dto.UpdateProfileDTO) (*entity.User, error) UpdateImage(ctx context.Context, req *dto.UpdateProfileImageDTO) (*entity.User, error) }
type User ¶
type User struct {
// contains filtered or unexported fields
}
func NewUser ¶
func NewUser(db *db.DB, repository repository.IUser, password repository.IPassword) *User
func (*User) UpdateImage ¶
func (*User) UpdateProfile ¶
Click to show internal directories.
Click to hide internal directories.