provider

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPageResultsUsers           = 500
	MaxPageResultsGroups          = 200
	MaxPageResultsGroupMembers    = 200
	MaxPageResultsMobileDevices   = 100
	MaxPageResultsChromeDevices   = 300
	MaxPageResultsRoles           = 100
	MaxPageResultsRoleAssignments = 100
	MaxPageResultsBuildings       = 100
	MaxPageResultsCalenders       = 100
	MaxPageResultsFeatures        = 100
)

Variables

This section is empty.

Functions

func AccountCredentialsFromMap

func AccountCredentialsFromMap(m map[string]any) (model.IntegrationCredentials, error)

AccountCredentialsFromMap TODO: converts a map to a configs.IntegrationCredentials.

func AdjustResource

func AdjustResource(job describe.DescribeJob, resource *model.Resource) error

AdjustResource TODO: Do any needed adjustment on resource object before storing

func DescribeListByGoogleWorkspace

func DescribeListByGoogleWorkspace(describe func(context.Context, *GoogleWorkspaceAPIHandler, *models.StreamSender) ([]models.Resource, error)) models.ResourceDescriber

DescribeListByGoogleWorkspace A wrapper to pass GoogleWorkspace authorization to describer functions

func DescribeSingleByGoogleWorkspace

func DescribeSingleByGoogleWorkspace(describe func(context.Context, *GoogleWorkspaceAPIHandler, string) (*models.Resource, error)) models.SingleResourceDescriber

DescribeSingleByGoogleWorkspace A wrapper to pass GoogleWorkspace authorization to describer functions

func GetAdditionalParameters

func GetAdditionalParameters(job describe.DescribeJob) (map[string]string, error)

GetAdditionalParameters TODO: pass additional parameters needed in describer wrappers in /provider/describer_wrapper.go

func GetGroups

func GetGroups(ctx context.Context, handler *GoogleWorkspaceAPIHandler) ([]*admin.Group, error)

func GetLoggerFromContext

func GetLoggerFromContext(ctx context.Context) *zap.Logger

func GetParameterFromContext

func GetParameterFromContext(ctx context.Context, key string) any

func GetResourceMetadata

func GetResourceMetadata(job describe.DescribeJob, resource model.Resource) (map[string]string, error)

GetResourceMetadata TODO: Get metadata as a map to add to the resources

func GetTriggerTypeFromContext

func GetTriggerTypeFromContext(ctx context.Context) enums.DescribeTriggerType

func GetUsers

func GetUsers(ctx context.Context, handler *GoogleWorkspaceAPIHandler) ([]*admin.User, error)

func IsTemporary

func IsTemporary(err error) bool

isTemporary checks if an error is temporary.

func WithLogger

func WithLogger(ctx context.Context, logger *zap.Logger) context.Context

Types

type ChromeDeviceDescription

type ChromeDeviceDescription struct {
	admin.ChromeOsDevice
}

type DomainAliasDescription

type DomainAliasDescription struct {
	admin.DomainAlias
}

type DomainDescription

type DomainDescription struct {
	admin.Domains
}

type GoogleWorkspaceAPIHandler

type GoogleWorkspaceAPIHandler struct {
	AdminService *admin.Service
	CustomerID   string
	RateLimiter  *rate.Limiter
	Semaphore    chan struct{}
	MaxRetries   int
	RetryBackoff time.Duration
}

func NewGoogleWorkspaceAPIHandler

func NewGoogleWorkspaceAPIHandler(adminService *admin.Service, customerID string, rateLimit rate.Limit, burst int, maxConcurrency int, maxRetries int, retryBackoff time.Duration) *GoogleWorkspaceAPIHandler

func (*GoogleWorkspaceAPIHandler) DoRequest

func (h *GoogleWorkspaceAPIHandler) DoRequest(ctx context.Context, requestFunc func() (*int, error)) error

DoRequest executes the googleWorkspace API request with rate limiting, retries, and concurrency control.

type GroupAliasDescription

type GroupAliasDescription struct {
	admin.GroupAlias
}

type GroupDescription

type GroupDescription struct {
	admin.Group
}

type GroupMemberDescription

type GroupMemberDescription struct {
	admin.Member
}

type Metadata

type Metadata struct{}

type MobileDeviceDescription

type MobileDeviceDescription struct {
	admin.MobileDevice
}

type OrgUnitDescription

type OrgUnitDescription struct {
	admin.OrgUnit
}

type PrivilegeDescription

type PrivilegeDescription struct {
	admin.Privilege
}

type ResourceBuildingDescription

type ResourceBuildingDescription struct {
	admin.Building
}

type ResourceCalenderDescription

type ResourceCalenderDescription struct {
	admin.CalendarResource
}

type ResourceFeatureDescription

type ResourceFeatureDescription struct {
	admin.Feature
}

type RoleAssignmentDescription

type RoleAssignmentDescription struct {
	admin.RoleAssignment
}

type RoleDescription

type RoleDescription struct {
	admin.Role
}

type UserAliasDescription

type UserAliasDescription struct {
	admin.UserAlias
}

type UserDescription

type UserDescription struct {
	admin.User
}

Jump to

Keyboard shortcuts

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