sharing

package
v0.0.0-...-b8f725d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

This namespace contains endpoints and data types for creating and managing shared links and shared folders.

Index

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 {
	// The ID for the shared folder.
	SharedFolderId 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"`
}

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 {
	// The path to share.
	Path string `json:"path"`
	// Whether to return a shortened URL.
	ShortUrl bool `json:"short_url"`
	// If it's okay to share a path that does not yet exist, set this to either
	// `PendingUploadMode.file` or `PendingUploadMode.folder` to indicate whether
	// to assume it's a file or folder.
	PendingUpload *PendingUploadMode `json:"pending_upload,omitempty"`
}

func NewCreateSharedLinkArg

func NewCreateSharedLinkArg(Path string) *CreateSharedLinkArg

type CreateSharedLinkError

type CreateSharedLinkError struct {
	Tag  string             `json:".tag"`
	Path *files.LookupError `json:"path,omitempty"`
}

func (*CreateSharedLinkError) UnmarshalJSON

func (u *CreateSharedLinkError) UnmarshalJSON(body []byte) error

type CreateSharedLinkWithSettingsArg

type CreateSharedLinkWithSettingsArg struct {
	// The path to be shared by the shared link
	Path string `json:"path"`
	// The requested settings for the newly created shared link
	Settings *SharedLinkSettings `json:"settings,omitempty"`
}

func NewCreateSharedLinkWithSettingsArg

func NewCreateSharedLinkWithSettingsArg(Path string) *CreateSharedLinkWithSettingsArg

type CreateSharedLinkWithSettingsError

type CreateSharedLinkWithSettingsError struct {
	Tag  string             `json:".tag"`
	Path *files.LookupError `json:"path,omitempty"`
	// There is an error with the given settings
	SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
}

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"`
	// Who links can be shared with.
	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 {
	// The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// Folder actions to query.
	Actions []*FolderAction `json:"actions,omitempty"`
}

func NewGetMetadataArgs

func NewGetMetadataArgs(SharedFolderId string) *GetMetadataArgs

type GetSharedLinkFileError

type GetSharedLinkFileError struct {
	Tag string `json:".tag"`
}

type GetSharedLinkMetadataArg

type GetSharedLinkMetadataArg struct {
	// URL of the shared link.
	Url string `json:"url"`
	// If the shared link is to a folder, this parameter can be used to retrieve
	// the metadata for a specific file or sub-folder in this folder. A relative
	// path should be used.
	Path string `json:"path,omitempty"`
	// If the shared link has a password, this parameter can be used.
	LinkPassword string `json:"link_password,omitempty"`
}

func NewGetSharedLinkMetadataArg

func NewGetSharedLinkMetadataArg(Url string) *GetSharedLinkMetadataArg

type GetSharedLinksArg

type GetSharedLinksArg struct {
	// See `GetSharedLinks` description.
	Path string `json:"path,omitempty"`
}

func NewGetSharedLinksArg

func NewGetSharedLinksArg() *GetSharedLinksArg

type GetSharedLinksError

type GetSharedLinksError struct {
	Tag  string `json:".tag"`
	Path string `json:"path,omitempty"`
}

func (*GetSharedLinksError) UnmarshalJSON

func (u *GetSharedLinksError) UnmarshalJSON(body []byte) error

type GetSharedLinksResult

