Documentation ¶
Index ¶
- type AuthenticatedService
- type AuthenticatedSession
- type Authorization
- type PublicService
- type PublicSession
- type Session
- func NewSession() (Session[PublicService], error)
- func NewSessionWithEmail(email, password string) (Session[AuthenticatedService], error)
- func NewSessionWithFacebook(email, name, facebookId, accessToken string) (Session[AuthenticatedService], error)
- func NewSessionWithUser(user entity.AuthenResponseInfo) (Session[AuthenticatedService], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticatedService ¶
type AuthenticatedService struct { *PublicService *services.ElectionService *services.MeetingYouService *services.PdpaService *services.StreamingService *services.TheaterService *services.TicketService *services.TokenXService *services.UserBalanceService *services.UserService }
type AuthenticatedSession ¶
type AuthenticatedSession interface { public.PublicRepository election.ElectionRepository meetingyou.MeetingYouRepository pdpa.PdpaRepository streaming.StreamingRepository theater.TheaterRepository ticket.TicketRepository tokenx.TokenXRepository userbalance.UserBalanceRepository user.UserRepository }
type Authorization ¶
type Authorization interface { PublicService | AuthenticatedService // contains filtered or unexported methods }
type PublicService ¶
type PublicService struct {
*services.PublicService
}
type PublicSession ¶
type PublicSession interface { public.PublicRepository }
type Session ¶
type Session[T Authorization] struct { AuthEmail *entity.LoginInfo AuthFacebook *entity.LoginFacebookBody User *entity.AuthenResponseInfo Service T }
func NewSession ¶
func NewSession() (Session[PublicService], error)
func NewSessionWithEmail ¶
func NewSessionWithEmail(email, password string) (Session[AuthenticatedService], error)
func NewSessionWithFacebook ¶
func NewSessionWithFacebook(email, name, facebookId, accessToken string) (Session[AuthenticatedService], error)
func NewSessionWithUser ¶
func NewSessionWithUser(user entity.AuthenResponseInfo) (Session[AuthenticatedService], error)
func (*Session[T]) LoginWithEmail ¶
func (s *Session[T]) LoginWithEmail(email, password string) (Session[AuthenticatedService], error)
func (*Session[T]) LoginWithFacebook ¶
func (s *Session[T]) LoginWithFacebook(email, name, facebookId, accessToken string) (Session[AuthenticatedService], error)
Click to show internal directories.
Click to hide internal directories.