gsuite

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grouper

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

func NewGrouper

func NewGrouper(credentialsPath string, delegator string, pattern string, timeout time.Duration) (*Grouper, error)

NewGrouper returns a grouper initialized with the jwt.Config from credentialsPath.

The delagator is the account on whose behalf the service account should operate. The client id must be registered with that account so that it may act on its behalf.

Pattern, it non-empty, is a regexp pattern accounts must match before forwarding to the API. Accounts that do not match the pattern will return ErrNotFound.

The timeout will set a context timeout for a fetch of all pages for each group.

func (*Grouper) Members

func (g *Grouper) Members(group string) ([]rbacv1.Subject, error)

Members returns the subjects for the give group string, where the group is defined in gsuite.

If a pattern is set and group does not match, ErrNotFound will be returned.

Jump to

Keyboard shortcuts

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