directory

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GOOGLE_EMAIL_TYPE_USER = iota
	GOOGLE_EMAIL_TYPE_GROUP
	GOOGLE_EMAIL_TYPE_ALIAS
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Email     string
	GivenName string
	Surname   string
}

type AccountDirectory

type AccountDirectory interface {
	Accounts() map[string]Account // email -> Account
}

type AccountDirectoryMock

type AccountDirectoryMock struct {
	MockData []Account
}

func (*AccountDirectoryMock) Accounts

func (adm *AccountDirectoryMock) Accounts() map[string]Account

type DropboxDirectory

type DropboxDirectory struct {
	// contains filtered or unexported fields
}

func NewDropboxDirectory added in v1.3.5

func NewDropboxDirectory(ctx context.ExecutionContext) *DropboxDirectory

func (*DropboxDirectory) Accounts

func (d *DropboxDirectory) Accounts() map[string]Account

func (*DropboxDirectory) Groups

func (d *DropboxDirectory) Groups() map[string]Group

type EmailResolver added in v1.3.5

type EmailResolver interface {
	// Ensure email exist in the directory.
	EmailExist(email string) (bool, error)
}

type EmailResolverMock added in v1.3.5

type EmailResolverMock struct {
	MockData []string
}

func (*EmailResolverMock) EmailExist added in v1.3.5

func (erm *EmailResolverMock) EmailExist(email string) (bool, error)

type GoogleDirectory

type GoogleDirectory struct {
	// contains filtered or unexported fields
}

func CreateGoogleDirectoryForIntegrationTest added in v1.3.5

func CreateGoogleDirectoryForIntegrationTest() *GoogleDirectory

func NewGoogleDirectory added in v1.3.5

func NewGoogleDirectory(executionContext context.ExecutionContext) *GoogleDirectory

func NewGoogleDirectoryForTest added in v1.3.5

func NewGoogleDirectoryForTest(ga googleapps.GoogleApps) *GoogleDirectory

func (*GoogleDirectory) Accounts

func (g *GoogleDirectory) Accounts() map[string]Account

func (*GoogleDirectory) EmailExist added in v1.3.5

func (g *GoogleDirectory) EmailExist(email string) (bool, error)

func (*GoogleDirectory) Group

func (g *GoogleDirectory) Group(groupKey string) (Group, bool)

type Group

type Group struct {
	GroupId       string
	GroupName     string
	GroupEmail    string
	Members       map[string]Account // email -> Account
	CorrelationId string
}

type GroupDirectory

type GroupDirectory interface {
	Groups() map[string]Group // groupId -> Group
}

type GroupDirectoryMock

type GroupDirectoryMock struct {
	MockData []Group
}

func (*GroupDirectoryMock) Group

func (gdm *GroupDirectoryMock) Group(groupId string) (Group, bool)

func (*GroupDirectoryMock) Groups

func (gdm *GroupDirectoryMock) Groups() map[string]Group

type GroupResolver

type GroupResolver interface {
	// Find by group key. groupKey matches both GroupId and GroupEmail.
	Group(groupKey string) (Group, bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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