type GetSharedLinksResult struct {
	// Shared links applicable to the path argument.
	Links []*LinkMetadata `json:"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.

func NewGroupInfo

func NewGroupInfo(GroupName string, GroupId string, MemberCount uint32, GroupType *team.GroupType, SameTeam bool) *GroupInfo

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"`
	// Error occurred while performing `UnshareFolder` action.
	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

func (u *JobError) UnmarshalJSON(body []byte) error

type JobStatus

type JobStatus struct {
	Tag string `json:".tag"`
	// The asynchronous job returned an error.
	Failed *JobError `json:"failed,omitempty"`
}

func (*JobStatus) UnmarshalJSON

func (u *JobStatus) UnmarshalJSON(body []byte) error

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 {
	// The ID for the shared folder.
	SharedFolderId 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"`
}

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 {
	// See `ListSharedLinks` description.
	Path string `json:"path,omitempty"`
	// The cursor returned by your last call to `ListSharedLinks`.
	Cursor string `json:"cursor,omitempty"`
	// See `ListSharedLinks` description.
	DirectOnly bool `json:"direct_only,omitempty"`
}

func NewListSharedLinksArg

func NewListSharedLinksArg() *ListSharedLinksArg

type ListSharedLinksError

type ListSharedLinksError struct {
	Tag  string             `json:".tag"`
	Path *files.LookupError `json:"path,omitempty"`
}

func (*ListSharedLinksError) UnmarshalJSON

func (u *ListSharedLinksError) UnmarshalJSON(body []byte) error

type ListSharedLinksResult

type ListSharedLinksResult struct {
	// Shared links applicable to the path argument.
	Links []*SharedLinkMetadata `json:"links"`
	// Is true if there are additional shared links that have not been returned
	// yet. Pass the cursor into `ListSharedLinks` to retrieve them.
	HasMore bool `json:"has_more"`
	// Pass the cursor into `ListSharedLinks` to obtain the additional links.
	// Cursor is returned only if no path is given or the path is empty.
	Cursor string `json:"cursor,omitempty"`
}

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 {
	// URL of the shared link to change its settings
	Url string `json:"url"`
	// Set of settings for the shared link.
	Settings *SharedLinkSettings `json:"settings"`
}

func NewModifySharedLinkSettingsArgs

func NewModifySharedLinkSettingsArgs(Url string, Settings *SharedLinkSettings) *ModifySharedLinkSettingsArgs

type ModifySharedLinkSettingsError

type ModifySharedLinkSettingsError struct {
	Tag string `json:".tag"`
	// There is an error with the given settings
	SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
}

func (*ModifySharedLinkSettingsError) UnmarshalJSON

func (u *ModifySharedLinkSettingsError) UnmarshalJSON(body []byte) error

type MountFolderArg

type MountFolderArg struct {
	// The ID of the shared folder to mount.
	SharedFolderId string `json:"shared_folder_id"`
}

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 {
	// The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
}

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 {
	// The ID for the shared folder.
	SharedFolderId 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"`
}

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 {
	// URL of the shared link.
	Url string `json:"url"`
}

func NewRevokeSharedLinkArg

func NewRevokeSharedLinkArg(Url string) *RevokeSharedLinkArg

type RevokeSharedLinkError

type RevokeSharedLinkError struct {
	Tag string `json:".tag"`
}

type ShareFolderArg

type ShareFolderArg struct {
	// The path to the folder to share. If it does not exist, then a new one is
	// created.
	Path string `json:"path"`
	// Who can be a member of this shared folder. Only applicable if the current
	// user is on a team.
	MemberPolicy *MemberPolicy `json:"member_policy"`
	// Who can add and remove members of this shared folder.
	AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy"`
	// The policy to apply to shared links created for content inside this shared
	// folder.  The current user must be on a team to set this policy to
	// `SharedLinkPolicy.members`.
	SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy"`
	// Whether to force the share to happen asynchronously.
	ForceAsync bool `json:"force_async"`
}

func NewShareFolderArg

func NewShareFolderArg(Path string) *ShareFolderArg

type ShareFolderError

type ShareFolderError struct {
	Tag string `json:".tag"`
	// `ShareFolderArg.path` is invalid.
	BadPath *SharePathError `json:"bad_path,omitempty"`
}

func (*ShareFolderError) UnmarshalJSON

func (u *ShareFolderError) UnmarshalJSON(body []byte) error

type ShareFolderJobStatus

type ShareFolderJobStatus struct {
	Tag string `json:".tag"`
	// The share job has finished. The value is the metadata for the folder.
	Complete *SharedFolderMetadata `json:"complete,omitempty"`
	Failed   *ShareFolderError     `json:"failed,omitempty"`
}

func (*ShareFolderJobStatus) UnmarshalJSON

func (u *ShareFolderJobStatus) UnmarshalJSON(body []byte) error

type ShareFolderLaunch

type ShareFolderLaunch struct {
	Tag      string                `json:".tag"`
	Complete *SharedFolderMetadata `json:"complete,omitempty"`
}

func (*ShareFolderLaunch) UnmarshalJSON

func (u *ShareFolderLaunch) UnmarshalJSON(body []byte) error

type SharePathError

type SharePathError struct {
	Tag string `json:".tag"`
}

type SharedFolderAccessError

type SharedFolderAccessError struct {
	Tag string `json:".tag"`
}

There is an error accessing the shared folder.

type SharedFolderMemberError

type SharedFolderMemberError struct {
	Tag string `json:".tag"`
}

type SharedFolderMembers

type SharedFolderMembers struct {
	// The list of user members of the shared folder.
	Users []*UserMembershipInfo `json:"users"`
	// The list of group members of the shared folder.
	Groups []*GroupMembershipInfo `json:"groups"`
	// The list of invited members of the shared folder. This list will not include
	// invitees that have already accepted or declined to join the shared folder.
	Invitees []*InviteeMembershipInfo `json:"invitees"`
	// Present if there are additional shared folder members that have not been
	// returned yet. Pass the cursor into `ListFolderMembersContinue` to list
	// additional members.
	Cursor string `json:"cursor,omitempty"`
}

Shared folder user and group membership.

func NewSharedFolderMembers

func NewSharedFolderMembers(Users []*UserMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFolderMembers

type SharedFolderMetadata

type SharedFolderMetadata struct {
	// The current user's access level for this shared folder.
	AccessType *AccessLevel `json:"access_type"`
	// Whether this folder is a `team folder`
	// <https://www.dropbox.com/en/help/986>.
	IsTeamFolder bool `json:"is_team_folder"`
	// Policies governing this shared folder.
	Policy *FolderPolicy `json:"policy"`
	// The name of the this shared folder.
	Name string `json:"name"`
	// The ID of the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// Actions the current user may perform on the folder and its contents. The set
	// of permissions corresponds to the FolderActions in the request.
	Permissions []*FolderPermission `json:"permissions,omitempty"`
	// The team that owns the folder. This field is not present if the folder is
	// not owned by a team.
	OwnerTeam *users.Team `json:"owner_team,omitempty"`
	// The ID of the parent shared folder. This field is present only if the folder
	// is contained within another shared folder.
	ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
	// The lower-cased full path of this shared folder. Absent for unmounted
	// folders.
	PathLower string `json:"path_lower,omitempty"`
}

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 {
	// The current user's access level for this shared folder.
	AccessType *AccessLevel `json:"access_type"`
	// Whether this folder is a `team folder`
	// <https://www.dropbox.com/en/help/986>.
	IsTeamFolder bool `json:"is_team_folder"`
	// Policies governing this shared folder.
	Policy *FolderPolicy `json:"policy"`
	// Actions the current user may perform on the folder and its contents. The set
	// of permissions corresponds to the FolderActions in the request.
	Permissions []*FolderPermission `json:"permissions,omitempty"`
	// The team that owns the folder. This field is not present if the folder is
	// not owned by a team.
	OwnerTeam *users.Team `json:"owner_team,omitempty"`
	// The ID of the parent shared folder. This field is present only if the folder
	// is contained within another shared folder.
	ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
}

Properties of the shared folder.

func NewSharedFolderMetadataBase

func NewSharedFolderMetadataBase(AccessType *AccessLevel, IsTeamFolder bool, Policy *FolderPolicy) *SharedFolderMetadataBase

type SharedLinkAccessFailureReason

type SharedLinkAccessFailureReason struct {
	Tag string `json:".tag"`
}

type SharedLinkError

type SharedLinkError struct {
	Tag string `json:".tag"`
}

type SharedLinkMetadata

type SharedLinkMetadata struct {
	Tag    string              `json:".tag"`
	File   *FileLinkMetadata   `json:"file,omitempty"`
	Folder *FolderLinkMetadata `json:"folder,omitempty"`
}

The metadata of a shared link

func (*SharedLinkMetadata) UnmarshalJSON

func (u *SharedLinkMetadata) UnmarshalJSON(body []byte) error

type SharedLinkPolicy

type SharedLinkPolicy struct {
	Tag string `json:".tag"`
}

Policy governing who can view shared links.

type SharedLinkSettings

type SharedLinkSettings struct {
	// The requested access for this shared link.
	RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"`
	// If `requested_visibility` is `RequestedVisibility.password` this is needed
	// to specify the password to access the link.
	LinkPassword string `json:"link_password,omitempty"`
	// Expiration time of the shared link. By default the link won't expire.
	Expires time.Time `json:"expires,omitempty"`
}

func NewSharedLinkSettings

func NewSharedLinkSettings() *SharedLinkSettings

type SharedLinkSettingsError

type SharedLinkSettingsError struct {
	Tag string `json:".tag"`
}

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)
	// Returns the status of an asynchronous job for sharing a 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.
	CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJobStatus, err error)
	// Create a shared link. If a shared link already exists for the given path,
	// 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)
	// Create a shared link with custom settings. If no settings are given then the
	// 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)
	// Download the shared link's file from a user's Dropbox.
	GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res *SharedLinkMetadata, content io.ReadCloser, err error)
	// Get the shared link's metadata.
	GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res *SharedLinkMetadata, err error)
	// Returns a list of `LinkMetadata` objects for this user, including collection
	// 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)
	// List shared links of this user. If no path is given or the path is empty,
	// 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)
	// Modify the shared link's settings. If the requested visibility conflict with
	// 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)
	// Revoke a shared link. Note that even after revoking a shared link to a file,
	// 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)
	// Share a folder with collaborators. Most sharing will be completed
	// 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)
	// Allows a shared folder owner to unshare the folder. You'll need to call
	// `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 {
	// The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// A account or team member ID to transfer ownership to.
	ToDropboxId string `json:"to_dropbox_id"`
}

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 {
	// The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
}

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 {
	// The ID for the shared folder.
	SharedFolderId string `json:"shared_folder_id"`
	// If true, members of this shared folder will get a copy of this folder after
	// 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"`
}

func NewUnshareFolderArg

func NewUnshareFolderArg(SharedFolderId string) *UnshareFolderArg

type UnshareFolderError

type UnshareFolderError struct {
	Tag         string                   `json:".tag"`
	AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
}

func (*UnshareFolderError) UnmarshalJSON

func (u *UnshareFolderError) UnmarshalJSON(body []byte) error

type UpdateFolderMemberArg

type UpdateFolderMemberArg struct {
	// The ID for the shared folder.
	SharedFolderId 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"`
}

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 {
	// The ID for the shared folder.
	SharedFolderId 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"`
	// The policy to apply to shared links created for content inside this shared
	// folder. The current user must be on a team to set this policy to
	// `SharedLinkPolicy.members`.
	SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"`
}

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

func NewUserInfo(AccountId string, SameTeam bool) *UserInfo

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL