Documentation
¶
Index ¶
- Variables
- type Service
- type User
- func (u User) FetchByEmail(c echo.Context, email string) (authapi.User, error)
- func (u User) FetchByExternalID(c echo.Context, externalID string) (authapi.User, error)
- func (u User) FetchProfile(c echo.Context, userID int, orgID int) (authapi.Profile, error)
- func (u User) FetchUserByID(c echo.Context, userID int) (authapi.User, error)
- func (u User) FetchUserByUUID(c echo.Context, userUUID uuid.UUID, orgID int) (*authapi.User, error)
- func (u User) List(c echo.Context, orgID int) ([]authapi.User, error)
- func (u User) ListRoles(c echo.Context) ([]authapi.Role, error)
- func (u User) Update(c echo.Context, userUUID uuid.UUID, orgID int, ...) error
- func (u User) UpdateRole(c echo.Context, level int, profileID int) error
- type UserDB
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIncorrectPassword = echo.NewHTTPError(http.StatusBadRequest, "incorrect old password") ErrInsecurePassword = echo.NewHTTPError(http.StatusBadRequest, "insecure password") )
Custom errors
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
FetchByEmail(echo.Context, string) (authapi.User, error)
FetchByExternalID(c echo.Context, externalID string) (authapi.User, error)
ListRoles(echo.Context) ([]authapi.Role, error)
List(c echo.Context, orgID int) ([]authapi.User, error)
UpdateRole(c echo.Context, level int, profileID int) error
FetchProfile(c echo.Context, userID int, orgID int) (authapi.Profile, error)
FetchUserByUUID(c echo.Context, userUUID uuid.UUID, orgID int) (*authapi.User, error)
FetchUserByID(c echo.Context, userID int) (authapi.User, error)
Update(c echo.Context, userUUID uuid.UUID, orgID int, fieldsToUpdate map[string]string) error
}
type User ¶
type User struct {
// contains filtered or unexported fields
}
func Initialize ¶
Initialize initalizes user service with defaults
func (User) FetchByEmail ¶
func (User) FetchByExternalID ¶
func (User) FetchProfile ¶
func (User) FetchUserByID ¶
func (User) FetchUserByUUID ¶
type UserDB ¶
type UserDB interface {
List(db sqlx.DB, orgID int) ([]authapi.User, error)
ListRoles(sqlx.DB) ([]authapi.Role, error)
UpdateRole(sqlx.DB, int, int) error
FetchByEmail(sqlx.DB, string) (authapi.User, error)
FetchByExternalID(db sqlx.DB, externalID string) (authapi.User, error)
//ListAuthorized(db orm.DB,u *authapi.User, includeInactive bool) ([]authapi.Profile, error)
FetchProfile(db sqlx.DB, userID int, orgID int) (authapi.Profile, error)
FetchUserByUUID(db sqlx.DB, userUUID uuid.UUID, orgID int) (*authapi.User, error)
FetchUserByID(db sqlx.DB, userID int) (authapi.User, error)
Update(db sqlx.DB, user authapi.User) error
}
Click to show internal directories.
Click to hide internal directories.