Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorCode(err error) string
- func IsNotFound(err error) bool
- type GoogleGroup
- type GoogleGroupDirectory
- type HTTPDirectory
- func (d *HTTPDirectory) LookupGroup(ctx context.Context, email string) (GoogleGroup, error)
- func (d *HTTPDirectory) SearchGroups(ctx context.Context, query string, limit int) ([]GoogleGroup, error)
- func (d *HTTPDirectory) TransitiveGroupsForMember(ctx context.Context, userEmail string) ([]GoogleGroup, error)
- type HTTPDirectoryConfig
- type MembershipObserver
- type MembershipStore
- type RequestObserver
- type Resolver
- type ResolverConfig
Constants ¶
View Source
const (
ReadOnlyScope = "https://www.googleapis.com/auth/cloud-identity.groups.readonly"
)
Variables ¶
View Source
var ErrNotFound = errors.New("google group not found")
ErrNotFound allows alternate directory implementations and hermetic tests to report a deleted or unknown group without exposing provider response data.
Functions ¶
func IsNotFound ¶
Types ¶
type GoogleGroupDirectory ¶
type HTTPDirectory ¶
type HTTPDirectory struct {
// contains filtered or unexported fields
}
func NewHTTPDirectory ¶
func NewHTTPDirectory(cfg HTTPDirectoryConfig) (*HTTPDirectory, error)
func (*HTTPDirectory) LookupGroup ¶
func (d *HTTPDirectory) LookupGroup(ctx context.Context, email string) (GoogleGroup, error)
func (*HTTPDirectory) SearchGroups ¶
func (d *HTTPDirectory) SearchGroups(ctx context.Context, query string, limit int) ([]GoogleGroup, error)
func (*HTTPDirectory) TransitiveGroupsForMember ¶
func (d *HTTPDirectory) TransitiveGroupsForMember(ctx context.Context, userEmail string) ([]GoogleGroup, error)
type HTTPDirectoryConfig ¶
type MembershipObserver ¶
type MembershipObserver func(event, outcome string)
type MembershipStore ¶
type MembershipStore interface {
GoogleGroupMembershipSnapshot(ctx context.Context, userID string) (repo.GoogleGroupMembershipSnapshot, error)
ReplaceGoogleGroupMemberships(ctx context.Context, userID string, groups []repo.GoogleGroup, syncedAt time.Time) error
RecordGoogleGroupMembershipFailure(ctx context.Context, userID, errorCode string, attemptedAt time.Time) error
}
type RequestObserver ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func NewResolver(cfg ResolverConfig) *Resolver
type ResolverConfig ¶
type ResolverConfig struct {
Store MembershipStore
Directory GoogleGroupDirectory
TTL time.Duration
RetryCooldown time.Duration
Now func() time.Time
Observer MembershipObserver
}
Click to show internal directories.
Click to hide internal directories.