Documentation ¶
Overview ¶
Package common : has no documentation (yet)
Index ¶
Constants ¶
const ( PathRootHome = "home" PathRootRoot = "root" PathRootNamespaceId = "namespace_id" PathRootOther = "other" )
Valid tag values for PathRoot
const ( PathRootErrorInvalidRoot = "invalid_root" PathRootErrorNoPermission = "no_permission" PathRootErrorOther = "other" )
Valid tag values for PathRootError
const ( RootInfoTeam = "team" RootInfoUser = "user" )
Valid tag values for RootInfo
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IsRootInfo ¶
type IsRootInfo interface {
IsRootInfo()
}
IsRootInfo is the interface type for RootInfo and its subtypes
func IsRootInfoFromJSON ¶
func IsRootInfoFromJSON(data []byte) (IsRootInfo, error)
IsRootInfoFromJSON converts JSON to a concrete IsRootInfo instance
type PathRoot ¶
type PathRoot struct { dropbox.Tagged // Root : Paths are relative to the authenticating user's root namespace // (This results in `PathRootError.invalid_root` if the user's root // namespace has changed.). Root string `json:"root,omitempty"` // NamespaceId : Paths are relative to given namespace id (This results in // `PathRootError.no_permission` if you don't have access to this // namespace.). NamespaceId string `json:"namespace_id,omitempty"` }
PathRoot : has no documentation (yet)
func (*PathRoot) UnmarshalJSON ¶
UnmarshalJSON deserializes into a PathRoot instance
type PathRootError ¶
type PathRootError struct { dropbox.Tagged // InvalidRoot : The root namespace id in Dropbox-API-Path-Root header is // not valid. The value of this error is use's latest root info. InvalidRoot IsRootInfo `json:"invalid_root,omitempty"` }
PathRootError : has no documentation (yet)
func (*PathRootError) UnmarshalJSON ¶
func (u *PathRootError) UnmarshalJSON(body []byte) error
UnmarshalJSON deserializes into a PathRootError instance
type RootInfo ¶
type RootInfo struct { // RootNamespaceId : The namespace ID for user's root namespace. It will be // the namespace ID of the shared team root if the user is member of a team // with a separate team root. Otherwise it will be same as // `RootInfo.home_namespace_id`. RootNamespaceId string `json:"root_namespace_id"` // HomeNamespaceId : The namespace ID for user's home namespace. HomeNamespaceId string `json:"home_namespace_id"` }
RootInfo : Information about current user's root.
func NewRootInfo ¶
NewRootInfo returns a new RootInfo instance
func (*RootInfo) IsRootInfo ¶
func (u *RootInfo) IsRootInfo()
IsRootInfo implements the IsRootInfo interface
type TeamRootInfo ¶
type TeamRootInfo struct { RootInfo // HomePath : The path for user's home directory under the shared team root. HomePath string `json:"home_path"` }
TeamRootInfo : Root info when user is member of a team with a separate root namespace ID.
func NewTeamRootInfo ¶
func NewTeamRootInfo(RootNamespaceId string, HomeNamespaceId string, HomePath string) *TeamRootInfo
NewTeamRootInfo returns a new TeamRootInfo instance
type UserRootInfo ¶
type UserRootInfo struct {
RootInfo
}
UserRootInfo : Root info when user is not member of a team or the user is a member of a team and the team does not have a separate root namespace.
func NewUserRootInfo ¶
func NewUserRootInfo(RootNamespaceId string, HomeNamespaceId string) *UserRootInfo
NewUserRootInfo returns a new UserRootInfo instance