Documentation
¶
Index ¶
- func ActivateUser(id int) error
- func AddUser(stripeID, email, name, password string) (int64, error)
- func AddUserPermission(userID int, permission_id int) error
- func CheckIfCanUserBeAdded(email, name string) (bool, error)
- func CheckIfUserIDExists(id int) (bool, error)
- func CheckIfUserIsProhibited(id int) (bool, error)
- func CheckPermissionID(id int) bool
- func CheckUserPassword(id int, password string) bool
- func CheckUserPermission(userID int, permissionID int) bool
- func CreateNewPermission(name, permission string) error
- func CreatePermissionsTable() error
- func CreateTable()
- func DeactivateUser(id int) error
- func DeactivateUserByStripeID(stripeID string) error
- func DeletePermissionWithID(id int) error
- func Init() *sql.DB
- func ProhibitUser(id int) error
- func RemoveUserPermission(userID int, permission_id int) error
- func SetUserStripeID(id int, stripeID string) error
- func UnprohibitUser(id int) error
- func VerifyPassword(password, hash string) bool
- type Date
- type DateInterface
- type Permission
- func GetAllUsersPermissions() ([]Permission, error)
- func GetPermissionWithID(id int) (Permission, error)
- func GetPermissionWithName(name string) (Permission, error)
- func GetPermissionWithPermission(permission_type_string string) (Permission, error)
- func GetPermissions() ([]Permission, error)
- func GetUserPermissions(userID int) ([]Permission, error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateUser ¶
func AddUserPermission ¶
func CheckIfCanUserBeAdded ¶
func CheckIfUserIDExists ¶
func CheckIfUserIsProhibited ¶ added in v0.2.17
func CheckPermissionID ¶
func CheckUserPassword ¶
func CheckUserPermission ¶
func CreateNewPermission ¶
func CreatePermissionsTable ¶
func CreatePermissionsTable() error
func CreateTable ¶
func CreateTable()
func DeactivateUser ¶
func DeletePermissionWithID ¶
func ProhibitUser ¶ added in v0.2.17
func RemoveUserPermission ¶
func SetUserStripeID ¶
func UnprohibitUser ¶ added in v0.2.17
func VerifyPassword ¶
Types ¶
type DateInterface ¶ added in v0.2.19
type Permission ¶
func GetAllUsersPermissions ¶ added in v0.2.7
func GetAllUsersPermissions() ([]Permission, error)
func GetPermissionWithID ¶
func GetPermissionWithID(id int) (Permission, error)
func GetPermissionWithName ¶
func GetPermissionWithName(name string) (Permission, error)
func GetPermissionWithPermission ¶
func GetPermissionWithPermission(permission_type_string string) (Permission, error)
func GetPermissions ¶ added in v0.2.7
func GetPermissions() ([]Permission, error)
func GetUserPermissions ¶
func GetUserPermissions(userID int) ([]Permission, error)
type User ¶
type User struct { ID int StripeID string Email string Name string IsProhibited bool IsActive bool }
func GetAllUsers ¶
func GetUserByEmail ¶
func GetUserByStripeID ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.