package
3.0.1+incompatible
Repository: https://github.com/cyverse-de/permissions.git
Documentation: pkg.go.dev
# Functions
AbbreviatedPermissionsForSubjectAndResourceType lists permissions for a subject and resource type.
AddNewResourceType adds a new resource type to the database.
AddResource adds a resource to the database.
AddSubject adds a subject to the database.
CopyPermissions copies permissions from one subject to another.
CountResourcesOfType counts the number of resources of the given type.
DeletePermission removes a permission from the database.
DeleteResource removes a resource from the database.
DeleteResourceType removes a resource type from the database.
DeleteSubject removes a subject from the database.
DuplicateSubjectExists determines whether or not a subject with the same external subject ID and a different internal subject ID exists.
GetDuplicateResourceByName obtains information about duplicate resources in the database.
GetDuplicateResourceTypeByName returns information about the resource type with the given name, and checks for duplicates.
GetPermission gets a subject's permission to a specific resource if it exists.
GetPermissionByID obtains information about a specific permission.
GetPermissionLevelIDByName returns the identifier for the permission level with the given name.
GetResourceByName obtains information about all resources with the given name.
GetResourceByNameAndType obtains information about the resource with the given name and type.
GetResourceTypeByName gets information about the resource type with the given name.
GetSubject obtains information about the subject with the given external ID and subject type.
GetSubjectByExternalID returns information about the subjects with the given external ID.
ListPermissions lists all existing permissions.
ListResourcePermissions lists permissions associated with a specific resource.
ListResources lists resources in the database, optionally filtering by resource type and resource name.
ListResourceTypes lists all defined resource types.
ListSubjects lists subjects in the database, optionally filtering by subject type and external subject ID.
PermissionsForSubjects lists permissions granted to zero or more subjects.
PermissionsForSubjectsAndResource lists permissions granted to zero or more subjects for a specific resource.
PermissionsForSubjectsAndResourceMinLevel lists permissions of at least the minimum level that have been granted to zero or more subjects for a specific resource.
PermissionsForSubjectsAndResourceType lists permissions that have been granted to zero or more subjects for the specified type of resource.
PermissionsForSubjectsAndResourceTypeMinLevel lists permissions of at least the minimum level that have been granted to zero or more subjects for the specified type of resource.
PermissionsForSubjectsMinLevel lists permissions of at least the given level granted to zero or more subjects.
ResourceExists determines whether or not the resource with the given ID exists.
ResourceTypeExists determines whether or not the resource type with the given ID exists.
SubjectExists determines whether or not the subject with the given internal ID exists in the database.
SubjectIDExists determines whether or not the subject with the given external ID exists in the database.
UpdateResource updates a resource in the database.
UpdateResourceType updates a resource type in the database.
UpdateSubject updates a subject in the database.
UpsertPermission updates a permission or inserts it if it doesn't exist.
# Structs
PermissionDTO is a data transfer object for permissions.
SubjectDTO is a data transfer object used for information about a subject.
# Type aliases
StringArray represents an array of strings that can be used in a database query.