Documentation ¶
Index ¶
- Constants
- func AddRoleToUser(tenantId string, userID string, role string, ...) (userrolesmodels.AddRoleToUserResponse, error)
- func AfterEach()
- func BeforeEach()
- func CreateNewRoleOrAddPermissions(role string, permissions []string, userContext ...supertokens.UserContext) (userrolesmodels.CreateNewRoleOrAddPermissionsResponse, error)
- func DeleteRole(role string, userContext ...supertokens.UserContext) (userrolesmodels.DeleteRoleResponse, error)
- func GetAllRoles(userContext ...supertokens.UserContext) (userrolesmodels.GetAllRolesResponse, error)
- func GetPermissionsForRole(role string, userContext ...supertokens.UserContext) (userrolesmodels.GetPermissionsForRoleResponse, error)
- func GetRolesForUser(tenantId string, userID string, userContext ...supertokens.UserContext) (userrolesmodels.GetRolesForUserResponse, error)
- func GetRolesThatHavePermission(permission string, userContext ...supertokens.UserContext) (userrolesmodels.GetRolesThatHavePermissionResponse, error)
- func GetUsersThatHaveRole(tenantId string, role string, userContext ...supertokens.UserContext) (userrolesmodels.GetUsersThatHaveRoleResponse, error)
- func Init(config *userrolesmodels.TypeInput) supertokens.Recipe
- func NewPermissionClaim() (*claims.TypeSessionClaim, claims.PrimitiveArrayClaimValidators)
- func NewUserRoleClaim() (*claims.TypeSessionClaim, claims.PrimitiveArrayClaimValidators)
- func RemovePermissionsFromRole(role string, permissions []string, userContext ...supertokens.UserContext) (userrolesmodels.RemovePermissionsFromRoleResponse, error)
- func RemoveUserRole(tenantId string, userID string, role string, ...) (userrolesmodels.RemoveUserRoleResponse, error)
- type Recipe
Constants ¶
View Source
const RECIPE_ID = "userroles"
Variables ¶
This section is empty.
Functions ¶
func AddRoleToUser ¶
func AddRoleToUser(tenantId string, userID string, role string, userContext ...supertokens.UserContext) (userrolesmodels.AddRoleToUserResponse, error)
func BeforeEach ¶
func BeforeEach()
func CreateNewRoleOrAddPermissions ¶
func CreateNewRoleOrAddPermissions(role string, permissions []string, userContext ...supertokens.UserContext) (userrolesmodels.CreateNewRoleOrAddPermissionsResponse, error)
func DeleteRole ¶
func DeleteRole(role string, userContext ...supertokens.UserContext) (userrolesmodels.DeleteRoleResponse, error)
func GetAllRoles ¶
func GetAllRoles(userContext ...supertokens.UserContext) (userrolesmodels.GetAllRolesResponse, error)
func GetPermissionsForRole ¶
func GetPermissionsForRole(role string, userContext ...supertokens.UserContext) (userrolesmodels.GetPermissionsForRoleResponse, error)
func GetRolesForUser ¶
func GetRolesForUser(tenantId string, userID string, userContext ...supertokens.UserContext) (userrolesmodels.GetRolesForUserResponse, error)
func GetRolesThatHavePermission ¶
func GetRolesThatHavePermission(permission string, userContext ...supertokens.UserContext) (userrolesmodels.GetRolesThatHavePermissionResponse, error)
func GetUsersThatHaveRole ¶
func GetUsersThatHaveRole(tenantId string, role string, userContext ...supertokens.UserContext) (userrolesmodels.GetUsersThatHaveRoleResponse, error)
func Init ¶
func Init(config *userrolesmodels.TypeInput) supertokens.Recipe
func NewPermissionClaim ¶
func NewPermissionClaim() (*claims.TypeSessionClaim, claims.PrimitiveArrayClaimValidators)
func NewUserRoleClaim ¶
func NewUserRoleClaim() (*claims.TypeSessionClaim, claims.PrimitiveArrayClaimValidators)
func RemovePermissionsFromRole ¶
func RemovePermissionsFromRole(role string, permissions []string, userContext ...supertokens.UserContext) (userrolesmodels.RemovePermissionsFromRoleResponse, error)
func RemoveUserRole ¶
func RemoveUserRole(tenantId string, userID string, role string, userContext ...supertokens.UserContext) (userrolesmodels.RemoveUserRoleResponse, error)
Types ¶
type Recipe ¶
type Recipe struct { RecipeModule supertokens.RecipeModule Config userrolesmodels.TypeNormalisedInput RecipeImpl userrolesmodels.RecipeInterface }
func MakeRecipe ¶
func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config *userrolesmodels.TypeInput, onSuperTokensAPIError func(err error, req *http.Request, res http.ResponseWriter)) (Recipe, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.