gsuite

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Google Workspace

Extract user metadata from Google Workspace (G Suite).

Usage

source:
  name: gsuite
  scope: my-org
  config:
    service_account_json: '{"type":"service_account","project_id":"...","private_key":"..."}'
    user_email: admin@example.com

Configuration

Key Type Required Description
service_account_json string Yes Service Account JSON credential object.
user_email string Yes Email of a user with Admin SDK Directory API access to impersonate.
Notes
  • The service account must have domain-wide delegation enabled.
  • The user_email must belong to a user with access to the Admin APIs.

Entities

  • Type: user
  • URN format: urn:gsuite:{scope}:user:{primary_email}
Properties
Property Type Description
properties.email string Primary email address.
properties.full_name string Full name of the user.
properties.status string "suspended" if the user is suspended; omitted otherwise.
properties.aliases string Comma-separated list of email aliases.
properties.org_unit_path string Organizational unit path.
properties.organizations []any List of organization records from Google Workspace.
properties.relations []any List of relation records (e.g. manager).
properties.custom_schemas map[string]any Custom schema data from Google Workspace.

Edges

This extractor does not emit edges.

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceAccountJSON string `json:"service_account_json" yaml:"service_account_json" mapstructure:"service_account_json" validate:"required"`
	UserEmail          string `json:"user_email" yaml:"user_email" mapstructure:"user_email" validate:"required"`
}

type DefaultUsersServiceFactory

type DefaultUsersServiceFactory struct{}

func (*DefaultUsersServiceFactory) BuildUserService

func (f *DefaultUsersServiceFactory) BuildUserService(ctx context.Context, email, serviceAccountJSON string) (UsersListCall, error)

type Extractor

type Extractor struct {
	plugins.BaseExtractor
	// contains filtered or unexported fields
}

Extractor manages the extraction of data from the extractor

func New

func New(logger log.Logger, userServiceFactory UsersServiceFactory) *Extractor

New returns a pointer to an initialized Extractor Object

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error)

Extract extracts the data from the extractor The data is returned as a list of Records.

func (*Extractor) Init

func (e *Extractor) Init(ctx context.Context, config plugins.Config) (err error)

Init initializes the extractor

type UsersListCall

type UsersListCall interface {
	Do(opts ...googleapi.CallOption) (*admin.Users, error)
}

type UsersServiceFactory

type UsersServiceFactory interface {
	BuildUserService(ctx context.Context, email, serviceAccountJSON string) (UsersListCall, error)
}

Jump to

Keyboard shortcuts

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