resolver

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package resolver provides the GroupResolver interface and implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleResolver

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

GoogleResolver implements GroupResolver using the Google Admin SDK Directory API. It uses domain-wide delegation with a service account impersonating an admin user.

func NewGoogleResolver

func NewGoogleResolver(logger *slog.Logger, saKeyJSON []byte, adminEmail string) *GoogleResolver

NewGoogleResolver creates a new GoogleResolver. saKeyJSON is the service account key file content. adminEmail is the admin user to impersonate for domain-wide delegation.

func (*GoogleResolver) ResolveGroups

func (r *GoogleResolver) ResolveGroups(ctx context.Context, email string) ([]string, error)

ResolveGroups lists all groups the user belongs to using the Google Admin SDK.

type GroupResolver

type GroupResolver interface {
	// ResolveGroups returns the list of group email addresses that the given user belongs to.
	ResolveGroups(ctx context.Context, email string) ([]string, error)
}

GroupResolver resolves Google Workspace group memberships for a user email.

Jump to

Keyboard shortcuts

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