googleworkspace

package
v1.16.13 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package googleworkspace provides the Google Workspace integration definition for integrations

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrOAuthTokenMissing indicates the OAuth access token is missing
	ErrOAuthTokenMissing = errors.New("googleworkspace: oauth token missing")
	// ErrClientType indicates the provided client is not the expected type
	ErrClientType = errors.New("googleworkspace: unexpected client type")
	// ErrAdminServiceBuildFailed indicates the Admin SDK client could not be constructed
	ErrAdminServiceBuildFailed = errors.New("googleworkspace: admin service build failed")
	// ErrHealthCheckFailed indicates the health check request failed
	ErrHealthCheckFailed = errors.New("googleworkspace: health check failed")
	// ErrDirectoryUsersFetchFailed indicates the users listing failed
	ErrDirectoryUsersFetchFailed = errors.New("googleworkspace: directory users fetch failed")
	// ErrDirectoryGroupsFetchFailed indicates the groups listing failed
	ErrDirectoryGroupsFetchFailed = errors.New("googleworkspace: directory groups fetch failed")
	// ErrDirectoryGroupMembersFetchFailed indicates the group members listing failed
	ErrDirectoryGroupMembersFetchFailed = errors.New("googleworkspace: directory group members fetch failed")
	// ErrPayloadEncode indicates a provider payload could not be serialized
	ErrPayloadEncode = errors.New("googleworkspace: payload encode failed")
	// ErrResultEncode indicates an operation result could not be serialized
	ErrResultEncode = errors.New("googleworkspace: result encode failed")
	// ErrCredentialEncode indicates the credential could not be serialized
	ErrCredentialEncode = errors.New("googleworkspace: credential encode failed")
	// ErrCredentialDecode indicates the credential could not be deserialized
	ErrCredentialDecode = errors.New("googleworkspace: credential decode failed")
	// ErrCustomerIDMissing indicates installation metadata is missing the required customer identifier
	ErrCustomerIDMissing = errors.New("googleworkspace: customer id missing from installation metadata")
)

Functions

func Builder

func Builder(cfg Config) registry.Builder

Builder returns the Google Workspace definition builder with the supplied operator config applied

Types

type Client

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

Client builds Google Workspace Admin SDK clients for one installation

func (Client) Build

func (c Client) Build(ctx context.Context, req types.ClientBuildRequest) (any, error)

Build constructs the Google Workspace Admin SDK client for one installation

type Config

type Config struct {
	// ClientID is the Google OAuth application client identifier
	ClientID string `json:"clientid" koanf:"clientid"`
	// ClientSecret is the Google OAuth application client secret
	ClientSecret string `json:"clientsecret" koanf:"clientsecret" sensitive:"true"`
	// RedirectURL is the OAuth callback URL registered with the Google application
	RedirectURL string `json:"redirecturl" koanf:"redirecturl" default:"https://api.theopenlane.io/v1/integrations/auth/callback"`
}

Config holds operator-level credentials for the Google Workspace definition

type DirectorySync

type DirectorySync struct{}

DirectorySync collects Google Workspace directory users for ingest

func (DirectorySync) IngestHandle

func (d DirectorySync) IngestHandle() types.IngestHandler

IngestHandle adapts directory sync to the ingest operation registration boundary

func (DirectorySync) Run

func (DirectorySync) Run(ctx context.Context, svc *admin.Service, customerID string) ([]types.IngestPayloadSet, error)

Run collects Google Workspace directory users, groups, and memberships

type HealthCheck

type HealthCheck struct {
	// UserCount is the number of users returned by the health probe
	UserCount int `json:"userCount"`
}

HealthCheck holds the result of a Google Workspace health check

func (HealthCheck) Handle

func (h HealthCheck) Handle() types.OperationHandler

Handle adapts the health check to the generic operation registration boundary

func (HealthCheck) Run

Run executes the health check using the Google Admin SDK

type InstallationMetadata

type InstallationMetadata struct {
	// CustomerID is the Google Workspace customer identifier
	CustomerID string `json:"customerId,omitempty" jsonschema:"title=Customer ID"`
	// Domain is the primary domain of the Google Workspace customer
	Domain string `json:"domain,omitempty" jsonschema:"title=Domain"`
}

InstallationMetadata holds the stable Google Workspace directory target selected for one installation

func (InstallationMetadata) InstallationIdentity

InstallationIdentity implements types.InstallationIdentifiable

type UserInput

type UserInput struct {
	// FilterExpr limits imported records to envelopes matching the CEL expression
	FilterExpr string `` /* 173-byte string literal not displayed */
	// PrimaryDirectory marks this installation as the authoritative directory source for identity holder enrichment and lifecycle derivation
	PrimaryDirectory bool `json:"primaryDirectory,omitempty" jsonschema:"title=Primary Directory"`
}

UserInput holds installation-specific configuration collected from the user

Jump to

Keyboard shortcuts

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