Documentation ¶
Index ¶
- Constants
- Variables
- func DropboxOAuthEndpoint() oauth2.Endpoint
- func IsTeamScope(scope string) bool
- func NewConsoleNoAuth(peerName string) api_auth.Console
- func NewLegacyApp(ctl app_control.Control) api_auth.App
- func NewMock(peerName string) api_auth.Console
- func NewMockWithPreset(peerName string, preset map[string]*oauth2.Token) api_auth.Console
- func NewScopedIndividual(ctl app_control.Control) api_auth.App
- func NewScopedTeam(ctl app_control.Control) api_auth.App
- type Legacy
- type MockConsoleAuth
- type MockContext
- type NoAuth
- type Scoped
Constants ¶
View Source
const ( // ScopeAccountInfoRead Read Dropbox account information ScopeAccountInfoRead = "account_info.read" // ScopeAccountInfoWrite Create, modify, and delete Dropbox account information ScopeAccountInfoWrite = "account_info.write" // ScopeFilesContentRead Read file data ScopeFilesContentRead = "files.content.read" // ScopeFilesContentWrite Create, modify, and delete file data ScopeFilesContentWrite = "files.content.write" // ScopeFilesMetadataRead Read file metadata ScopeFilesMetadataRead = "files.metadata.read" // ScopeFilesMetadataWrite Create, modify, and delete file metadata ScopeFilesMetadataWrite = "files.metadata.write" // ScopeFilesPermanentDelete Permanently delete files ScopeFilesPermanentDelete = "files.permanent_delete" // ScopeSharingRead Read sharing policies and memberships ScopeSharingRead = "sharing.read" // ScopeSharingWrite Create, modify, or delete sharing policies and memberships ScopeSharingWrite = "sharing.write" // ScopeFileRequestsRead Read a user's file requests ScopeFileRequestsRead = "file_requests.read" // ScopeFileRequestsWrite Create, modify, or delete a user's file requests ScopeFileRequestsWrite = "file_requests.write" // ScopeContactsWrite Delete a user's manually added contacts ScopeContactsWrite = "contacts.write" )
Individual Scopes
View Source
const ( // ScopeTeamInfoRead Read basic team settings ScopeTeamInfoRead = "team_info.read" // ScopeMembersRead Read team memberships and member settings ScopeMembersRead = "members.read" // ScopeMembersWrite Add, modify, and suspend team members ScopeMembersWrite = "members.write" // ScopeMembersDelete Delete team members ScopeMembersDelete = "members.delete" // ScopeGroupsRead Read groups and their memberships ScopeGroupsRead = "groups.read" // ScopeGroupsWrite Create, modify, and delete groups ScopeGroupsWrite = "groups.write" // ScopeSessionsList View linked web, device, and app sessions ScopeSessionsList = "sessions.list" // ScopeSessionsModify Unlink web, device, and app sessions ScopeSessionsModify = "sessions.modify" // ScopeTeamDataMember Access data of other team members ScopeTeamDataMember = "team_data.member" // ScopeTeamDataTeamSpace Manage the team space ScopeTeamDataTeamSpace = "team_data.team_space" // ScopeEventsRead Read the team event log ScopeEventsRead = "events.read" )
Team Scopes
Variables ¶
View Source
var (
ErrorNoAuthDefined = errors.New("no auth defined")
)
View Source
var ( ScopeIndividual = []string{ ScopeAccountInfoRead, ScopeAccountInfoWrite, ScopeContactsWrite, ScopeFileRequestsRead, ScopeFileRequestsWrite, ScopeFilesContentRead, ScopeFilesContentWrite, ScopeFilesMetadataRead, ScopeFilesMetadataWrite, ScopeFilesPermanentDelete, ScopeSharingRead, ScopeSharingWrite, } )
Functions ¶
func DropboxOAuthEndpoint ¶
func IsTeamScope ¶
func NewConsoleNoAuth ¶
func NewLegacyApp ¶
func NewLegacyApp(ctl app_control.Control) api_auth.App
func NewMockWithPreset ¶
func NewScopedIndividual ¶
func NewScopedIndividual(ctl app_control.Control) api_auth.App
func NewScopedTeam ¶
func NewScopedTeam(ctl app_control.Control) api_auth.App
Types ¶
type MockConsoleAuth ¶
type MockConsoleAuth struct {
// contains filtered or unexported fields
}
func (*MockConsoleAuth) Auth ¶
func (z *MockConsoleAuth) Auth(scopes []string) (token api_auth.Context, err error)
func (*MockConsoleAuth) PeerName ¶
func (z *MockConsoleAuth) PeerName() string
type MockContext ¶
type MockContext struct {
// contains filtered or unexported fields
}
func (*MockContext) Config ¶
func (z *MockContext) Config() *oauth2.Config
func (*MockContext) Description ¶
func (z *MockContext) Description() string
func (*MockContext) IsNoAuth ¶
func (z *MockContext) IsNoAuth() bool
func (*MockContext) PeerName ¶
func (z *MockContext) PeerName() string
func (*MockContext) Scopes ¶
func (z *MockContext) Scopes() []string
func (*MockContext) Supplemental ¶
func (z *MockContext) Supplemental() string
func (*MockContext) Token ¶
func (z *MockContext) Token() *oauth2.Token
Click to show internal directories.
Click to hide internal directories.