Documentation ¶
Index ¶
Constants ¶
View Source
const ( SelectFailedInNWithErrorE = "pgxscan.Select unexpectedly failed in %s, error : %v" FunctionNReturnedNoResults = "%s returned no results " UserDoesNotExist = "User %s does not exist" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type F5Authenticator ¶
type F5Authenticator interface { gohttp.Authentication GetJwtInfoHandler() http.HandlerFunc }
func NewLoginService ¶
func NewLoginService(db database.DB, store Storage, jwtCheck gohttp.JwtChecker) F5Authenticator
NewLoginService Function to create an instance of Login Service Authenticator
type PGX ¶
func (*PGX) CreateOrUpdateAdminUserOrPanic ¶ added in v0.1.5
func (db *PGX) CreateOrUpdateAdminUserOrPanic()
CreateOrUpdateAdminUserOrPanic is a function to create or update the admin user in the database
func (*PGX) IsUserActive ¶
type Service ¶
type Service struct { Log golog.MyLogger DbConn database.DB Store Storage JwtChecker gohttp.JwtChecker }
func (*Service) AuthenticateUser ¶
func (*Service) GetJwtInfoHandler ¶
func (s *Service) GetJwtInfoHandler() http.HandlerFunc
type Storage ¶
type Storage interface { //CreateOrUpdateAdminUserOrPanic creates or updates the admin user in the store CreateOrUpdateAdminUserOrPanic() // Get returns the user with the specified user login. Get(login string) (*User, error) // Exist returns true only if a user with the specified login exists in store. Exist(login string) bool // IsUserActive returns true if the user with the specified login has the is_active attribute set to true IsUserActive(login string) bool // IsAdmin returns true if the user with the specified login has the is_admin attribute set to true IsAdmin(login string) bool // IsLocked returns true if the user with the specified login has the is_locked attribute set to true IsLocked(login string) bool }
type User ¶
type User struct { Id int32 `json:"id"` Name string `json:"name"` Email string `json:"email"` Username string `json:"username"` PasswordHash string `json:"password_hash"` ExternalId *int32 `json:"external_id,omitempty"` IsLocked bool `json:"is_locked"` IsAdmin bool `json:"is_admin"` CreateTime time.Time `json:"create_time"` Creator int32 `json:"creator"` LastModificationTime *time.Time `json:"last_modification_time,omitempty"` LastModificationUser *int32 `json:"last_modification_user,omitempty"` IsActive bool `json:"is_active"` InactivationTime *time.Time `json:"inactivation_time,omitempty"` InactivationReason *string `json:"inactivation_reason,omitempty"` Comment *string `json:"comment,omitempty"` BadPasswordCount int32 `json:"bad_password_count"` }
Click to show internal directories.
Click to hide internal directories.