directory

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const Domain = "admin.googleapis.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(options ...directory_config.Option) *Client

func (*Client) CreateGroup

func (c *Client) CreateGroup(ctx context.Context, g *group.Group, options ...fetch_config.Option) (*group.Group, error)

CreateGroup creates a new group.

func (*Client) CreateMember

func (c *Client) CreateMember(ctx context.Context, groupKey string, m *member.Member, options ...fetch_config.Option) (*member.Member, error)

CreateMember adds a member to a group identified by groupKey.

func (*Client) CreateOrgUnit

func (c *Client) CreateOrgUnit(ctx context.Context, customer string, ou *org_unit.OrgUnit, options ...fetch_config.Option) (*org_unit.OrgUnit, error)

CreateOrgUnit creates a new organizational unit for the given customer ID (use "my_customer" for the authenticated account).

func (*Client) CreateRole

func (c *Client) CreateRole(ctx context.Context, customer string, r *role.Role, options ...fetch_config.Option) (*role.Role, error)

CreateRole creates a new role for the given customer ID.

func (*Client) CreateRoleAssignment

func (c *Client) CreateRoleAssignment(ctx context.Context, customer string, ra *role_assignment.RoleAssignment, options ...fetch_config.Option) (*role_assignment.RoleAssignment, error)

CreateRoleAssignment creates a new role assignment for the given customer ID.

func (*Client) CreateUser

func (c *Client) CreateUser(ctx context.Context, u *user.User, options ...fetch_config.Option) (*user.User, error)

CreateUser creates a new user account.

func (*Client) DeleteAsp

func (c *Client) DeleteAsp(ctx context.Context, userKey string, codeId int, options ...fetch_config.Option) error

DeleteAsp revokes the application-specific password identified by codeId for the user identified by userKey.

func (*Client) DeleteGroup

func (c *Client) DeleteGroup(ctx context.Context, groupKey string, options ...fetch_config.Option) error

DeleteGroup deletes a group identified by groupKey.

func (*Client) DeleteMember

func (c *Client) DeleteMember(ctx context.Context, groupKey string, memberKey string, options ...fetch_config.Option) error

DeleteMember removes a member from a group identified by groupKey and memberKey.

func (*Client) DeleteOrgUnit

func (c *Client) DeleteOrgUnit(ctx context.Context, customer string, orgUnitPath string, options ...fetch_config.Option) error

DeleteOrgUnit deletes an organizational unit identified by orgUnitPath or unique ID.

func (*Client) DeleteRole

func (c *Client) DeleteRole(ctx context.Context, customer string, roleId string, options ...fetch_config.Option) error

DeleteRole deletes a role identified by roleId.

func (*Client) DeleteRoleAssignment

func (c *Client) DeleteRoleAssignment(ctx context.Context, customer string, roleAssignmentId string, options ...fetch_config.Option) error

DeleteRoleAssignment deletes a role assignment identified by roleAssignmentId.

func (*Client) DeleteToken

func (c *Client) DeleteToken(ctx context.Context, userKey string, clientId string, options ...fetch_config.Option) error

DeleteToken revokes the OAuth token issued to the third-party application identified by clientId for the user identified by userKey.

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, userKey string, options ...fetch_config.Option) error

DeleteUser deletes a user account identified by userKey.

func (*Client) GetAsp

func (c *Client) GetAsp(ctx context.Context, userKey string, codeId int, options ...fetch_config.Option) (*asp.Asp, error)

GetAsp retrieves the application-specific password identified by codeId for the user identified by userKey.

func (*Client) GetGroup

func (c *Client) GetGroup(ctx context.Context, groupKey string, options ...fetch_config.Option) (*group.Group, error)

GetGroup retrieves a group identified by groupKey (group email address, group alias, or unique group ID).

func (*Client) GetMember

func (c *Client) GetMember(ctx context.Context, groupKey string, memberKey string, options ...fetch_config.Option) (*member.Member, error)

GetMember retrieves a member of a group identified by groupKey and memberKey (member email address or unique member ID).

func (*Client) GetOrgUnit

func (c *Client) GetOrgUnit(ctx context.Context, customer string, orgUnitPath string, options ...fetch_config.Option) (*org_unit.OrgUnit, error)

GetOrgUnit retrieves an organizational unit identified by orgUnitPath (e.g. "/Engineering/Frontend") or unique ID (e.g. "id:03ph8a2z1xdnme9").

func (*Client) GetRole

func (c *Client) GetRole(ctx context.Context, customer string, roleId string, options ...fetch_config.Option) (*role.Role, error)

GetRole retrieves a role identified by roleId.

func (*Client) GetRoleAssignment

func (c *Client) GetRoleAssignment(ctx context.Context, customer string, roleAssignmentId string, options ...fetch_config.Option) (*role_assignment.RoleAssignment, error)

