session

package
v0.0.0-...-931f746 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 (*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)

func (*Session[T]) Logout

func (s *Session[T]) Logout() (resty.Response, error)

Jump to

Keyboard shortcuts

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