Documentation ¶
Overview ¶
This namespace contains endpoints and data types for creating and managing shared links and shared folders.
Index ¶
- type AccessLevel
- type AclUpdatePolicy
- type AddFolderMemberArg
- type AddFolderMemberError
- type AddMember
- type AddMemberSelectorError
- type CollectionLinkMetadata
- type CreateSharedLinkArg
- type CreateSharedLinkError
- type CreateSharedLinkWithSettingsArg
- type CreateSharedLinkWithSettingsError
- type FileLinkMetadata
- type FolderAction
- type FolderLinkMetadata
- type FolderPermission
- type FolderPolicy
- type GetMetadataArgs
- type GetSharedLinkFileError
- type GetSharedLinkMetadataArg
- type GetSharedLinksArg
- type GetSharedLinksError
- type GetSharedLinksResult
- type GroupInfo
- type GroupMembershipInfo
- type InviteeInfo
- type InviteeMembershipInfo
- type JobError
- type JobStatus
- type LinkMetadata
- type LinkPermissions
- type ListFolderMembersArgs
- type ListFolderMembersContinueArg
- type ListFolderMembersContinueError
- type ListFolderMembersCursorArg
- type ListFoldersArgs
- type ListFoldersContinueArg
- type ListFoldersContinueError
- type ListFoldersResult
- type ListSharedLinksArg
- type ListSharedLinksError
- type ListSharedLinksResult
- type MemberAction
- type MemberPermission
- type MemberPolicy
- type MemberSelector
- type MembershipInfo
- type ModifySharedLinkSettingsArgs
- type ModifySharedLinkSettingsError
- type MountFolderArg
- type MountFolderError
- type PathLinkMetadata
- type PendingUploadMode
- type PermissionDeniedReason
- type RelinquishFolderMembershipArg
- type RelinquishFolderMembershipError
- type RemoveFolderMemberArg
- type RemoveFolderMemberError
- type RequestedVisibility
- type ResolvedVisibility
- type RevokeSharedLinkArg
- type RevokeSharedLinkError
- type ShareFolderArg
- type ShareFolderError
- type ShareFolderJobStatus
- type ShareFolderLaunch
- type SharePathError
- type SharedFolderAccessError
- type SharedFolderMemberError
- type SharedFolderMembers
- type SharedFolderMetadata
- type SharedFolderMetadataBase
- type SharedLinkAccessFailureReason
- type SharedLinkError
- type SharedLinkMetadata
- type SharedLinkPolicy
- type SharedLinkSettings
- type SharedLinkSettingsError
- type Sharing
- type TeamMemberInfo
- type TransferFolderArg
- type TransferFolderError
- type UnmountFolderArg
- type UnmountFolderError
- type UnshareFolderArg
- type UnshareFolderError
- type UpdateFolderMemberArg
- type UpdateFolderMemberError
- type UpdateFolderPolicyArg
- type UpdateFolderPolicyError
- type UserInfo
- type UserMembershipInfo
- type Visibility
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessLevel ¶
type AccessLevel struct {
Tag string `json:".tag"`
}
Defines the access levels for collaborators.
type AclUpdatePolicy ¶
type AclUpdatePolicy struct {
Tag string `json:".tag"`
}
Policy governing who can change a shared folder's access control list (ACL). In other words, who can add, remove, or change the privileges of members.
type AddFolderMemberArg ¶
type AddFolderMemberArg struct { string `json:"shared_folder_id"` // The intended list of members to add. Added members will receive invites to // join the shared folder. Members []*AddMember `json:"members"` // Whether added members should be notified via email and device notifications // of their invite. Quiet bool `json:"quiet"` // Optional message to display to added members in their invitation. CustomMessage string `json:"custom_message,omitempty"` }SharedFolderId
func NewAddFolderMemberArg ¶
func NewAddFolderMemberArg(SharedFolderId string, Members []*AddMember) *AddFolderMemberArg
type AddFolderMemberError ¶
type AddFolderMemberError struct { Tag string `json:".tag"` // Unable to access shared folder. AccessError *SharedFolderAccessError `json:"access_error,omitempty"` // `AddFolderMemberArg.members` contains a bad invitation recipient. BadMember *AddMemberSelectorError `json:"bad_member,omitempty"` // The value is the member limit that was reached. TooManyMembers uint64 `json:"too_many_members,omitempty"` // The value is the pending invite limit that was reached. TooManyPendingInvites uint64 `json:"too_many_pending_invites,omitempty"` }
func (*AddFolderMemberError) UnmarshalJSON ¶
func (u *AddFolderMemberError) UnmarshalJSON(body []byte) error
type AddMember ¶
type AddMember struct { // The member to add to the shared folder. Member *MemberSelector `json:"member"` // The access level to grant `member` to the shared folder. // `AccessLevel.owner` is disallowed. AccessLevel *AccessLevel `json:"access_level"` }
The member and type of access the member should have when added to a shared folder.
func NewAddMember ¶
func NewAddMember(Member *MemberSelector) *AddMember
type AddMemberSelectorError ¶
type AddMemberSelectorError struct { Tag string `json:".tag"` // The value is the ID that could not be identified. InvalidDropboxId string `json:"invalid_dropbox_id,omitempty"` // The value is the e-email address that is malformed. InvalidEmail string `json:"invalid_email,omitempty"` // The value is the ID of the Dropbox user with an unverified e-mail address. // Invite unverified users by e-mail address instead of by their Dropbox ID. UnverifiedDropboxId string `json:"unverified_dropbox_id,omitempty"` }
func (*AddMemberSelectorError) UnmarshalJSON ¶
func (u *AddMemberSelectorError) UnmarshalJSON(body []byte) error
type CollectionLinkMetadata ¶
type CollectionLinkMetadata struct { // URL of the shared link. Url string `json:"url"` // Who can access the link. Visibility *Visibility `json:"visibility"` // Expiration time, if set. By default the link won't expire. Expires time.Time `json:"expires,omitempty"` }
Metadata for a collection-based shared link.
func NewCollectionLinkMetadata ¶
func NewCollectionLinkMetadata(Url string, Visibility *Visibility) *CollectionLinkMetadata
type CreateSharedLinkArg ¶
type CreateSharedLinkArg struct { string `json:"path"` ShortUrl bool `json:"short_url"` // `PendingUploadMode.file` or `PendingUploadMode.folder` to indicate whether // to assume it's a file or folder. PendingUpload *PendingUploadMode `json:"pending_upload,omitempty"` }Path
func NewCreateSharedLinkArg ¶
func NewCreateSharedLinkArg(Path string) *CreateSharedLinkArg
type CreateSharedLinkError ¶
type CreateSharedLinkError struct {}
func (*CreateSharedLinkError) UnmarshalJSON ¶
func (u *CreateSharedLinkError) UnmarshalJSON(body []byte) error
type CreateSharedLinkWithSettingsArg ¶
type CreateSharedLinkWithSettingsArg struct { string `json:"path"` Settings *SharedLinkSettings `json:"settings,omitempty"` }Path
func NewCreateSharedLinkWithSettingsArg ¶
func NewCreateSharedLinkWithSettingsArg(Path string) *CreateSharedLinkWithSettingsArg
type CreateSharedLinkWithSettingsError ¶
type CreateSharedLinkWithSettingsError struct { SharedLinkSettingsError `json:"settings_error,omitempty"` }SettingsError *
func (*CreateSharedLinkWithSettingsError) UnmarshalJSON ¶
func (u *CreateSharedLinkWithSettingsError) UnmarshalJSON(body []byte) error
type FileLinkMetadata ¶
type FileLinkMetadata struct { // URL of the shared link. Url string `json:"url"` // The linked file name (including extension). This never contains a slash. Name string `json:"name"` // The link's access permissions. LinkPermissions *LinkPermissions `json:"link_permissions"` // The modification time set by the desktop client when the file was added to // Dropbox. Since this time is not verified (the Dropbox server stores whatever // the desktop client sends up), this should only be used for display purposes // (such as sorting) and not, for example, to determine if a file has changed // or not. ClientModified time.Time `json:"client_modified"` // The last time the file was modified on Dropbox. ServerModified time.Time `json:"server_modified"` // A unique identifier for the current revision of a file. This field is the // same rev as elsewhere in the API and can be used to detect changes and avoid // conflicts. Rev string `json:"rev"` // The file size in bytes. Size uint64 `json:"size"` // A unique identifier for the linked file. Id string `json:"id,omitempty"` // Expiration time, if set. By default the link won't expire. Expires time.Time `json:"expires,omitempty"` // The lowercased full path in the user's Dropbox. This always starts with a // slash. This field will only be present only if the linked file is in the // authenticated user's dropbox. PathLower string `json:"path_lower,omitempty"` // The team membership information of the link's owner. This field will only // be present if the link's owner is a team member. TeamMemberInfo *TeamMemberInfo `json:"team_member_info,omitempty"` // The team information of the content's owner. This field will only be present // if the content's owner is a team member and the content's owner team is // different from the link's owner team. ContentOwnerTeamInfo *users.Team `json:"content_owner_team_info,omitempty"` }
The metadata of a file shared link
func NewFileLinkMetadata ¶
func NewFileLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions, ClientModified time.Time, ServerModified time.Time, Rev string, Size uint64) *FileLinkMetadata
type FolderAction ¶
type FolderAction struct {
Tag string `json:".tag"`
}
Actions that may be taken on shared folders.
type FolderLinkMetadata ¶
type FolderLinkMetadata struct { // URL of the shared link. Url string `json:"url"` // The linked file name (including extension). This never contains a slash. Name string `json:"name"` // The link's access permissions. LinkPermissions *LinkPermissions `json:"link_permissions"` // A unique identifier for the linked file. Id string `json:"id,omitempty"` // Expiration time, if set. By default the link won't expire. Expires time.Time `json:"expires,omitempty"` // The lowercased full path in the user's Dropbox. This always starts with a // slash. This field will only be present only if the linked file is in the // authenticated user's dropbox. PathLower string `json:"path_lower,omitempty"` // The team membership information of the link's owner. This field will only // be present if the link's owner is a team member. TeamMemberInfo *TeamMemberInfo `json:"team_member_info,omitempty"` // The team information of the content's owner. This field will only be present // if the content's owner is a team member and the content's owner team is // different from the link's owner team. ContentOwnerTeamInfo *users.Team `json:"content_owner_team_info,omitempty"` }
The metadata of a folder shared link
func NewFolderLinkMetadata ¶
func NewFolderLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions) *FolderLinkMetadata
type FolderPermission ¶
type FolderPermission struct { // The action that the user may wish to take on the folder. Action *FolderAction `json:"action"` // True if the user is allowed to take the action. Allow bool `json:"allow"` // The reason why the user is denied the permission. Not present if the action // is allowed, or if no reason is available. Reason *PermissionDeniedReason `json:"reason,omitempty"` }
Whether the user is allowed to take the action on the shared folder.
func NewFolderPermission ¶
func NewFolderPermission(Action *FolderAction, Allow bool) *FolderPermission
type FolderPolicy ¶
type FolderPolicy struct { // Who can add and remove members from this shared folder. AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy"` SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy"` // Who can be a member of this shared folder, as set on the folder itself. The // effective policy may differ from this value if the team-wide policy is more // restrictive. Present only if the folder is owned by a team. MemberPolicy *MemberPolicy `json:"member_policy,omitempty"` // Who can be a member of this shared folder, taking into account both the // folder and the team-wide policy. This value may differ from that of // member_policy if the team-wide policy is more restrictive than the folder // policy. Present only if the folder is owned by a team. ResolvedMemberPolicy *MemberPolicy `json:"resolved_member_policy,omitempty"` }
A set of policies governing membership and privileges for a shared folder.
func NewFolderPolicy ¶
func NewFolderPolicy(AclUpdatePolicy *AclUpdatePolicy, SharedLinkPolicy *SharedLinkPolicy) *FolderPolicy
type GetMetadataArgs ¶
type GetMetadataArgs struct { string `json:"shared_folder_id"` // Folder actions to query. Actions []*FolderAction `json:"actions,omitempty"` }SharedFolderId
func NewGetMetadataArgs ¶
func NewGetMetadataArgs(SharedFolderId string) *GetMetadataArgs
type GetSharedLinkFileError ¶
type GetSharedLinkFileError struct {
}type GetSharedLinkMetadataArg ¶
type GetSharedLinkMetadataArg struct { string `json:"url"` // the metadata for a specific file or sub-folder in this folder. A relative // path should be used. Path string `json:"path,omitempty"` LinkPassword string `json:"link_password,omitempty"` }Url
func NewGetSharedLinkMetadataArg ¶
func NewGetSharedLinkMetadataArg(Url string) *GetSharedLinkMetadataArg
type GetSharedLinksArg ¶
type GetSharedLinksArg struct { string `json:"path,omitempty"` }Path
func NewGetSharedLinksArg ¶
func NewGetSharedLinksArg() *GetSharedLinksArg
type GetSharedLinksError ¶
type GetSharedLinksError struct {}
func (*GetSharedLinksError) UnmarshalJSON ¶
func (u *GetSharedLinksError) UnmarshalJSON(body []byte) error
type GetSharedLinksResult ¶
type GetSharedLinksResult struct { LinkMetadata `json:"links"` }Links []*
func NewGetSharedLinksResult ¶
func NewGetSharedLinksResult(Links []*LinkMetadata) *GetSharedLinksResult
type GroupInfo ¶
type GroupInfo struct { GroupName string `json:"group_name"` GroupId string `json:"group_id"` // The number of members in the group. MemberCount uint32 `json:"member_count"` // The type of group. GroupType *team.GroupType `json:"group_type"` // If the group is owned by the current user's team. SameTeam bool `json:"same_team"` // External ID of group. This is an arbitrary ID that an admin can attach to a // group. GroupExternalId string `json:"group_external_id,omitempty"` }
The information about a group. Groups is a way to manage a list of users who need same access permission to the shared folder.
type GroupMembershipInfo ¶
type GroupMembershipInfo struct { // The access type for this member. AccessType *AccessLevel `json:"access_type"` // The information about the membership group. Group *GroupInfo `json:"group"` // The permissions that requesting user has on this member. The set of // permissions corresponds to the MemberActions in the request. Permissions []*MemberPermission `json:"permissions,omitempty"` // Suggested name initials for a member. Initials string `json:"initials,omitempty"` // True if the member's access to the file is inherited from a parent folder. IsInherited bool `json:"is_inherited"` }
The information about a group member of the shared folder.
func NewGroupMembershipInfo ¶
func NewGroupMembershipInfo(AccessType *AccessLevel, Group *GroupInfo) *GroupMembershipInfo
type InviteeInfo ¶
type InviteeInfo struct { Tag string `json:".tag"` // E-mail address of invited user. Email string `json:"email,omitempty"` }
The information about a user invited to become a member a shared folder.
func (*InviteeInfo) UnmarshalJSON ¶
func (u *InviteeInfo) UnmarshalJSON(body []byte) error
type InviteeMembershipInfo ¶
type InviteeMembershipInfo struct { // The access type for this member. AccessType *AccessLevel `json:"access_type"` // The information for the invited user. Invitee *InviteeInfo `json:"invitee"` // The permissions that requesting user has on this member. The set of // permissions corresponds to the MemberActions in the request. Permissions []*MemberPermission `json:"permissions,omitempty"` // Suggested name initials for a member. Initials string `json:"initials,omitempty"` // True if the member's access to the file is inherited from a parent folder. IsInherited bool `json:"is_inherited"` }
The information about a user invited to become a member of a shared folder.
func NewInviteeMembershipInfo ¶
func NewInviteeMembershipInfo(AccessType *AccessLevel, Invitee *InviteeInfo) *InviteeMembershipInfo
type JobError ¶
type JobError struct { Tag string `json:".tag"` UnshareFolderError *UnshareFolderError `json:"unshare_folder_error,omitempty"` // Error occurred while performing `RemoveFolderMember` action. RemoveFolderMemberError *RemoveFolderMemberError `json:"remove_folder_member_error,omitempty"` }
Error occurred while performing an asynchronous job from `UnshareFolder` or `RemoveFolderMember`.
func (*JobError) UnmarshalJSON ¶
type JobStatus ¶
type JobStatus struct { Tag string `json:".tag"` // The asynchronous job returned an error. Failed *JobError `json:"failed,omitempty"` }
func (*JobStatus) UnmarshalJSON ¶
type LinkMetadata ¶
type LinkMetadata struct { Tag string `json:".tag"` Path *PathLinkMetadata `json:"path,omitempty"` Collection *CollectionLinkMetadata `json:"collection,omitempty"` }
Metadata for a shared link. This can be either a `PathLinkMetadata` or `CollectionLinkMetadata`.
func (*LinkMetadata) UnmarshalJSON ¶
func (u *LinkMetadata) UnmarshalJSON(body []byte) error
type LinkPermissions ¶
type LinkPermissions struct { // Whether the caller can revoke the shared link CanRevoke bool `json:"can_revoke"` // The current visibility of the link after considering the shared links // policies of the the team (in case the link's owner is part of a team) and // the shared folder (in case the linked file is part of a shared folder). This // field is shown only if the caller has access to this info (the link's owner // always has access to this data). ResolvedVisibility *ResolvedVisibility `json:"resolved_visibility,omitempty"` // The shared link's requested visibility. This can be overridden by the team // and shared folder policies. The final visibility, after considering these // policies, can be found in `resolved_visibility`. This is shown only if the // caller is the link's owner. RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"` // The failure reason for revoking the link. This field will only be present if // the `can_revoke` is `False`. RevokeFailureReason *SharedLinkAccessFailureReason `json:"revoke_failure_reason,omitempty"` }
func NewLinkPermissions ¶
func NewLinkPermissions(CanRevoke bool) *LinkPermissions
type ListFolderMembersArgs ¶
type ListFolderMembersArgs struct { string `json:"shared_folder_id"` // Member actions to query. Actions []*MemberAction `json:"actions,omitempty"` // The maximum number of results that include members, groups and invitees to // return per request. Limit uint32 `json:"limit"` }SharedFolderId
func NewListFolderMembersArgs ¶
func NewListFolderMembersArgs(SharedFolderId string) *ListFolderMembersArgs
type ListFolderMembersContinueArg ¶
type ListFolderMembersContinueArg struct { // The cursor returned by your last call to `ListFolderMembers` or // `ListFolderMembersContinue`. Cursor string `json:"cursor"` }
func NewListFolderMembersContinueArg ¶
func NewListFolderMembersContinueArg(Cursor string) *ListFolderMembersContinueArg
type ListFolderMembersContinueError ¶
type ListFolderMembersContinueError struct { Tag string `json:".tag"` AccessError *SharedFolderAccessError `json:"access_error,omitempty"` }
func (*ListFolderMembersContinueError) UnmarshalJSON ¶
func (u *ListFolderMembersContinueError) UnmarshalJSON(body []byte) error
type ListFolderMembersCursorArg ¶
type ListFolderMembersCursorArg struct { // Member actions to query. Actions []*MemberAction `json:"actions,omitempty"` // The maximum number of results that include members, groups and invitees to // return per request. Limit uint32 `json:"limit"` }
func NewListFolderMembersCursorArg ¶
func NewListFolderMembersCursorArg() *ListFolderMembersCursorArg
type ListFoldersArgs ¶
type ListFoldersArgs struct { // The maximum number of results to return per request. Limit uint32 `json:"limit"` // Folder actions to query. Actions []*FolderAction `json:"actions,omitempty"` }
func NewListFoldersArgs ¶
func NewListFoldersArgs() *ListFoldersArgs
type ListFoldersContinueArg ¶
type ListFoldersContinueArg struct { // The cursor returned by the previous API call specified in the endpoint // description. Cursor string `json:"cursor"` }
func NewListFoldersContinueArg ¶
func NewListFoldersContinueArg(Cursor string) *ListFoldersContinueArg
type ListFoldersContinueError ¶
type ListFoldersContinueError struct {
Tag string `json:".tag"`
}
type ListFoldersResult ¶
type ListFoldersResult struct { // List of all shared folders the authenticated user has access to. Entries []*SharedFolderMetadata `json:"entries"` // Present if there are additional shared folders that have not been returned // yet. Pass the cursor into the corresponding continue endpoint (either // `ListFoldersContinue` or `ListMountableFoldersContinue`) to list additional // folders. Cursor string `json:"cursor,omitempty"` }
Result for `ListFolders` or `ListMountableFolders`, depending on which endpoint was requested. Unmounted shared folders can be identified by the absence of `SharedFolderMetadata.path_lower`.
func NewListFoldersResult ¶
func NewListFoldersResult(Entries []*SharedFolderMetadata) *ListFoldersResult
type ListSharedLinksArg ¶
type ListSharedLinksArg struct { string `json:"path,omitempty"` Cursor string `json:"cursor,omitempty"` DirectOnly bool `json:"direct_only,omitempty"` }Path
func NewListSharedLinksArg ¶
func NewListSharedLinksArg() *ListSharedLinksArg
type ListSharedLinksError ¶
type ListSharedLinksError struct {}
func (*ListSharedLinksError) UnmarshalJSON ¶
func (u *ListSharedLinksError) UnmarshalJSON(body []byte) error
type ListSharedLinksResult ¶
type ListSharedLinksResult struct { SharedLinkMetadata `json:"links"` // yet. Pass the cursor into `ListSharedLinks` to retrieve them. HasMore bool `json:"has_more"` // Cursor is returned only if no path is given or the path is empty. Cursor string `json:"cursor,omitempty"` }Links []*
func NewListSharedLinksResult ¶
func NewListSharedLinksResult(Links []*SharedLinkMetadata, HasMore bool) *ListSharedLinksResult
type MemberAction ¶
type MemberAction struct {
Tag string `json:".tag"`
}
Actions that may be taken on members of a shared folder.
type MemberPermission ¶
type MemberPermission struct { // The action that the user may wish to take on the member. Action *MemberAction `json:"action"` // True if the user is allowed to take the action. Allow bool `json:"allow"` // The reason why the user is denied the permission. Not present if the action // is allowed Reason *PermissionDeniedReason `json:"reason,omitempty"` }
Whether the user is allowed to take the action on the associated member.
func NewMemberPermission ¶
func NewMemberPermission(Action *MemberAction, Allow bool) *MemberPermission
type MemberPolicy ¶
type MemberPolicy struct {
Tag string `json:".tag"`
}
Policy governing who can be a member of a shared folder. Only applicable to folders owned by a user on a team.
type MemberSelector ¶
type MemberSelector struct { Tag string `json:".tag"` // Dropbox account, team member, or group ID of member. DropboxId string `json:"dropbox_id,omitempty"` // E-mail address of member. Email string `json:"email,omitempty"` }
Includes different ways to identify a member of a shared folder.
func (*MemberSelector) UnmarshalJSON ¶
func (u *MemberSelector) UnmarshalJSON(body []byte) error
type MembershipInfo ¶
type MembershipInfo struct { // The access type for this member. AccessType *AccessLevel `json:"access_type"` // The permissions that requesting user has on this member. The set of // permissions corresponds to the MemberActions in the request. Permissions []*MemberPermission `json:"permissions,omitempty"` // Suggested name initials for a member. Initials string `json:"initials,omitempty"` // True if the member's access to the file is inherited from a parent folder. IsInherited bool `json:"is_inherited"` }
The information about a member of the shared folder.
func NewMembershipInfo ¶
func NewMembershipInfo(AccessType *AccessLevel) *MembershipInfo
type ModifySharedLinkSettingsArgs ¶
type ModifySharedLinkSettingsArgs struct { string `json:"url"` Settings *SharedLinkSettings `json:"settings"` }Url
func NewModifySharedLinkSettingsArgs ¶
func NewModifySharedLinkSettingsArgs(Url string, Settings *SharedLinkSettings) *ModifySharedLinkSettingsArgs
type ModifySharedLinkSettingsError ¶
type ModifySharedLinkSettingsError struct { SharedLinkSettingsError `json:"settings_error,omitempty"` }SettingsError *
func (*ModifySharedLinkSettingsError) UnmarshalJSON ¶
func (u *ModifySharedLinkSettingsError) UnmarshalJSON(body []byte) error
type MountFolderArg ¶
type MountFolderArg struct { string `json:"shared_folder_id"` }SharedFolderId
func NewMountFolderArg ¶
func NewMountFolderArg(SharedFolderId string) *MountFolderArg
type MountFolderError ¶
type MountFolderError struct { Tag string `json:".tag"` AccessError *SharedFolderAccessError `json:"access_error,omitempty"` }
func (*MountFolderError) UnmarshalJSON ¶
func (u *MountFolderError) UnmarshalJSON(body []byte) error
type PathLinkMetadata ¶
type PathLinkMetadata struct { // URL of the shared link. Url string `json:"url"` // Who can access the link. Visibility *Visibility `json:"visibility"` // Path in user's Dropbox. Path string `json:"path"` // Expiration time, if set. By default the link won't expire. Expires time.Time `json:"expires,omitempty"` }
Metadata for a path-based shared link.
func NewPathLinkMetadata ¶
func NewPathLinkMetadata(Url string, Visibility *Visibility, Path string) *PathLinkMetadata
type PendingUploadMode ¶
type PendingUploadMode struct {
Tag string `json:".tag"`
}
Flag to indicate pending upload default (for linking to not-yet-existing paths).
type PermissionDeniedReason ¶
type PermissionDeniedReason struct {
Tag string `json:".tag"`
}
Possible reasons the user is denied a permission.
type RelinquishFolderMembershipArg ¶
type RelinquishFolderMembershipArg struct { string `json:"shared_folder_id"` }SharedFolderId
func NewRelinquishFolderMembershipArg ¶
func NewRelinquishFolderMembershipArg(SharedFolderId string) *RelinquishFolderMembershipArg
type RelinquishFolderMembershipError ¶
type RelinquishFolderMembershipError struct { Tag string `json:".tag"` AccessError *SharedFolderAccessError `json:"access_error,omitempty"` }
func (*RelinquishFolderMembershipError) UnmarshalJSON ¶
func (u *RelinquishFolderMembershipError) UnmarshalJSON(body []byte) error
type RemoveFolderMemberArg ¶
type RemoveFolderMemberArg struct { string `json:"shared_folder_id"` // The member to remove from the folder. Member *MemberSelector `json:"member"` // If true, the removed user will keep their copy of the folder after it's // unshared, assuming it was mounted. Otherwise, it will be removed from their // Dropbox. Also, this must be set to false when kicking a group. LeaveACopy bool `json:"leave_a_copy"` }SharedFolderId
func NewRemoveFolderMemberArg ¶
func NewRemoveFolderMemberArg(SharedFolderId string, Member *MemberSelector, LeaveACopy bool) *RemoveFolderMemberArg
type RemoveFolderMemberError ¶
type RemoveFolderMemberError struct { Tag string `json:".tag"` AccessError *SharedFolderAccessError `json:"access_error,omitempty"` MemberError *SharedFolderMemberError `json:"member_error,omitempty"` }
func (*RemoveFolderMemberError) UnmarshalJSON ¶
func (u *RemoveFolderMemberError) UnmarshalJSON(body []byte) error
type RequestedVisibility ¶
type RequestedVisibility struct {
Tag string `json:".tag"`
}
The access permission that can be requested by the caller for the shared link. Note that the final resolved visibility of the shared link takes into account other aspects, such as team and shared folder settings. Check the `ResolvedVisibility` for more info on the possible resolved visibility values of shared links.
type ResolvedVisibility ¶
type ResolvedVisibility struct {
Tag string `json:".tag"`
}
The actual access permissions values of shared links after taking into account user preferences and the team and shared folder settings. Check the `RequestedVisibility` for more info on the possible visibility values that can be set by the shared link's owner.
type RevokeSharedLinkArg ¶
type RevokeSharedLinkArg struct { string `json:"url"` }Url
func NewRevokeSharedLinkArg ¶
func NewRevokeSharedLinkArg(Url string) *RevokeSharedLinkArg
type RevokeSharedLinkError ¶
type RevokeSharedLinkError struct {
}type ShareFolderArg ¶
type ShareFolderArg struct { // created. Path string `json:"path"` // user is on a team. MemberPolicy *MemberPolicy `json:"member_policy"` AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy"` // folder. The current user must be on a team to set this policy to // `SharedLinkPolicy.members`. SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy"` ForceAsync bool `json:"force_async"` }
func NewShareFolderArg ¶
func NewShareFolderArg(Path string) *ShareFolderArg
type ShareFolderError ¶
type ShareFolderError struct { SharePathError `json:"bad_path,omitempty"` }BadPath *
func (*ShareFolderError) UnmarshalJSON ¶
func (u *ShareFolderError) UnmarshalJSON(body []byte) error
type ShareFolderJobStatus ¶
type ShareFolderJobStatus struct { // The share job has finished. The value is the metadata for the folder. }
func (*ShareFolderJobStatus) UnmarshalJSON ¶
func (u *ShareFolderJobStatus) UnmarshalJSON(body []byte) error
type ShareFolderLaunch ¶
type ShareFolderLaunch struct {}
func (*ShareFolderLaunch) UnmarshalJSON ¶
func (u *ShareFolderLaunch) UnmarshalJSON(body []byte) error
type SharePathError ¶
type SharePathError struct {
}type SharedFolderAccessError ¶
type SharedFolderAccessError struct {
}There is an error accessing the shared folder.
type SharedFolderMemberError ¶
type SharedFolderMemberError struct {
}type SharedFolderMembers ¶
type SharedFolderMembers struct { UserMembershipInfo `json:"users"` Groups []*GroupMembershipInfo `json:"groups"` // invitees that have already accepted or declined to join the shared folder. Invitees []*InviteeMembershipInfo `json:"invitees"` // returned yet. Pass the cursor into `ListFolderMembersContinue` to list // additional members. Cursor string `json:"cursor,omitempty"` }Users []*
Shared folder user and group membership.
func NewSharedFolderMembers ¶
func NewSharedFolderMembers(Users []*UserMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFolderMembers
type SharedFolderMetadata ¶
type SharedFolderMetadata struct { AccessLevel `json:"access_type"` // <https://www.dropbox.com/en/help/986>. IsTeamFolder bool `json:"is_team_folder"` Policy *FolderPolicy `json:"policy"` Name string `json:"name"` SharedFolderId string `json:"shared_folder_id"` // of permissions corresponds to the FolderActions in the request. Permissions []*FolderPermission `json:"permissions,omitempty"` // not owned by a team. OwnerTeam *users.Team `json:"owner_team,omitempty"` // is contained within another shared folder. ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"` // folders. PathLower string `json:"path_lower,omitempty"` }AccessType *
The metadata which includes basic information about the shared folder.
func NewSharedFolderMetadata ¶
func NewSharedFolderMetadata(AccessType *AccessLevel, IsTeamFolder bool, Policy *FolderPolicy, Name string, SharedFolderId string) *SharedFolderMetadata
type SharedFolderMetadataBase ¶
type SharedFolderMetadataBase struct { AccessLevel `json:"access_type"` // <https://www.dropbox.com/en/help/986>. IsTeamFolder bool `json:"is_team_folder"` Policy *FolderPolicy `json:"policy"` // of permissions corresponds to the FolderActions in the request. Permissions []*FolderPermission `json:"permissions,omitempty"` // not owned by a team. OwnerTeam *users.Team `json:"owner_team,omitempty"` // is contained within another shared folder. ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"` }AccessType *
Properties of the shared folder.
func NewSharedFolderMetadataBase ¶
func NewSharedFolderMetadataBase(AccessType *AccessLevel, IsTeamFolder bool, Policy *FolderPolicy) *SharedFolderMetadataBase
type SharedLinkAccessFailureReason ¶
type SharedLinkAccessFailureReason struct {
}type SharedLinkError ¶
type SharedLinkError struct {
}type SharedLinkMetadata ¶
type SharedLinkMetadata struct {}
The metadata of a shared link
func (*SharedLinkMetadata) UnmarshalJSON ¶
func (u *SharedLinkMetadata) UnmarshalJSON(body []byte) error
type SharedLinkPolicy ¶
type SharedLinkPolicy struct {
}Policy governing who can view shared links.
type SharedLinkSettings ¶
type SharedLinkSettings struct { RequestedVisibility `json:"requested_visibility,omitempty"` // to specify the password to access the link. LinkPassword string `json:"link_password,omitempty"` Expires time.Time `json:"expires,omitempty"` }RequestedVisibility *
func NewSharedLinkSettings ¶
func NewSharedLinkSettings() *SharedLinkSettings
type SharedLinkSettingsError ¶
type SharedLinkSettingsError struct {
}type Sharing ¶
type Sharing interface { // Allows an owner or editor (if the ACL update policy allows) of a shared // folder to add another member. For the new member to get access to all the // functionality for this folder, you will need to call `MountFolder` on their // behalf. Apps must have full Dropbox access to use this endpoint. Warning: // This endpoint is in beta and is subject to minor but possibly // backwards-incompatible changes. AddFolderMember(arg *AddFolderMemberArg) (err error) // Returns the status of an asynchronous job. Apps must have full Dropbox // access to use this endpoint. Warning: This endpoint is in beta and is // subject to minor but possibly backwards-incompatible changes. CheckJobStatus(arg *async.PollArg) (res *JobStatus, err error) // have full Dropbox access to use this endpoint. Warning: This endpoint is in // beta and is subject to minor but possibly backwards-incompatible changes. CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJobStatus, err error) // that link is returned. Note that in the returned `PathLinkMetadata`, the // `PathLinkMetadata.url` field is the shortened URL if // `CreateSharedLinkArg.short_url` argument is set to `True`. Previously, it // was technically possible to break a shared link by moving or renaming the // corresponding file or folder. In the future, this will no longer be the // case, so your app shouldn't rely on this behavior. Instead, if your app // needs to revoke a shared link, use `RevokeSharedLink`. CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMetadata, err error) // default visibility is `RequestedVisibility.public` (The resolved visibility, // though, may depend on other aspects such as team and shared folder // settings). CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettingsArg) (res *SharedLinkMetadata, err error) // Returns shared folder metadata by its folder ID. Apps must have full Dropbox // access to use this endpoint. Warning: This endpoint is in beta and is // subject to minor but possibly backwards-incompatible changes. GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMetadata, err error) GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res *SharedLinkMetadata, content io.ReadCloser, err error) GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res *SharedLinkMetadata, err error) // links. If no path is given or the path is empty, returns a list of all // shared links for the current user, including collection links. If a // non-empty path is given, returns a list of all shared links that allow // access to the given path. Collection links are never returned in this case. // Note that the url field in the response is never the shortened URL. GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksResult, err error) // Returns shared folder membership by its folder ID. Apps must have full // Dropbox access to use this endpoint. Warning: This endpoint is in beta and // is subject to minor but possibly backwards-incompatible changes. ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFolderMembers, err error) // Once a cursor has been retrieved from `ListFolderMembers`, use this to // paginate through all shared folder members. Apps must have full Dropbox // access to use this endpoint. Warning: This endpoint is in beta and is // subject to minor but possibly backwards-incompatible changes. ListFolderMembersContinue(arg *ListFolderMembersContinueArg) (res *SharedFolderMembers, err error) // Return the list of all shared folders the current user has access to. Apps // must have full Dropbox access to use this endpoint. Warning: This endpoint // is in beta and is subject to minor but possibly backwards-incompatible // changes. ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) // Once a cursor has been retrieved from `ListFolders`, use this to paginate // through all shared folders. The cursor must come from a previous call to // `ListFolders` or `ListFoldersContinue`. Apps must have full Dropbox access // to use this endpoint. Warning: This endpoint is in beta and is subject to // minor but possibly backwards-incompatible changes. ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) // Return the list of all shared folders the current user can mount or unmount. // Apps must have full Dropbox access to use this endpoint. ListMountableFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) // Once a cursor has been retrieved from `ListMountableFolders`, use this to // paginate through all mountable shared folders. The cursor must come from a // previous call to `ListMountableFolders` or `ListMountableFoldersContinue`. // Apps must have full Dropbox access to use this endpoint. ListMountableFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) // returns a list of all shared links for the current user. If a non-empty path // is given, returns a list of all shared links that allow access to the given // path - direct links to the given path and links to parent folders of the // given path. Links to parent folders can be suppressed by setting direct_only // to true. ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLinksResult, err error) // the shared links policy of the team or the shared folder (in case the linked // file is part of a shared folder) then the // `LinkPermissions.resolved_visibility` of the returned `SharedLinkMetadata` // will reflect the actual visibility of the shared link and the // `LinkPermissions.requested_visibility` will reflect the requested // visibility. ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs) (res *SharedLinkMetadata, err error) // The current user mounts the designated folder. Mount a shared folder for a // user after they have been added as a member. Once mounted, the shared folder // will appear in their Dropbox. Apps must have full Dropbox access to use this // endpoint. Warning: This endpoint is in beta and is subject to minor but // possibly backwards-incompatible changes. MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata, err error) // The current user relinquishes their membership in the designated shared // folder and will no longer have access to the folder. A folder owner cannot // relinquish membership in their own folder. Apps must have full Dropbox // access to use this endpoint. Warning: This endpoint is in beta and is // subject to minor but possibly backwards-incompatible changes. RelinquishFolderMembership(arg *RelinquishFolderMembershipArg) (err error) // Allows an owner or editor (if the ACL update policy allows) of a shared // folder to remove another member. Apps must have full Dropbox access to use // this endpoint. Warning: This endpoint is in beta and is subject to minor but // possibly backwards-incompatible changes. RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.LaunchEmptyResult, err error) // the file may be accessible if there are shared links leading to any of the // file parent folders. To list all shared links that enable access to a // specific file, you can use the `ListSharedLinks` with the file as the // `ListSharedLinksArg.path` argument. RevokeSharedLink(arg *RevokeSharedLinkArg) (err error) // synchronously. Large folders will be completed asynchronously. To make // testing the async case repeatable, set `ShareFolderArg.force_async`. If a // `ShareFolderLaunch.async_job_id` is returned, you'll need to call // `CheckShareJobStatus` until the action completes to get the metadata for the // folder. Apps must have full Dropbox access to use this endpoint. Warning: // This endpoint is in beta and is subject to minor but possibly // backwards-incompatible changes. ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, err error) // Transfer ownership of a shared folder to a member of the shared folder. User // must have `AccessLevel.owner` access to the shared folder to perform a // transfer. Apps must have full Dropbox access to use this endpoint. Warning: // This endpoint is in beta and is subject to minor but possibly // backwards-incompatible changes. TransferFolder(arg *TransferFolderArg) (err error) // The current user unmounts the designated folder. They can re-mount the // folder at a later time using `MountFolder`. Apps must have full Dropbox // access to use this endpoint. Warning: This endpoint is in beta and is // subject to minor but possibly backwards-incompatible changes. UnmountFolder(arg *UnmountFolderArg) (err error) // `CheckJobStatus` to determine if the action has completed successfully. Apps // must have full Dropbox access to use this endpoint. Warning: This endpoint // is in beta and is subject to minor but possibly backwards-incompatible // changes. UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmptyResult, err error) // Allows an owner or editor of a shared folder to update another member's // permissions. Apps must have full Dropbox access to use this endpoint. // Warning: This endpoint is in beta and is subject to minor but possibly // backwards-incompatible changes. UpdateFolderMember(arg *UpdateFolderMemberArg) (err error) // Update the sharing policies for a shared folder. User must have // `AccessLevel.owner` access to the shared folder to update its policies. Apps // must have full Dropbox access to use this endpoint. Warning: This endpoint // is in beta and is subject to minor but possibly backwards-incompatible // changes. UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedFolderMetadata, err error) }
type TeamMemberInfo ¶
type TeamMemberInfo struct { // Information about the member's team TeamInfo *users.Team `json:"team_info"` // The display name of the user. DisplayName string `json:"display_name"` // ID of user as a member of a team. This field will only be present if the // member is in the same team as current user. MemberId string `json:"member_id,omitempty"` }
Information about a team member.
func NewTeamMemberInfo ¶
func NewTeamMemberInfo(TeamInfo *users.Team, DisplayName string) *TeamMemberInfo
type TransferFolderArg ¶
type TransferFolderArg struct { string `json:"shared_folder_id"` // A account or team member ID to transfer ownership to. ToDropboxId string `json:"to_dropbox_id"` }SharedFolderId
func NewTransferFolderArg ¶
func NewTransferFolderArg(SharedFolderId string, ToDropboxId string) *TransferFolderArg
type TransferFolderError ¶
type TransferFolderError struct { Tag string `json:".tag"` AccessError *SharedFolderAccessError `json:"access_error,omitempty"` }
func (*TransferFolderError) UnmarshalJSON ¶
func (u *TransferFolderError) UnmarshalJSON(body []byte) error
type UnmountFolderArg ¶
type UnmountFolderArg struct { string `json:"shared_folder_id"` }SharedFolderId
func NewUnmountFolderArg ¶
func NewUnmountFolderArg(SharedFolderId string) *UnmountFolderArg
type UnmountFolderError ¶
type UnmountFolderError struct { Tag string `json:".tag"` AccessError *SharedFolderAccessError `json:"access_error,omitempty"` }
func (*UnmountFolderError) UnmarshalJSON ¶
func (u *UnmountFolderError) UnmarshalJSON(body []byte) error
type UnshareFolderArg ¶
type UnshareFolderArg struct { string `json:"shared_folder_id"` // it's unshared. Otherwise, it will be removed from their Dropbox. The current // user, who is an owner, will always retain their copy. LeaveACopy bool `json:"leave_a_copy"` }SharedFolderId
func NewUnshareFolderArg ¶
func NewUnshareFolderArg(SharedFolderId string) *UnshareFolderArg
type UnshareFolderError ¶
type UnshareFolderError struct {}
func (*UnshareFolderError) UnmarshalJSON ¶
func (u *UnshareFolderError) UnmarshalJSON(body []byte) error
type UpdateFolderMemberArg ¶
type UpdateFolderMemberArg struct { string `json:"shared_folder_id"` // The member of the shared folder to update. Only the // `MemberSelector.dropbox_id` may be set at this time. Member *MemberSelector `json:"member"` // The new access level for `member`. `AccessLevel.owner` is disallowed. AccessLevel *AccessLevel `json:"access_level"` }SharedFolderId
func NewUpdateFolderMemberArg ¶
func NewUpdateFolderMemberArg(SharedFolderId string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFolderMemberArg
type UpdateFolderMemberError ¶
type UpdateFolderMemberError struct { Tag string `json:".tag"` AccessError *SharedFolderAccessError `json:"access_error,omitempty"` MemberError *SharedFolderMemberError `json:"member_error,omitempty"` }
func (*UpdateFolderMemberError) UnmarshalJSON ¶
func (u *UpdateFolderMemberError) UnmarshalJSON(body []byte) error
type UpdateFolderPolicyArg ¶
type UpdateFolderPolicyArg struct { string `json:"shared_folder_id"` // Who can be a member of this shared folder. Only applicable if the current // user is on a team. MemberPolicy *MemberPolicy `json:"member_policy,omitempty"` // Who can add and remove members of this shared folder. AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy,omitempty"` // folder. The current user must be on a team to set this policy to // `SharedLinkPolicy.members`. SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"` }SharedFolderId
If any of the policy's are unset, then they retain their current setting.
func NewUpdateFolderPolicyArg ¶
func NewUpdateFolderPolicyArg(SharedFolderId string) *UpdateFolderPolicyArg
type UpdateFolderPolicyError ¶
type UpdateFolderPolicyError struct { Tag string `json:".tag"` AccessError *SharedFolderAccessError `json:"access_error,omitempty"` }
func (*UpdateFolderPolicyError) UnmarshalJSON ¶
func (u *UpdateFolderPolicyError) UnmarshalJSON(body []byte) error
type UserInfo ¶
type UserInfo struct { // The account ID of the user. AccountId string `json:"account_id"` // If the user is in the same team as current user. SameTeam bool `json:"same_team"` // The team member ID of the shared folder member. Only present if `same_team` // is true. TeamMemberId string `json:"team_member_id,omitempty"` }
Basic information about a user. Use `UsersAccount` and `UsersAccountBatch` to obtain more detailed information.
func NewUserInfo ¶
type UserMembershipInfo ¶
type UserMembershipInfo struct { // The access type for this member. AccessType *AccessLevel `json:"access_type"` // The account information for the membership user. User *UserInfo `json:"user"` // The permissions that requesting user has on this member. The set of // permissions corresponds to the MemberActions in the request. Permissions []*MemberPermission `json:"permissions,omitempty"` // Suggested name initials for a member. Initials string `json:"initials,omitempty"` // True if the member's access to the file is inherited from a parent folder. IsInherited bool `json:"is_inherited"` }
The information about a user member of the shared folder.
func NewUserMembershipInfo ¶
func NewUserMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserMembershipInfo
type Visibility ¶
type Visibility struct {
Tag string `json:".tag"`
}
Who can access a shared link. The most open visibility is `public`. The default depends on many aspects, such as team and user preferences and shared folder settings.