GetRoleAssignment retrieves a role assignment identified by roleAssignmentId.

func (*Client) GetToken

func (c *Client) GetToken(ctx context.Context, userKey string, clientId string, options ...fetch_config.Option) (*token.Token, error)

GetToken retrieves the OAuth token issued to the third-party application identified by clientId for the user identified by userKey.

func (*Client) GetUser

func (c *Client) GetUser(ctx context.Context, userKey string, options ...fetch_config.Option) (*user.User, error)

GetUser retrieves a user account identified by userKey (primary email address, alias email address, or unique user ID).

func (*Client) ListAsps

func (c *Client) ListAsps(ctx context.Context, userKey string, options ...fetch_config.Option) ([]*asp.Asp, error)

ListAsps retrieves the application-specific passwords issued for the user identified by userKey.

func (*Client) ListGroups

func (c *Client) ListGroups(ctx context.Context, customer string, options ...fetch_config.Option) ([]*group.Group, error)

ListGroups retrieves all groups for the given customer ID (use "my_customer" for the authenticated account).

func (*Client) ListMembers

func (c *Client) ListMembers(ctx context.Context, groupKey string, options ...fetch_config.Option) ([]*member.Member, error)

ListMembers retrieves all members of a group identified by groupKey.

func (*Client) ListOrgUnits

func (c *Client) ListOrgUnits(ctx context.Context, customer string, options ...fetch_config.Option) ([]*org_unit.OrgUnit, error)

ListOrgUnits retrieves all organizational units for the given customer ID (use "my_customer" for the authenticated account).

func (*Client) ListPrivileges

func (c *Client) ListPrivileges(ctx context.Context, customer string, options ...fetch_config.Option) ([]*privilege.Privilege, error)

ListPrivileges retrieves the privileges supported for building custom roles for the given customer ID.

func (*Client) ListRoleAssignments

func (c *Client) ListRoleAssignments(ctx context.Context, customer string, options ...list_role_assignments_config.Option) ([]*role_assignment.RoleAssignment, error)

ListRoleAssignments retrieves all role assignments for the given customer ID, optionally filtered by user key or role ID.

func (*Client) ListRoles

func (c *Client) ListRoles(ctx context.Context, customer string, options ...fetch_config.Option) ([]*role.Role, error)

ListRoles retrieves all roles for the given customer ID (use "my_customer" for the authenticated account).

func (*Client) ListTokens

func (c *Client) ListTokens(ctx context.Context, userKey string, options ...fetch_config.Option) ([]*token.Token, error)

ListTokens retrieves the OAuth tokens issued to third-party applications for the user identified by userKey.

func (*Client) ListUsers

func (c *Client) ListUsers(ctx context.Context, customer string, options ...fetch_config.Option) ([]*user.User, error)

ListUsers retrieves all users for the given customer ID (use "my_customer" for the authenticated account).

func (*Client) MakeUserAdmin

func (c *Client) MakeUserAdmin(ctx context.Context, userKey string, status bool, options ...fetch_config.Option) error

MakeUserAdmin grants or revokes super administrator status for the user identified by userKey.

func (*Client) SignOutUser

func (c *Client) SignOutUser(ctx context.Context, userKey string, options ...fetch_config.Option) error

SignOutUser signs the user identified by userKey out of all web and device sessions and resets their sign-in cookies.

func (*Client) TurnOffUser2Sv

func (c *Client) TurnOffUser2Sv(ctx context.Context, userKey string, options ...fetch_config.Option) error

TurnOffUser2Sv turns off 2-step verification for the user identified by userKey.

func (*Client) UpdateGroup

func (c *Client) UpdateGroup(ctx context.Context, groupKey string, g *group.Group, options ...fetch_config.Option) (*group.Group, error)

UpdateGroup updates a group identified by groupKey.

func (*Client) UpdateMember

func (c *Client) UpdateMember(ctx context.Context, groupKey string, memberKey string, m *member.Member, options ...fetch_config.Option) (*member.Member, error)

UpdateMember updates a member of a group identified by groupKey and memberKey.

func (*Client) UpdateOrgUnit

func (c *Client) UpdateOrgUnit(ctx context.Context, customer string, orgUnitPath string, ou *org_unit.OrgUnit, options ...fetch_config.Option) (*org_unit.OrgUnit, error)

UpdateOrgUnit updates an organizational unit identified by orgUnitPath or unique ID.

func (*Client) UpdateRole

func (c *Client) UpdateRole(ctx context.Context, customer string, roleId string, r *role.Role, options ...fetch_config.Option) (*role.Role, error)

UpdateRole updates a role identified by roleId.

func (*Client) UpdateUser

func (c *Client) UpdateUser(ctx context.Context, userKey string, u *user.User, options ...fetch_config.Option) (*user.User, error)

UpdateUser updates a user account identified by userKey.

Jump to

Keyboard shortcuts

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