Documentation ¶
Overview ¶
Package users : This namespace contains endpoints and data types for user management.
Index ¶
- Constants
- type Account
- type BasicAccount
- type Client
- type FullAccount
- type FullTeam
- type GetAccountAPIError
- type GetAccountArg
- type GetAccountBatchAPIError
- type GetAccountBatchArg
- type GetAccountBatchError
- type GetAccountError
- type GetCurrentAccountAPIError
- type GetSpaceUsageAPIError
- type IndividualSpaceAllocation
- type Name
- type SpaceAllocation
- type SpaceUsage
- type Team
- type TeamSpaceAllocation
Constants ¶
const ( GetAccountBatchErrorNoAccount = "no_account" GetAccountBatchErrorOther = "other" )
Valid tag values for GetAccountBatchError
const ( GetAccountErrorNoAccount = "no_account" GetAccountErrorOther = "other" )
Valid tag values for GetAccountError
const ( SpaceAllocationIndividual = "individual" SpaceAllocationTeam = "team" SpaceAllocationOther = "other" )
Valid tag values for SpaceAllocation
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // AccountId : The user's unique Dropbox ID. AccountId string `json:"account_id"` // Name : Details of a user's name. Name *Name `json:"name"` // Email : The user's e-mail address. Do not rely on this without checking // the `email_verified` field. Even then, it's possible that the user has // since lost access to their e-mail. Email string `json:"email"` // EmailVerified : Whether the user has verified their e-mail address. EmailVerified bool `json:"email_verified"` // ProfilePhotoUrl : URL for the photo representing the user, if one is set. ProfilePhotoUrl string `json:"profile_photo_url,omitempty"` // Disabled : Whether the user has been disabled. Disabled bool `json:"disabled"` }
Account : The amount of detail revealed about an account depends on the user being queried and the user making the query.
type BasicAccount ¶
type BasicAccount struct { Account // IsTeammate : Whether this user is a teammate of the current user. If this // account is the current user's account, then this will be true. IsTeammate bool `json:"is_teammate"` // TeamMemberId : The user's unique team member id. This field will only be // present if the user is part of a team and `is_teammate` is true. TeamMemberId string `json:"team_member_id,omitempty"` }
BasicAccount : Basic information about any account.
func NewBasicAccount ¶
func NewBasicAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool, IsTeammate bool) *BasicAccount
NewBasicAccount returns a new BasicAccount instance
type Client ¶
type Client interface { // GetAccount : Get information about a user's account. GetAccount(arg *GetAccountArg) (res *BasicAccount, err error) // GetAccountBatch : Get information about multiple user accounts. At most // 300 accounts may be queried per request. GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error) // GetCurrentAccount : Get information about the current user's account. GetCurrentAccount() (res *FullAccount, err error) // GetSpaceUsage : Get the space usage information for the current user's // account. GetSpaceUsage() (res *SpaceUsage, err error) }
Client interface describes all routes in this namespace
type FullAccount ¶
type FullAccount struct { Account // Country : The user's two-letter country code, if available. Country codes // are based on `ISO 3166-1` <http://en.wikipedia.org/wiki/ISO_3166-1>. Country string `json:"country,omitempty"` // Locale : The language that the user specified. Locale tags will be `IETF // language tags` <http://en.wikipedia.org/wiki/IETF_language_tag>. Locale string `json:"locale"` // ReferralLink : The user's `referral link` // <https://www.dropbox.com/referrals>. ReferralLink string `json:"referral_link"` // Team : If this account is a member of a team, information about that // team. Team *FullTeam `json:"team,omitempty"` // TeamMemberId : This account's unique team member id. This field will only // be present if `team` is present. TeamMemberId string `json:"team_member_id,omitempty"` // IsPaired : Whether the user has a personal and work account. If the // current account is personal, then `team` will always be nil, but // `is_paired` will indicate if a work account is linked. IsPaired bool `json:"is_paired"` // AccountType : What type of account this user has. AccountType *users_common.AccountType `json:"account_type"` // RootInfo : The root info for this account. RootInfo common.IsRootInfo `json:"root_info"` }
FullAccount : Detailed information about the current user's account.
func NewFullAccount ¶
func NewFullAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool, Locale string, ReferralLink string, IsPaired bool, AccountType *users_common.AccountType, RootInfo common.IsRootInfo) *FullAccount
NewFullAccount returns a new FullAccount instance
func (*FullAccount) UnmarshalJSON ¶
func (u *FullAccount) UnmarshalJSON(b []byte) error
UnmarshalJSON deserializes into a FullAccount instance
type FullTeam ¶
type FullTeam struct { Team // SharingPolicies : Team policies governing sharing. SharingPolicies *team_policies.TeamSharingPolicies `json:"sharing_policies"` // OfficeAddinPolicy : Team policy governing the use of the Office Add-In. OfficeAddinPolicy *team_policies.OfficeAddInPolicy `json:"office_addin_policy"` }
FullTeam : Detailed information about a team.
func NewFullTeam ¶
func NewFullTeam(Id string, Name string, SharingPolicies *team_policies.TeamSharingPolicies, OfficeAddinPolicy *team_policies.OfficeAddInPolicy) *FullTeam
NewFullTeam returns a new FullTeam instance
type GetAccountAPIError ¶
type GetAccountAPIError struct { dropbox.APIError EndpointError *GetAccountError `json:"error"` }
GetAccountAPIError is an error-wrapper for the get_account route
type GetAccountArg ¶
type GetAccountArg struct { // AccountId : A user's account identifier. AccountId string `json:"account_id"` }
GetAccountArg : has no documentation (yet)
func NewGetAccountArg ¶
func NewGetAccountArg(AccountId string) *GetAccountArg
NewGetAccountArg returns a new GetAccountArg instance
type GetAccountBatchAPIError ¶
type GetAccountBatchAPIError struct { dropbox.APIError EndpointError *GetAccountBatchError `json:"error"` }
GetAccountBatchAPIError is an error-wrapper for the get_account_batch route
type GetAccountBatchArg ¶
type GetAccountBatchArg struct { // AccountIds : List of user account identifiers. Should not contain any // duplicate account IDs. AccountIds []string `json:"account_ids"` }
GetAccountBatchArg : has no documentation (yet)
func NewGetAccountBatchArg ¶
func NewGetAccountBatchArg(AccountIds []string) *GetAccountBatchArg
NewGetAccountBatchArg returns a new GetAccountBatchArg instance
type GetAccountBatchError ¶
type GetAccountBatchError struct { dropbox.Tagged // NoAccount : The value is an account ID specified in // `GetAccountBatchArg.account_ids` that does not exist. NoAccount string `json:"no_account,omitempty"` }
GetAccountBatchError : has no documentation (yet)
func (*GetAccountBatchError) UnmarshalJSON ¶
func (u *GetAccountBatchError) UnmarshalJSON(body []byte) error
UnmarshalJSON deserializes into a GetAccountBatchError instance
type GetAccountError ¶
GetAccountError : has no documentation (yet)
type GetCurrentAccountAPIError ¶
GetCurrentAccountAPIError is an error-wrapper for the get_current_account route
type GetSpaceUsageAPIError ¶
GetSpaceUsageAPIError is an error-wrapper for the get_space_usage route
type IndividualSpaceAllocation ¶
type IndividualSpaceAllocation struct { // Allocated : The total space allocated to the user's account (bytes). Allocated uint64 `json:"allocated"` }
IndividualSpaceAllocation : has no documentation (yet)
func NewIndividualSpaceAllocation ¶
func NewIndividualSpaceAllocation(Allocated uint64) *IndividualSpaceAllocation
NewIndividualSpaceAllocation returns a new IndividualSpaceAllocation instance
type Name ¶
type Name struct { // GivenName : Also known as a first name. GivenName string `json:"given_name"` // Surname : Also known as a last name or family name. Surname string `json:"surname"` // FamiliarName : Locale-dependent name. In the US, a person's familiar name // is their `given_name`, but elsewhere, it could be any combination of a // person's `given_name` and `surname`. FamiliarName string `json:"familiar_name"` // DisplayName : A name that can be used directly to represent the name of a // user's Dropbox account. DisplayName string `json:"display_name"` // AbbreviatedName : An abbreviated form of the person's name. Their // initials in most locales. AbbreviatedName string `json:"abbreviated_name"` }
Name : Representations for a person's name to assist with internationalization.
type SpaceAllocation ¶
type SpaceAllocation struct { dropbox.Tagged // Individual : The user's space allocation applies only to their individual // account. Individual *IndividualSpaceAllocation `json:"individual,omitempty"` // Team : The user shares space with other members of their team. Team *TeamSpaceAllocation `json:"team,omitempty"` }
SpaceAllocation : Space is allocated differently based on the type of account.
func (*SpaceAllocation) UnmarshalJSON ¶
func (u *SpaceAllocation) UnmarshalJSON(body []byte) error
UnmarshalJSON deserializes into a SpaceAllocation instance
type SpaceUsage ¶
type SpaceUsage struct { // Used : The user's total space usage (bytes). Used uint64 `json:"used"` // Allocation : The user's space allocation. Allocation *SpaceAllocation `json:"allocation"` }
SpaceUsage : Information about a user's space usage and quota.
func NewSpaceUsage ¶
func NewSpaceUsage(Used uint64, Allocation *SpaceAllocation) *SpaceUsage
NewSpaceUsage returns a new SpaceUsage instance
type Team ¶
type Team struct { // Id : The team's unique ID. Id string `json:"id"` // Name : The name of the team. Name string `json:"name"` }
Team : Information about a team.
type TeamSpaceAllocation ¶
type TeamSpaceAllocation struct { // Used : The total space currently used by the user's team (bytes). Used uint64 `json:"used"` // Allocated : The total space allocated to the user's team (bytes). Allocated uint64 `json:"allocated"` // UserWithinTeamSpaceAllocated : The total space allocated to the user // within its team allocated space (0 means that no restriction is imposed // on the user's quota within its team). UserWithinTeamSpaceAllocated uint64 `json:"user_within_team_space_allocated"` // UserWithinTeamSpaceLimitType : The type of the space limit imposed on the // team member (off, alert_only, stop_sync). UserWithinTeamSpaceLimitType *team_common.MemberSpaceLimitType `json:"user_within_team_space_limit_type"` }
TeamSpaceAllocation : has no documentation (yet)
func NewTeamSpaceAllocation ¶
func NewTeamSpaceAllocation(Used uint64, Allocated uint64, UserWithinTeamSpaceAllocated uint64, UserWithinTeamSpaceLimitType *team_common.MemberSpaceLimitType) *TeamSpaceAllocation
NewTeamSpaceAllocation returns a new TeamSpaceAllocation instance