Documentation
¶
Index ¶
- Variables
- type GoogleProvider
- func (g *GoogleProvider) GrantAccess(ctx context.Context, request *models.AccessRequest) error
- func (g *GoogleProvider) IsAccessExpired(ctx context.Context, request *models.AccessRequest) (bool, error)
- func (g *GoogleProvider) ListUsersWithAccess(ctx context.Context, roleRef models.AccessRoleRef) ([]string, error)
- func (g *GoogleProvider) RevokeAccess(ctx context.Context, request *models.AccessRequest) error
- type GoogleProviderParameters
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
Click to show internal directories.
Click to hide internal directories.