Documentation ¶
Index ¶
Constants ¶
View Source
const ApiURL = "http://ip-api.com/json"
View Source
const ApiUrl = "" /* 131-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService interface { Attempt(dto dto.LoginDto) (*entity.User, error) AttemptSession(authSession *entity.AuthSession) (bool, error) CheckSession(context *gin.Context, user *entity.User) (bool, error) GetAuthSession(context *gin.Context, user *entity.User) (*entity.AuthSession, error) Auth(context *gin.Context, dto dto.LoginDto) (*dto.AuthTokenDto, error) }
func NewAuthService ¶
func NewAuthService(ctx context.Context) AuthService
type CommonCredentialsService ¶
type CommonCredentialsService interface {
ValidPasswordsCommonCredentials(pass string) (bool, error)
}
func NewCommonCredentialsService ¶
func NewCommonCredentialsService(ctx context.Context) CommonCredentialsService
type IPGeolocationDto ¶
type IPGeolocationDto struct { Status string `json:"status"` Country string `json:"country"` CountryCode string `json:"countryCode"` Region string `json:"region"` RegionName string `json:"regionName"` City string `json:"city"` Zip string `json:"zip"` Lat json.Number `json:"lat,omitempty"` Lon json.Number `json:"lon,omitempty"` Timezone string `json:"timezone"` Isp string `json:"isp"` Org string `json:"org"` As string `json:"as"` }
type IPGeolocationService ¶
type IPGeolocationService interface {
GetInfoByIP(ip string) (IPGeolocationDto, error)
}
func NewIPGeolocationService ¶
func NewIPGeolocationService(ctx context.Context) IPGeolocationService
NewIPGeolocationService is creates a new instance of IPGeolocationService
type JWTService ¶
type JWTService interface { GenerateToken(id uint) (string, error) ValidateToken(token string) bool GetIDFromToken(t string) (int64, error) }
func NewJWTService ¶
func NewJWTService(ctx context.Context) JWTService
NewJWTService is creates a new instance of JWTService
type UserService ¶
type UserService interface {
Store(dto dto.RegisterDto) (*entity.User, error)
}
func NewUserService ¶
func NewUserService(ctx context.Context) UserService
NewUserService is creates a new instance of JWTService
Click to show internal directories.
Click to hide internal directories.