google

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = config.GetConfig()
View Source
var Tracer = otel.Tracer("pkg/providers/google")

Functions

This section is empty.

Types

type GoogleProvider

type GoogleProvider struct {
	Service    *admin.Service
	Parameters GoogleProviderParameters
	Name       string `json:"name"`
}

GoogleProvider handles Google Workspace access management

func NewGoogleProvider

func NewGoogleProvider(ctx context.Context, config models.ProviderConfig) (*GoogleProvider, error)

NewGoogleProvider initializes a new GoogleProvider with credentials from ProviderConfig

func (*GoogleProvider) GrantAccess

func (g *GoogleProvider) GrantAccess(ctx context.Context, request *models.AccessRequest) error

GrantAccess adds a user to a specified Google Workspace group

func (*GoogleProvider) IsAccessExpired

func (g *GoogleProvider) IsAccessExpired(ctx context.Context, request *models.AccessRequest) (bool, error)

IsAccessExpired checks whether the access for the given request has expired

func (*GoogleProvider) ListUsersWithAccess

func (g *GoogleProvider) ListUsersWithAccess(ctx context.Context, roleRef models.AccessRoleRef) ([]string, error)

ListUsersWithAccess lists all users in a specified Google Workspace group

func (*GoogleProvider) RevokeAccess

func (g *GoogleProvider) RevokeAccess(ctx context.Context, request *models.AccessRequest) error

RevokeAccess removes a user from a specified Google Workspace group

type GoogleProviderParameters

type GoogleProviderParameters struct {
	Group           string `json:"group"`
	Username        string `json:"username"`
	CredentialsFile string `json:"credentialsFIle"`
}

GoogleProviderParameters encapsulates extracted provider details

Jump to

Keyboard shortcuts

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