Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractShareIdFromResourceId(rid *storageprovider.ResourceId) *collaboration.ShareId
- func GetDriveAndItemIDParam(r *http.Request, logger *log.Logger) (*storageprovider.ResourceId, *storageprovider.ResourceId, error)
- func GetFilterParam(r *http.Request) string
- func GetSelectParam(r *http.Request) string
- func IsShareJail(id *storageprovider.ResourceId) bool
- func IsSpaceRoot(rid *storageprovider.ResourceId) bool
- func StrictJSONUnmarshal(r io.Reader, v interface{}) error
- type APIVersion
- type BaseGraphProvider
- type BaseGraphService
- func (g BaseGraphService) CS3ReceivedOCMSharesToDriveItems(ctx context.Context, receivedShares []*ocm.ReceivedShare) ([]libregraph.DriveItem, error)
- func (g BaseGraphService) CS3ReceivedSharesToDriveItems(ctx context.Context, receivedShares []*collaboration.ReceivedShare) ([]libregraph.DriveItem, error)
- type DriveItemPermissionsApi
- func (api DriveItemPermissionsApi) CreateLink(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) CreateSpaceRootLink(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) DeletePermission(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) DeleteSpaceRootPermission(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) Invite(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) ListPermissions(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) ListSpaceRootPermissions(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) SetLinkPassword(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) SetSpaceRootLinkPassword(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) SpaceRootInvite(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) UpdatePermission(w http.ResponseWriter, r *http.Request)
- func (api DriveItemPermissionsApi) UpdateSpaceRootPermission(w http.ResponseWriter, r *http.Request)
- type DriveItemPermissionsProvider
- type DriveItemPermissionsService
- func (s DriveItemPermissionsService) CreateLink(ctx context.Context, driveItemID *storageprovider.ResourceId, ...) (libregraph.Permission, error)
- func (s DriveItemPermissionsService) CreateSpaceRootLink(ctx context.Context, driveID *storageprovider.ResourceId, ...) (libregraph.Permission, error)
- func (s DriveItemPermissionsService) DeletePermission(ctx context.Context, itemID *storageprovider.ResourceId, permissionID string) error
- func (s DriveItemPermissionsService) DeleteSpaceRootPermission(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string) error
- func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *storageprovider.ResourceId, ...) (libregraph.Permission, error)
- func (s DriveItemPermissionsService) ListPermissions(ctx context.Context, itemID *storageprovider.ResourceId, ...) (libregraph.CollectionOfPermissionsWithAllowedValues, error)
- func (s DriveItemPermissionsService) ListSpaceRootPermissions(ctx context.Context, driveID *storageprovider.ResourceId) (libregraph.CollectionOfPermissionsWithAllowedValues, error)
- func (s DriveItemPermissionsService) SetPublicLinkPassword(ctx context.Context, driveItemId *storageprovider.ResourceId, ...) (libregraph.Permission, error)
- func (s DriveItemPermissionsService) SetPublicLinkPasswordOnSpaceRoot(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string, ...) (libregraph.Permission, error)
- func (s DriveItemPermissionsService) SpaceRootInvite(ctx context.Context, driveID *storageprovider.ResourceId, ...) (libregraph.Permission, error)
- func (s DriveItemPermissionsService) UpdatePermission(ctx context.Context, itemID *storageprovider.ResourceId, permissionID string, ...) (libregraph.Permission, error)
- func (s DriveItemPermissionsService) UpdateSpaceRootPermission(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string, ...) (libregraph.Permission, error)
- type DrivesDriveItemApi
- func (api DrivesDriveItemApi) CreateDriveItem(w http.ResponseWriter, r *http.Request)
- func (api DrivesDriveItemApi) DeleteDriveItem(w http.ResponseWriter, r *http.Request)
- func (api DrivesDriveItemApi) GetDriveItem(w http.ResponseWriter, r *http.Request)
- func (api DrivesDriveItemApi) UpdateDriveItem(w http.ResponseWriter, r *http.Request)
- type DrivesDriveItemProvider
- type DrivesDriveItemService
- func (s DrivesDriveItemService) GetOCMSharesForResource(ctx context.Context, resourceID *storageprovider.ResourceId) ([]*ocm.ReceivedShare, error)
- func (s DrivesDriveItemService) GetShare(ctx context.Context, shareID *collaboration.ShareId) (*collaboration.ReceivedShare, error)
- func (s DrivesDriveItemService) GetSharesForResource(ctx context.Context, resourceID *storageprovider.ResourceId, ...) ([]*collaboration.ReceivedShare, error)
- func (s DrivesDriveItemService) MountOCMShare(ctx context.Context, resourceID *storageprovider.ResourceId) ([]*ocm.ReceivedShare, error)
- func (s DrivesDriveItemService) MountShare(ctx context.Context, resourceID *storageprovider.ResourceId, name string) ([]*collaboration.ReceivedShare, error)
- func (s DrivesDriveItemService) UnmountShare(ctx context.Context, shareID *collaboration.ShareId) error
- func (s DrivesDriveItemService) UpdateOCMShare(ctx context.Context, share *ocm.ReceivedShare, updater UpdateOCMShareClosure) error
- func (s DrivesDriveItemService) UpdateOCMShares(ctx context.Context, shares []*ocm.ReceivedShare, ...) ([]*ocm.ReceivedShare, error)
- func (s DrivesDriveItemService) UpdateShare(ctx context.Context, share *collaboration.ReceivedShare, ...) (*collaboration.ReceivedShare, error)
- func (s DrivesDriveItemService) UpdateShares(ctx context.Context, shares []*collaboration.ReceivedShare, ...) ([]*collaboration.ReceivedShare, error)
- type ExportPersonalDataRequest
- type GetGatewayServiceClientFunc
- type Graph
- func (g Graph) AssignTags(w http.ResponseWriter, r *http.Request)
- func (g Graph) ChangeOwnPassword(w http.ResponseWriter, r *http.Request)
- func (g Graph) CreateAppRoleAssignment(w http.ResponseWriter, r *http.Request)
- func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request)
- func (g Graph) CreateUploadSession(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteAppRoleAssignment(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteDrive(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteEducationClass(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteEducationClassMember(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteEducationClassTeacher(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteEducationSchool(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteEducationSchoolClass(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteEducationSchoolUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteEducationUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteGroup(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteGroupMember(w http.ResponseWriter, r *http.Request)
- func (g Graph) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) ExportPersonalData(w http.ResponseWriter, r *http.Request)
- func (g Graph) GatherPersonalData(usr *user.User, ref *provider.Reference, token string, marsh Marshaller)
- func (g Graph) GetAllDrives(version APIVersion) http.HandlerFunc
- func (g Graph) GetAllDrivesV1(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetAllDrivesV1Beta1(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetApplication(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetDriveItem(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetDriveItemChildren(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetDrives(version APIVersion) http.HandlerFunc
- func (g Graph) GetDrivesV1(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetDrivesV1Beta1(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationClass(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationClassMembers(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationClassTeachers(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationClasses(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationSchool(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationSchoolClasses(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationSchoolUsers(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationSchools(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetEducationUsers(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetGatewayClient(w http.ResponseWriter, r *http.Request) (gateway.GatewayAPIClient, bool)
- func (g Graph) GetGroup(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetGroupMembers(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetGroups(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetMe(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetRoleDefinition(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetRoleDefinitions(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetRootDriveChildren(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetSharedByMe(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetSingleDrive(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetTags(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetUserDrive(w http.ResponseWriter, r *http.Request)
- func (g Graph) GetUsers(w http.ResponseWriter, r *http.Request)
- func (g Graph) ListAppRoleAssignments(w http.ResponseWriter, r *http.Request)
- func (g Graph) ListApplications(w http.ResponseWriter, r *http.Request)
- func (g Graph) ListSharedWithMe(w http.ResponseWriter, r *http.Request)
- func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, ...) (*storageprovider.ListStorageSpacesResponse, error)
- func (g Graph) PatchEducationClass(w http.ResponseWriter, r *http.Request)
- func (g Graph) PatchEducationSchool(w http.ResponseWriter, r *http.Request)
- func (g Graph) PatchEducationUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) PatchGroup(w http.ResponseWriter, r *http.Request)
- func (g Graph) PatchMe(w http.ResponseWriter, r *http.Request)
- func (g Graph) PatchUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostEducationClass(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostEducationClassMember(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostEducationClassTeacher(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostEducationSchool(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostEducationSchoolClass(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostEducationSchoolUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostEducationUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostGroup(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostGroupMember(w http.ResponseWriter, r *http.Request)
- func (g Graph) PostUser(w http.ResponseWriter, r *http.Request)
- func (g Graph) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (g *Graph) StartListenForLogonEvents(ctx context.Context, l log.Logger) error
- func (g Graph) UnassignTags(w http.ResponseWriter, r *http.Request)
- func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request)
- type HTTPClient
- type ListResponse
- type Marshaller
- type Option
- func Config(val *config.Config) Option
- func Context(ctx context.Context) Option
- func EventHistoryClient(val ehsvc.EventHistoryService) Option
- func EventsConsumer(val events.Consumer) Option
- func EventsPublisher(val events.Publisher) Option
- func KeycloakClient(val keycloak.Client) Option
- func Logger(val log.Logger) Option
- func Middleware(val ...func(http.Handler) http.Handler) Option
- func PermissionService(val settingssvc.PermissionService) Option
- func RoleManager(val *roles.Manager) Option
- func TraceProvider(val trace.TracerProvider) Option
- func WithGatewaySelector(val pool.Selectable[gateway.GatewayAPIClient]) Option
- func WithIdentityBackend(val identity.Backend) Option
- func WithIdentityEducationBackend(val identity.EducationBackend) Option
- func WithRequireAdminMiddleware(val func(http.Handler) http.Handler) Option
- func WithRoleService(val RoleService) Option
- func WithSearchService(val searchsvc.SearchProviderService) Option
- func WithValueService(val settingssvc.ValueService) Option
- type Options
- type Permissions
- type RoleService
- type Service
- type UpdateOCMShareClosure
- type UpdateShareClosure
Constants ¶
const ( Unknown permissionType = iota Public User Space OCM )
const ( // ReadmeSpecialFolderName for the drive specialFolder property ReadmeSpecialFolderName = "readme" // SpaceImageSpecialFolderName for the drive specialFolder property SpaceImageSpecialFolderName = "image" )
const (
// HeaderPurge defines the header name for the purge header.
HeaderPurge = "Purge"
)
Variables ¶
var ( // ErrNoUpdates is returned when no updates are provided ErrNoUpdates = errors.New("no updates") // ErrNoUpdater is returned when no updater is provided ErrNoUpdater = errors.New("no updater") // ErrAbsoluteNamePath is returned when the name is an absolute path ErrAbsoluteNamePath = errors.New("name cannot be an absolute path") ErrNotAShareJail = errorcode.New(errorcode.InvalidRequest, "id does not belong to a share jail") // ErrInvalidDriveIDOrItemID is returned when the driveID or itemID is invalid ErrInvalidDriveIDOrItemID = errorcode.New(errorcode.InvalidRequest, "invalid driveID or itemID") // ErrInvalidRequestBody is returned when the request body is invalid ErrInvalidRequestBody = errorcode.New(errorcode.InvalidRequest, "invalid request body") ErrUnmountShare = errorcode.New(errorcode.InvalidRequest, "unmounting share failed") ErrMountShare = errorcode.New(errorcode.InvalidRequest, "mounting share failed") ErrUpdateShares = errorcode.New(errorcode.InvalidRequest, "failed to update share") // ErrInvalidID is returned when the id is invalid ErrInvalidID = errorcode.New(errorcode.InvalidRequest, "invalid id") // ErrDriveItemConversion is returned when converting to drive items fails ErrDriveItemConversion = errorcode.New(errorcode.InvalidRequest, "converting to drive items failed") ErrNoShares = errorcode.New(errorcode.ItemNotFound, "no shares found") // ErrAlreadyMounted is returned when all shares are already mounted ErrAlreadyMounted = errorcode.New(errorcode.NameAlreadyExists, "shares already mounted") // ErrAlreadyUnmounted is returned when all shares are already unmounted ErrAlreadyUnmounted = errorcode.New(errorcode.NameAlreadyExists, "shares already unmounted") )
var ( ErrUnmountOCMShare = errorcode.New(errorcode.InvalidRequest, "unmounting ocm share failed") ErrMountOCMShare = errorcode.New(errorcode.InvalidRequest, "mounting ocm share failed") )
var ( // ErrNameTooLong is thrown when the spacename is too long ErrNameTooLong = fmt.Errorf("spacename must be smaller than %d", _maxSpaceNameLength) // ErrNameEmpty is thrown when the spacename is empty ErrNameEmpty = errors.New("spacename must not be empty") // ErrForbiddenCharacter is thrown when the spacename contains an invalid character ErrForbiddenCharacter = fmt.Errorf("spacenames must not contain %v", _invalidSpaceNameCharacters) )
var ( // HeaderAcceptLanguage is the header key for the accept-language header HeaderAcceptLanguage = "Accept-Language" // TemplateParameter is the key for the template parameter in the request TemplateParameter = "template" )
var (
// TokenTransportHeader holds the header key for the reva transfer token
TokenTransportHeader = "X-Reva-Transfer"
)
Functions ¶
func ExtractShareIdFromResourceId ¶
func ExtractShareIdFromResourceId(rid *storageprovider.ResourceId) *collaboration.ShareId
ExtractShareIdFromResourceId is a bit of a hack. We should not rely on a specific format of the item id. But currently there is no other way to get the ShareID.
func GetDriveAndItemIDParam ¶
func GetDriveAndItemIDParam(r *http.Request, logger *log.Logger) (*storageprovider.ResourceId, *storageprovider.ResourceId, error)
GetDriveAndItemIDParam parses the driveID and itemID from the request, validates the common fields and returns the parsed IDs if ok.
func GetFilterParam ¶
GetFilterParam returns the $filter query parameter from the request. If you need to parse the filter use godata.ParseRequest
func GetSelectParam ¶
GetSelectParam returns the $select query parameter from the request. If you need to parse the select filter use godata.ParseRequest
func IsShareJail ¶
func IsShareJail(id *storageprovider.ResourceId) bool
IsShareJail returns true if given id is a share jail id.
func IsSpaceRoot ¶
func IsSpaceRoot(rid *storageprovider.ResourceId) bool
IsSpaceRoot returns true if the resourceID is a space root.
func StrictJSONUnmarshal ¶
StrictJSONUnmarshal is a wrapper around json.Unmarshal that returns an error if the json contains unknown fields.
Types ¶
type APIVersion ¶
type APIVersion int
const ( // APIVersion_1 represents the first version of the API. APIVersion_1 APIVersion = iota + 1 // APIVersion_1_Beta_1 refers to the beta version of the API. // It is typically used for testing purposes and may have more // inconsistencies and bugs than the stable version as it is // still in the testing phase, use it with caution. APIVersion_1_Beta_1 )
type BaseGraphProvider ¶
type BaseGraphProvider interface {
}
BaseGraphProvider is the interface that wraps shared methods between the different graph providers
type BaseGraphService ¶
type BaseGraphService struct {
// contains filtered or unexported fields
}
BaseGraphService implements a couple of helper functions that are shared between the different graph services
func (BaseGraphService) CS3ReceivedOCMSharesToDriveItems ¶
func (g BaseGraphService) CS3ReceivedOCMSharesToDriveItems(ctx context.Context, receivedShares []*ocm.ReceivedShare) ([]libregraph.DriveItem, error)
func (BaseGraphService) CS3ReceivedSharesToDriveItems ¶
func (g BaseGraphService) CS3ReceivedSharesToDriveItems(ctx context.Context, receivedShares []*collaboration.ReceivedShare) ([]libregraph.DriveItem, error)
type DriveItemPermissionsApi ¶
type DriveItemPermissionsApi struct {
// contains filtered or unexported fields
}
DriveItemPermissionsApi is the api that registers the http endpoints which expose needed operation to the graph api. the business logic is delegated to the permissions service and further down to the cs3 client.
func NewDriveItemPermissionsApi ¶
func NewDriveItemPermissionsApi(driveItemPermissionService DriveItemPermissionsProvider, logger log.Logger, c *config.Config) (DriveItemPermissionsApi, error)
NewDriveItemPermissionsApi creates a new DriveItemPermissionsApi
func (DriveItemPermissionsApi) CreateLink ¶
func (api DriveItemPermissionsApi) CreateLink(w http.ResponseWriter, r *http.Request)
CreateLink creates a public link on the cs3 api
func (DriveItemPermissionsApi) CreateSpaceRootLink ¶
func (api DriveItemPermissionsApi) CreateSpaceRootLink(w http.ResponseWriter, r *http.Request)
func (DriveItemPermissionsApi) DeletePermission ¶
func (api DriveItemPermissionsApi) DeletePermission(w http.ResponseWriter, r *http.Request)
DeletePermission handles DeletePermission requests
func (DriveItemPermissionsApi) DeleteSpaceRootPermission ¶
func (api DriveItemPermissionsApi) DeleteSpaceRootPermission(w http.ResponseWriter, r *http.Request)
DeleteSpaceRootPermission handles DeletePermission requests on a space root
func (DriveItemPermissionsApi) Invite ¶
func (api DriveItemPermissionsApi) Invite(w http.ResponseWriter, r *http.Request)
Invite handles DriveItemInvite requests
func (DriveItemPermissionsApi) ListPermissions ¶
func (api DriveItemPermissionsApi) ListPermissions(w http.ResponseWriter, r *http.Request)
ListPermissions handles ListPermissions requests
func (DriveItemPermissionsApi) ListSpaceRootPermissions ¶
func (api DriveItemPermissionsApi) ListSpaceRootPermissions(w http.ResponseWriter, r *http.Request)
ListSpaceRootPermissions handles ListPermissions requests on a space root
func (DriveItemPermissionsApi) SetLinkPassword ¶
func (api DriveItemPermissionsApi) SetLinkPassword(w http.ResponseWriter, r *http.Request)
SetLinkPassword sets public link password on the cs3 api
func (DriveItemPermissionsApi) SetSpaceRootLinkPassword ¶
func (api DriveItemPermissionsApi) SetSpaceRootLinkPassword(w http.ResponseWriter, r *http.Request)
func (DriveItemPermissionsApi) SpaceRootInvite ¶
func (api DriveItemPermissionsApi) SpaceRootInvite(w http.ResponseWriter, r *http.Request)
SpaceRootInvite handles DriveItemInvite requests on a space root
func (DriveItemPermissionsApi) UpdatePermission ¶
func (api DriveItemPermissionsApi) UpdatePermission(w http.ResponseWriter, r *http.Request)
UpdatePermission handles UpdatePermission requests
func (DriveItemPermissionsApi) UpdateSpaceRootPermission ¶
func (api DriveItemPermissionsApi) UpdateSpaceRootPermission(w http.ResponseWriter, r *http.Request)
UpdateSpaceRootPermission handles UpdatePermission requests on a space root
type DriveItemPermissionsProvider ¶
type DriveItemPermissionsProvider interface {
Invite(ctx context.Context, resourceId *storageprovider.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error)
SpaceRootInvite(ctx context.Context, driveID *storageprovider.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error)
ListPermissions(ctx context.Context, itemID *storageprovider.ResourceId, listFederatedRoles, selectRoles bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error)
ListSpaceRootPermissions(ctx context.Context, driveID *storageprovider.ResourceId) (libregraph.CollectionOfPermissionsWithAllowedValues, error)
DeletePermission(ctx context.Context, itemID *storageprovider.ResourceId, permissionID string) error
DeleteSpaceRootPermission(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string) error
UpdatePermission(ctx context.Context, itemID *storageprovider.ResourceId, permissionID string, newPermission libregraph.Permission) (libregraph.Permission, error)
UpdateSpaceRootPermission(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string, newPermission libregraph.Permission) (libregraph.Permission, error)
CreateLink(ctx context.Context, driveItemID *storageprovider.ResourceId, createLink libregraph.DriveItemCreateLink) (libregraph.Permission, error)
CreateSpaceRootLink(ctx context.Context, driveID *storageprovider.ResourceId, createLink libregraph.DriveItemCreateLink) (libregraph.Permission, error)
SetPublicLinkPassword(ctx context.Context, driveItemID *storageprovider.ResourceId, permissionID string, password string) (libregraph.Permission, error)
SetPublicLinkPasswordOnSpaceRoot(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string, password string) (libregraph.Permission, error)
}
DriveItemPermissionsProvider contains the methods related to handling permissions on drive items
type DriveItemPermissionsService ¶
type DriveItemPermissionsService struct {
BaseGraphService
}
DriveItemPermissionsService contains the production business logic for everything that relates to permissions on drive items.
func NewDriveItemPermissionsService ¶
func NewDriveItemPermissionsService(logger log.Logger, gatewaySelector pool.Selectable[gateway.GatewayAPIClient], identityCache identity.IdentityCache, config *config.Config) (DriveItemPermissionsService, error)
NewDriveItemPermissionsService creates a new DriveItemPermissionsService
func (DriveItemPermissionsService) CreateLink ¶
func (s DriveItemPermissionsService) CreateLink(ctx context.Context, driveItemID *storageprovider.ResourceId, createLink libregraph.DriveItemCreateLink) (libregraph.Permission, error)
func (DriveItemPermissionsService) CreateSpaceRootLink ¶
func (s DriveItemPermissionsService) CreateSpaceRootLink(ctx context.Context, driveID *storageprovider.ResourceId, createLink libregraph.DriveItemCreateLink) (libregraph.Permission, error)
func (DriveItemPermissionsService) DeletePermission ¶
func (s DriveItemPermissionsService) DeletePermission(ctx context.Context, itemID *storageprovider.ResourceId, permissionID string) error
DeletePermission deletes a permission from a drive item
func (DriveItemPermissionsService) DeleteSpaceRootPermission ¶
func (s DriveItemPermissionsService) DeleteSpaceRootPermission(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string) error
DeleteSpaceRootPermission deletes a permission on the root item of a project space
func (DriveItemPermissionsService) Invite ¶
func (s DriveItemPermissionsService) Invite(ctx context.Context, resourceId *storageprovider.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error)
Invite invites a user to a drive item.
func (DriveItemPermissionsService) ListPermissions ¶
func (s DriveItemPermissionsService) ListPermissions(ctx context.Context, itemID *storageprovider.ResourceId, listFederatedRoles, selectRoles bool) (libregraph.CollectionOfPermissionsWithAllowedValues, error)
ListPermissions lists the permissions of a driveItem
func (DriveItemPermissionsService) ListSpaceRootPermissions ¶
func (s DriveItemPermissionsService) ListSpaceRootPermissions(ctx context.Context, driveID *storageprovider.ResourceId) (libregraph.CollectionOfPermissionsWithAllowedValues, error)
ListSpaceRootPermissions handles ListPermissions request on project spaces
func (DriveItemPermissionsService) SetPublicLinkPassword ¶
func (s DriveItemPermissionsService) SetPublicLinkPassword(ctx context.Context, driveItemId *storageprovider.ResourceId, permissionID string, password string) (libregraph.Permission, error)
func (DriveItemPermissionsService) SetPublicLinkPasswordOnSpaceRoot ¶
func (s DriveItemPermissionsService) SetPublicLinkPasswordOnSpaceRoot(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string, password string) (libregraph.Permission, error)
func (DriveItemPermissionsService) SpaceRootInvite ¶
func (s DriveItemPermissionsService) SpaceRootInvite(ctx context.Context, driveID *storageprovider.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error)
SpaceRootInvite handles invitation request on project spaces
func (DriveItemPermissionsService) UpdatePermission ¶
func (s DriveItemPermissionsService) UpdatePermission(ctx context.Context, itemID *storageprovider.ResourceId, permissionID string, newPermission libregraph.Permission) (libregraph.Permission, error)
UpdatePermission updates a permission on a drive item
func (DriveItemPermissionsService) UpdateSpaceRootPermission ¶
func (s DriveItemPermissionsService) UpdateSpaceRootPermission(ctx context.Context, driveID *storageprovider.ResourceId, permissionID string, newPermission libregraph.Permission) (libregraph.Permission, error)
UpdateSpaceRootPermission updates a permission on the root item of a project space
type DrivesDriveItemApi ¶
type DrivesDriveItemApi struct {
// contains filtered or unexported fields
}
DrivesDriveItemApi is the api that registers the http endpoints which expose needed operation to the graph api. the business logic is delegated to the space service and further down to the cs3 client.
func NewDrivesDriveItemApi ¶
func NewDrivesDriveItemApi(drivesDriveItemService DrivesDriveItemProvider, baseGraphService BaseGraphProvider, logger log.Logger) (DrivesDriveItemApi, error)
NewDrivesDriveItemApi creates a new DrivesDriveItemApi
func (DrivesDriveItemApi) CreateDriveItem ¶
func (api DrivesDriveItemApi) CreateDriveItem(w http.ResponseWriter, r *http.Request)
CreateDriveItem creates a drive item
func (DrivesDriveItemApi) DeleteDriveItem ¶
func (api DrivesDriveItemApi) DeleteDriveItem(w http.ResponseWriter, r *http.Request)
DeleteDriveItem deletes a drive item
func (DrivesDriveItemApi) GetDriveItem ¶
func (api DrivesDriveItemApi) GetDriveItem(w http.ResponseWriter, r *http.Request)
GetDriveItem get a drive item
func (DrivesDriveItemApi) UpdateDriveItem ¶
func (api DrivesDriveItemApi) UpdateDriveItem(w http.ResponseWriter, r *http.Request)
UpdateDriveItem updates a drive item, currently only the visibility of the share is updated
type DrivesDriveItemProvider ¶
type DrivesDriveItemProvider interface {
MountShare(ctx context.Context, resourceID *storageprovider.ResourceId, name string) ([]*collaboration.ReceivedShare, error)
MountOCMShare(ctx context.Context, resourceID *storageprovider.ResourceId) ([]*ocm.ReceivedShare, error)
UnmountShare(ctx context.Context, shareID *collaboration.ShareId) error
UpdateShares(ctx context.Context, shares []*collaboration.ReceivedShare, updater UpdateShareClosure) ([]*collaboration.ReceivedShare, error)
GetShare(ctx context.Context, shareID *collaboration.ShareId) (*collaboration.ReceivedShare, error)
GetSharesForResource(ctx context.Context, resourceID *storageprovider.ResourceId, filters []*collaboration.Filter) ([]*collaboration.ReceivedShare, error)
}
DrivesDriveItemProvider is the interface that needs to be implemented by the individual space service
type DrivesDriveItemService ¶
type DrivesDriveItemService struct {
// contains filtered or unexported fields
}
DrivesDriveItemService contains the production business logic for everything that relates to drives
func NewDrivesDriveItemService ¶
func NewDrivesDriveItemService(logger log.Logger, gatewaySelector pool.Selectable[gateway.GatewayAPIClient]) (DrivesDriveItemService, error)
NewDrivesDriveItemService creates a new DrivesDriveItemService
func (DrivesDriveItemService) GetOCMSharesForResource ¶
func (s DrivesDriveItemService) GetOCMSharesForResource(ctx context.Context, resourceID *storageprovider.ResourceId) ([]*ocm.ReceivedShare, error)
GetOCMSharesForResource returns all federated shares for a given resourceID
func (DrivesDriveItemService) GetShare ¶
func (s DrivesDriveItemService) GetShare(ctx context.Context, shareID *collaboration.ShareId) (*collaboration.ReceivedShare, error)
func (DrivesDriveItemService) GetSharesForResource ¶
func (s DrivesDriveItemService) GetSharesForResource(ctx context.Context, resourceID *storageprovider.ResourceId, filters []*collaboration.Filter) ([]*collaboration.ReceivedShare, error)
GetSharesForResource returns all shares for a given resourceID
func (DrivesDriveItemService) MountOCMShare ¶
func (s DrivesDriveItemService) MountOCMShare(ctx context.Context, resourceID *storageprovider.ResourceId) ([]*ocm.ReceivedShare, error)
func (DrivesDriveItemService) MountShare ¶
func (s DrivesDriveItemService) MountShare(ctx context.Context, resourceID *storageprovider.ResourceId, name string) ([]*collaboration.ReceivedShare, error)
MountShare mounts a share, there is no guarantee that all siblings will be mounted in some rare cases it could happen that none of the siblings could be mounted, then the error will be returned
func (DrivesDriveItemService) UnmountShare ¶
func (s DrivesDriveItemService) UnmountShare(ctx context.Context, shareID *collaboration.ShareId) error
UnmountShare unmounts a share
func (DrivesDriveItemService) UpdateOCMShare ¶
func (s DrivesDriveItemService) UpdateOCMShare(ctx context.Context, share *ocm.ReceivedShare, updater UpdateOCMShareClosure) error
UpdateOCMShare updates a single share
func (DrivesDriveItemService) UpdateOCMShares ¶
func (s DrivesDriveItemService) UpdateOCMShares(ctx context.Context, shares []*ocm.ReceivedShare, updater UpdateOCMShareClosure) ([]*ocm.ReceivedShare, error)
UpdateShares updates multiple shares; it could happen that some shares are updated and some are not, this will return a list of updated shares and a list of errors; there is no guarantee that all updates are successful
func (DrivesDriveItemService) UpdateShare ¶
func (s DrivesDriveItemService) UpdateShare(ctx context.Context, share *collaboration.ReceivedShare, updater UpdateShareClosure) (*collaboration.ReceivedShare, error)
UpdateShare updates a single share
func (DrivesDriveItemService) UpdateShares ¶
func (s DrivesDriveItemService) UpdateShares(ctx context.Context, shares []*collaboration.ReceivedShare, updater UpdateShareClosure) ([]*collaboration.ReceivedShare, error)
UpdateShares updates multiple shares; it could happen that some shares are updated and some are not, this will return a list of updated shares and a list of errors; there is no guarantee that all updates are successful
type ExportPersonalDataRequest ¶
type ExportPersonalDataRequest struct {
StorageLocation string `json:"storageLocation"`
}
ExportPersonalDataRequest is the body of the request
type GetGatewayServiceClientFunc ¶
type GetGatewayServiceClientFunc func() (gateway.GatewayAPIClient, error)
GetGatewayServiceClientFunc is a callback used to pass in a mock during testing
type Graph ¶
type Graph struct {
BaseGraphService
// contains filtered or unexported fields
}
Graph defines implements the business logic for Service.
func NewService ¶
NewService returns a service implementation for Service.
func (Graph) AssignTags ¶
func (g Graph) AssignTags(w http.ResponseWriter, r *http.Request)
AssignTags assigns a tag to a resource
func (Graph) ChangeOwnPassword ¶
func (g Graph) ChangeOwnPassword(w http.ResponseWriter, r *http.Request)
ChangeOwnPassword implements the Service interface. It allows the user to change its own password
func (Graph) CreateAppRoleAssignment ¶
func (g Graph) CreateAppRoleAssignment(w http.ResponseWriter, r *http.Request)
CreateAppRoleAssignment implements the Service interface.
func (Graph) CreateDrive ¶
func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request)
CreateDrive creates a storage drive (space).
func (Graph) CreateUploadSession ¶
func (g Graph) CreateUploadSession(w http.ResponseWriter, r *http.Request)
CreateUploadSession create an upload session to allow your app to upload files up to the maximum file size. An upload session allows your app to upload ranges of the file in sequential API requests, which allows the transfer to be resumed if a connection is dropped while the upload is in progress. ```json
{
"@microsoft.graph.conflictBehavior": "fail (default) | replace | rename",
"description": "description",
"fileSize": 1234,
"name": "filename.txt"
}
``` From https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0
func (Graph) DeleteAppRoleAssignment ¶
func (g Graph) DeleteAppRoleAssignment(w http.ResponseWriter, r *http.Request)
DeleteAppRoleAssignment implements the Service interface.
func (Graph) DeleteDrive ¶
func (g Graph) DeleteDrive(w http.ResponseWriter, r *http.Request)
DeleteDrive deletes a storage drive (space).
func (Graph) DeleteEducationClass ¶
func (g Graph) DeleteEducationClass(w http.ResponseWriter, r *http.Request)
DeleteEducationClass implements the Service interface.
func (Graph) DeleteEducationClassMember ¶
func (g Graph) DeleteEducationClassMember(w http.ResponseWriter, r *http.Request)
DeleteEducationClassMember implements the Service interface.
func (Graph) DeleteEducationClassTeacher ¶
func (g Graph) DeleteEducationClassTeacher(w http.ResponseWriter, r *http.Request)
DeleteEducationClassTeacher implements the Service interface.
func (Graph) DeleteEducationSchool ¶
func (g Graph) DeleteEducationSchool(w http.ResponseWriter, r *http.Request)
DeleteEducationSchool implements the Service interface.
func (Graph) DeleteEducationSchoolClass ¶
func (g Graph) DeleteEducationSchoolClass(w http.ResponseWriter, r *http.Request)
DeleteEducationSchoolClass implements the Service interface.
func (Graph) DeleteEducationSchoolUser ¶
func (g Graph) DeleteEducationSchoolUser(w http.ResponseWriter, r *http.Request)
DeleteEducationSchoolUser implements the Service interface.
func (Graph) DeleteEducationUser ¶
func (g Graph) DeleteEducationUser(w http.ResponseWriter, r *http.Request)
DeleteEducationUser implements the Service interface.
func (Graph) DeleteGroup ¶
func (g Graph) DeleteGroup(w http.ResponseWriter, r *http.Request)
DeleteGroup implements the Service interface.
func (Graph) DeleteGroupMember ¶
func (g Graph) DeleteGroupMember(w http.ResponseWriter, r *http.Request)
DeleteGroupMember implements the Service interface.
func (Graph) DeleteUser ¶
func (g Graph) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser implements the Service interface.
func (Graph) ExportPersonalData ¶
func (g Graph) ExportPersonalData(w http.ResponseWriter, r *http.Request)
ExportPersonalData exports all personal data the system holds
func (Graph) GatherPersonalData ¶
func (g Graph) GatherPersonalData(usr *user.User, ref *provider.Reference, token string, marsh Marshaller)
GatherPersonalData will all gather all personal data of the user and save it to a file in the users personal space
func (Graph) GetAllDrives ¶
func (g Graph) GetAllDrives(version APIVersion) http.HandlerFunc
GetAllDrives serves as a factory method that returns the appropriate http.Handler function based on the specified API version.
func (Graph) GetAllDrivesV1 ¶
func (g Graph) GetAllDrivesV1(w http.ResponseWriter, r *http.Request)
GetAllDrivesV1 attempts to retrieve the current users drives; it includes another user's drives, if the current user has the permission.
func (Graph) GetAllDrivesV1Beta1 ¶
func (g Graph) GetAllDrivesV1Beta1(w http.ResponseWriter, r *http.Request)
GetAllDrivesV1Beta1 is the same as the GetAllDrivesV1 endpoint, expect: it includes the grantedtoV2 property it uses unified roles instead of the cs3 representations
func (Graph) GetApplication ¶
func (g Graph) GetApplication(w http.ResponseWriter, r *http.Request)
GetApplication implements the Service interface.
func (Graph) GetDriveItem ¶
func (g Graph) GetDriveItem(w http.ResponseWriter, r *http.Request)
GetDriveItem returns a driveItem
func (Graph) GetDriveItemChildren ¶
func (g Graph) GetDriveItemChildren(w http.ResponseWriter, r *http.Request)
GetDriveItemChildren lists the children of a driveItem
func (Graph) GetDrives ¶
func (g Graph) GetDrives(version APIVersion) http.HandlerFunc
GetDrives serves as a factory method that returns the appropriate http.Handler function based on the specified API version.
func (Graph) GetDrivesV1 ¶
func (g Graph) GetDrivesV1(w http.ResponseWriter, r *http.Request)
GetDrivesV1 attempts to retrieve the current users drives; it lists all drives the current user has access to.
func (Graph) GetDrivesV1Beta1 ¶
func (g Graph) GetDrivesV1Beta1(w http.ResponseWriter, r *http.Request)
GetDrivesV1Beta1 is the same as the GetDrivesV1 endpoint, expect: it includes the grantedtoV2 property it uses unified roles instead of the cs3 representations
func (Graph) GetEducationClass ¶
func (g Graph) GetEducationClass(w http.ResponseWriter, r *http.Request)
GetEducationClass implements the Service interface.
func (Graph) GetEducationClassMembers ¶
func (g Graph) GetEducationClassMembers(w http.ResponseWriter, r *http.Request)
GetEducationClassMembers implements the Service interface.
func (Graph) GetEducationClassTeachers ¶
func (g Graph) GetEducationClassTeachers(w http.ResponseWriter, r *http.Request)
GetEducationClassTeachers implements the Service interface.
func (Graph) GetEducationClasses ¶
func (g Graph) GetEducationClasses(w http.ResponseWriter, r *http.Request)
GetEducationClasses implements the Service interface.
func (Graph) GetEducationSchool ¶
func (g Graph) GetEducationSchool(w http.ResponseWriter, r *http.Request)
GetEducationSchool implements the Service interface.
func (Graph) GetEducationSchoolClasses ¶
func (g Graph) GetEducationSchoolClasses(w http.ResponseWriter, r *http.Request)
GetEducationSchoolClasses implements the Service interface.
func (Graph) GetEducationSchoolUsers ¶
func (g Graph) GetEducationSchoolUsers(w http.ResponseWriter, r *http.Request)
GetEducationSchoolUsers implements the Service interface.
func (Graph) GetEducationSchools ¶
func (g Graph) GetEducationSchools(w http.ResponseWriter, r *http.Request)
GetEducationSchools implements the Service interface.
func (Graph) GetEducationUser ¶
func (g Graph) GetEducationUser(w http.ResponseWriter, r *http.Request)
GetEducationUser implements the Service interface.
func (Graph) GetEducationUsers ¶
func (g Graph) GetEducationUsers(w http.ResponseWriter, r *http.Request)
GetEducationUsers implements the Service interface.
func (Graph) GetGatewayClient ¶
func (g Graph) GetGatewayClient(w http.ResponseWriter, r *http.Request) (gateway.GatewayAPIClient, bool)
GetGatewayClient returns a gateway client from the gatewaySelector.
func (Graph) GetGroup ¶
func (g Graph) GetGroup(w http.ResponseWriter, r *http.Request)
GetGroup implements the Service interface.
func (Graph) GetGroupMembers ¶
func (g Graph) GetGroupMembers(w http.ResponseWriter, r *http.Request)
GetGroupMembers implements the Service interface.
func (Graph) GetGroups ¶
func (g Graph) GetGroups(w http.ResponseWriter, r *http.Request)
GetGroups implements the Service interface.
func (Graph) GetMe ¶
func (g Graph) GetMe(w http.ResponseWriter, r *http.Request)
GetMe implements the Service interface.
func (Graph) GetRoleDefinition ¶
func (g Graph) GetRoleDefinition(w http.ResponseWriter, r *http.Request)
GetRoleDefinition a permission role than can be used when sharing with users or groups
func (Graph) GetRoleDefinitions ¶
func (g Graph) GetRoleDefinitions(w http.ResponseWriter, r *http.Request)
GetRoleDefinitions a list of permission roles than can be used when sharing with users or groups
func (Graph) GetRootDriveChildren ¶
func (g Graph) GetRootDriveChildren(w http.ResponseWriter, r *http.Request)
GetRootDriveChildren implements the Service interface.
func (Graph) GetSharedByMe ¶
func (g Graph) GetSharedByMe(w http.ResponseWriter, r *http.Request)
GetSharedByMe implements the Service interface (/me/drives/sharedByMe endpoint)
func (Graph) GetSingleDrive ¶
func (g Graph) GetSingleDrive(w http.ResponseWriter, r *http.Request)
GetSingleDrive does a lookup of a single space by spaceId
func (Graph) GetTags ¶
func (g Graph) GetTags(w http.ResponseWriter, r *http.Request)
GetTags returns all available tags
func (Graph) GetUser ¶
func (g Graph) GetUser(w http.ResponseWriter, r *http.Request)
GetUser implements the Service interface.
func (Graph) GetUserDrive ¶
func (g Graph) GetUserDrive(w http.ResponseWriter, r *http.Request)
GetUserDrive implements the Service interface.
func (Graph) GetUsers ¶
func (g Graph) GetUsers(w http.ResponseWriter, r *http.Request)
GetUsers implements the Service interface.
func (Graph) ListAppRoleAssignments ¶
func (g Graph) ListAppRoleAssignments(w http.ResponseWriter, r *http.Request)
ListAppRoleAssignments implements the Service interface.
func (Graph) ListApplications ¶
func (g Graph) ListApplications(w http.ResponseWriter, r *http.Request)
ListApplications implements the Service interface.
func (Graph) ListSharedWithMe ¶
func (g Graph) ListSharedWithMe(w http.ResponseWriter, r *http.Request)
ListSharedWithMe lists the files shared with the current user.
func (Graph) ListStorageSpacesWithFilters ¶
func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*storageprovider.ListStorageSpacesRequest_Filter, unrestricted bool) (*storageprovider.ListStorageSpacesResponse, error)
ListStorageSpacesWithFilters List Storage Spaces using filters
func (Graph) PatchEducationClass ¶
func (g Graph) PatchEducationClass(w http.ResponseWriter, r *http.Request)
PatchEducationClass implements the Service interface.
func (Graph) PatchEducationSchool ¶
func (g Graph) PatchEducationSchool(w http.ResponseWriter, r *http.Request)
PatchEducationSchool implements the Service interface.
func (Graph) PatchEducationUser ¶
func (g Graph) PatchEducationUser(w http.ResponseWriter, r *http.Request)
PatchEducationUser implements the Service Interface. Updates the specified attributes of an ExistingUser
func (Graph) PatchGroup ¶
func (g Graph) PatchGroup(w http.ResponseWriter, r *http.Request)
PatchGroup implements the Service interface.
func (Graph) PatchMe ¶
func (g Graph) PatchMe(w http.ResponseWriter, r *http.Request)
PatchMe implements the Service Interface. Updates the specified attributes of the current user
func (Graph) PatchUser ¶
func (g Graph) PatchUser(w http.ResponseWriter, r *http.Request)
PatchUser implements the Service Interface. Updates the specified attributes of an ExistingUser
func (Graph) PostEducationClass ¶
func (g Graph) PostEducationClass(w http.ResponseWriter, r *http.Request)
PostEducationClass implements the Service interface.
func (Graph) PostEducationClassMember ¶
func (g Graph) PostEducationClassMember(w http.ResponseWriter, r *http.Request)
PostEducationClassMember implements the Service interface.
func (Graph) PostEducationClassTeacher ¶
func (g Graph) PostEducationClassTeacher(w http.ResponseWriter, r *http.Request)
PostEducationClassTeacher implements the Service interface.
func (Graph) PostEducationSchool ¶
func (g Graph) PostEducationSchool(w http.ResponseWriter, r *http.Request)
PostEducationSchool implements the Service interface.
func (Graph) PostEducationSchoolClass ¶
func (g Graph) PostEducationSchoolClass(w http.ResponseWriter, r *http.Request)
PostEducationSchoolClass implements the Service interface.
func (Graph) PostEducationSchoolUser ¶
func (g Graph) PostEducationSchoolUser(w http.ResponseWriter, r *http.Request)
PostEducationSchoolUser implements the Service interface.
func (Graph) PostEducationUser ¶
func (g Graph) PostEducationUser(w http.ResponseWriter, r *http.Request)
PostEducationUser implements the Service interface.
func (Graph) PostGroup ¶
func (g Graph) PostGroup(w http.ResponseWriter, r *http.Request)
PostGroup implements the Service interface.
func (Graph) PostGroupMember ¶
func (g Graph) PostGroupMember(w http.ResponseWriter, r *http.Request)
PostGroupMember implements the Service interface.
func (Graph) PostUser ¶
func (g Graph) PostUser(w http.ResponseWriter, r *http.Request)
PostUser implements the Service interface.
func (Graph) ServeHTTP ¶
func (g Graph) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the Service interface.
func (*Graph) StartListenForLogonEvents ¶
func (Graph) UnassignTags ¶
func (g Graph) UnassignTags(w http.ResponseWriter, r *http.Request)
UnassignTags removes a tag from a resource
func (Graph) UpdateDrive ¶
func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request)
UpdateDrive updates the properties of a storage drive (space).
type HTTPClient ¶
HTTPClient is the subset of the http.Client that is being used to interact with the download gateway
type ListResponse ¶
type ListResponse struct {
Value interface{} `json:"value,omitempty"`
}
ListResponse is used for proper marshalling of Graph list responses
type Marshaller ¶
Marshaller is the common interface for a marshaller
type Option ¶
type Option func(o *Options)
Option defines a single option function.
func EventHistoryClient ¶
func EventHistoryClient(val ehsvc.EventHistoryService) Option
EventHistoryClient provides a function to set the EventHistoryClient option.
func EventsConsumer ¶
EventsConsumer provides a function to set the EventsConsumer option.
func EventsPublisher ¶
EventsPublisher provides a function to set the EventsPublisher option.
func KeycloakClient ¶
KeycloakClient provides a function to set the KeycloakCient option.
func Middleware ¶
Middleware provides a function to set the middleware option.
func PermissionService ¶
func PermissionService(val settingssvc.PermissionService) Option
PermissionService provides a function to set the PermissionService option.
func RoleManager ¶
RoleManager provides a function to set the RoleManager option.
func TraceProvider ¶
func TraceProvider(val trace.TracerProvider) Option
TraceProvider provides a function to set the TraceProvider option.
func WithGatewaySelector ¶
func WithGatewaySelector(val pool.Selectable[gateway.GatewayAPIClient]) Option
WithGatewaySelector provides a function to set the gateway client option.
func WithIdentityBackend ¶
WithIdentityBackend provides a function to set the IdentityBackend option.
func WithIdentityEducationBackend ¶
func WithIdentityEducationBackend(val identity.EducationBackend) Option
WithIdentityEducationBackend provides a function to set the IdentityEducationBackend option.
func WithRequireAdminMiddleware ¶
WithRequireAdminMiddleware provides a function to set the RequireAdminMiddleware option.
func WithRoleService ¶
func WithRoleService(val RoleService) Option
WithRoleService provides a function to set the RoleService option.
func WithSearchService ¶
func WithSearchService(val searchsvc.SearchProviderService) Option
WithSearchService provides a function to set the SearchService option.
func WithValueService ¶
func WithValueService(val settingssvc.ValueService) Option
WithValueService provides a function to set the ValueService option.
type Options ¶
type Options struct {
Context context.Context
Logger log.Logger
Config *config.Config
Middleware []func(http.Handler) http.Handler
RequireAdminMiddleware func(http.Handler) http.Handler
GatewaySelector pool.Selectable[gateway.GatewayAPIClient]
IdentityBackend identity.Backend
IdentityEducationBackend identity.EducationBackend
RoleService RoleService
PermissionService Permissions
ValueService settingssvc.ValueService
RoleManager *roles.Manager
EventsPublisher events.Publisher
EventsConsumer events.Consumer
SearchService searchsvc.SearchProviderService
KeycloakClient keycloak.Client
EventHistoryClient ehsvc.EventHistoryService
TraceProvider trace.TracerProvider
}
Options defines the available options for this package.
type Permissions ¶
type Permissions interface {
ListPermissions(ctx context.Context, req *settingssvc.ListPermissionsRequest, opts ...client.CallOption) (*settingssvc.ListPermissionsResponse, error)
GetPermissionByID(ctx context.Context, request *settingssvc.GetPermissionByIDRequest, opts ...client.CallOption) (*settingssvc.GetPermissionByIDResponse, error)
ListPermissionsByResource(ctx context.Context, in *settingssvc.ListPermissionsByResourceRequest, opts ...client.CallOption) (*settingssvc.ListPermissionsByResourceResponse, error)
}
Permissions is the interface used to access the permissions service
type RoleService ¶
type RoleService interface {
ListRoles(ctx context.Context, in *settingssvc.ListBundlesRequest, opts ...client.CallOption) (*settingssvc.ListBundlesResponse, error)
ListRoleAssignments(ctx context.Context, in *settingssvc.ListRoleAssignmentsRequest, opts ...client.CallOption) (*settingssvc.ListRoleAssignmentsResponse, error)
ListRoleAssignmentsFiltered(ctx context.Context, in *settingssvc.ListRoleAssignmentsFilteredRequest, opts ...client.CallOption) (*settingssvc.ListRoleAssignmentsResponse, error)
AssignRoleToUser(ctx context.Context, in *settingssvc.AssignRoleToUserRequest, opts ...client.CallOption) (*settingssvc.AssignRoleToUserResponse, error)
RemoveRoleFromUser(ctx context.Context, in *settingssvc.RemoveRoleFromUserRequest, opts ...client.CallOption) (*emptypb.Empty, error)
}
RoleService is the interface used to access the role service
type Service ¶
type Service interface {
ServeHTTP(w http.ResponseWriter, r *http.Request)
ListApplications(w http.ResponseWriter, r *http.Request)
GetApplication(w http.ResponseWriter, r *http.Request)
GetMe(w http.ResponseWriter, r *http.Request)
GetUsers(w http.ResponseWriter, r *http.Request)
GetUser(w http.ResponseWriter, r *http.Request)
PostUser(w http.ResponseWriter, r *http.Request)
DeleteUser(w http.ResponseWriter, r *http.Request)
PatchUser(w http.ResponseWriter, r *http.Request)
ChangeOwnPassword(w http.ResponseWriter, r *http.Request)
ListAppRoleAssignments(w http.ResponseWriter, r *http.Request)
CreateAppRoleAssignment(w http.ResponseWriter, r *http.Request)
DeleteAppRoleAssignment(w http.ResponseWriter, r *http.Request)
GetGroups(w http.ResponseWriter, r *http.Request)
GetGroup(w http.ResponseWriter, r *http.Request)
PostGroup(w http.ResponseWriter, r *http.Request)
PatchGroup(w http.ResponseWriter, r *http.Request)
DeleteGroup(w http.ResponseWriter, r *http.Request)
GetGroupMembers(w http.ResponseWriter, r *http.Request)
PostGroupMember(w http.ResponseWriter, r *http.Request)
DeleteGroupMember(w http.ResponseWriter, r *http.Request)
GetEducationSchools(w http.ResponseWriter, r *http.Request)
GetEducationSchool(w http.ResponseWriter, r *http.Request)
PostEducationSchool(w http.ResponseWriter, r *http.Request)
PatchEducationSchool(w http.ResponseWriter, r *http.Request)
DeleteEducationSchool(w http.ResponseWriter, r *http.Request)
GetEducationSchoolUsers(w http.ResponseWriter, r *http.Request)
PostEducationSchoolUser(w http.ResponseWriter, r *http.Request)
DeleteEducationSchoolUser(w http.ResponseWriter, r *http.Request)
GetEducationSchoolClasses(w http.ResponseWriter, r *http.Request)
PostEducationSchoolClass(w http.ResponseWriter, r *http.Request)
DeleteEducationSchoolClass(w http.ResponseWriter, r *http.Request)
GetEducationClasses(w http.ResponseWriter, r *http.Request)
GetEducationClass(w http.ResponseWriter, r *http.Request)
PostEducationClass(w http.ResponseWriter, r *http.Request)
PatchEducationClass(w http.ResponseWriter, r *http.Request)
DeleteEducationClass(w http.ResponseWriter, r *http.Request)
GetEducationClassMembers(w http.ResponseWriter, r *http.Request)
PostEducationClassMember(w http.ResponseWriter, r *http.Request)
GetEducationUsers(w http.ResponseWriter, r *http.Request)
GetEducationUser(w http.ResponseWriter, r *http.Request)
PostEducationUser(w http.ResponseWriter, r *http.Request)
DeleteEducationUser(w http.ResponseWriter, r *http.Request)
PatchEducationUser(w http.ResponseWriter, r *http.Request)
DeleteEducationClassMember(w http.ResponseWriter, r *http.Request)
GetEducationClassTeachers(w http.ResponseWriter, r *http.Request)
PostEducationClassTeacher(w http.ResponseWriter, r *http.Request)
DeleteEducationClassTeacher(w http.ResponseWriter, r *http.Request)
GetDrivesV1(w http.ResponseWriter, r *http.Request)
GetDrivesV1Beta1(w http.ResponseWriter, r *http.Request)
GetSingleDrive(w http.ResponseWriter, r *http.Request)
GetAllDrivesV1(w http.ResponseWriter, r *http.Request)
GetAllDrivesV1Beta1(w http.ResponseWriter, r *http.Request)
CreateDrive(w http.ResponseWriter, r *http.Request)
UpdateDrive(w http.ResponseWriter, r *http.Request)
DeleteDrive(w http.ResponseWriter, r *http.Request)
GetRootDriveChildren(w http.ResponseWriter, r *http.Request)
GetDriveItem(w http.ResponseWriter, r *http.Request)
GetDriveItemChildren(w http.ResponseWriter, r *http.Request)
CreateUploadSession(w http.ResponseWriter, r *http.Request)
GetTags(w http.ResponseWriter, r *http.Request)
AssignTags(w http.ResponseWriter, r *http.Request)
UnassignTags(w http.ResponseWriter, r *http.Request)
}
Service defines the service handlers.
type UpdateOCMShareClosure ¶
type UpdateOCMShareClosure func(share *ocm.ReceivedShare, request *ocm.UpdateReceivedOCMShareRequest)
UpdateOCMShareClosure is a closure that injects required updates into the update request
type UpdateShareClosure ¶
type UpdateShareClosure func(share *collaboration.ReceivedShare, request *collaboration.UpdateReceivedShareRequest)
UpdateShareClosure is a closure that injects required updates into the update request
Source Files
¶
- api_driveitem_permissions.go
- api_driveitem_permissions_links.go
- api_drives_drive_item.go
- api_drives_drive_item_ocm.go
- application.go
- approleassignments.go
- base.go
- driveitems.go
- drives.go
- educationclasses.go
- educationschools.go
- educationuser.go
- graph.go
- groups.go
- option.go
- ordering.go
- password.go
- personaldata.go
- rolemanagement.go
- service.go
- sharedbyme.go
- sharedwithme.go
- spacetemplates.go
- tags.go
- users.go
- users_filter.go
- utils.go