Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateAzureGroupDisplayName(name string) string
- func GenerateAzureGroupMailPrefix(name string) string
- type AddGroupMemberRequest
- type ApiError
- type AssignGroupToApplicationRequest
- type AssignGroupToApplicationResponse
- type Client
- func (c *Client) AddGroupMember(groupId string, upn string) error
- func (c *Client) AssignGroupToApplication(appObjectId string, groupId string, roleId string) (*AssignGroupToApplicationResponse, error)
- func (c *Client) CreateAdministrativeUnitGroup(ctx context.Context, requestPayload CreateAdministrativeUnitGroupRequest) (*CreateAdministrativeUnitGroupResponse, error)
- func (c *Client) DeleteAdministrativeUnitGroup(aUnitId string, groupId string) error
- func (c *Client) DeleteGroupMember(groupId string, memberId string) error
- func (c *Client) GetAdministrativeUnitMembers(id string) (*GetAdministrativeUnitMembersResponse, error)
- func (c *Client) GetAdministrativeUnits() (*GetAdministrativeUnitsResponse, error)
- func (c *Client) GetApplicationRoles(appId string) (*GetApplicationRolesResponse, error)
- func (c *Client) GetAssignmentsForApplication(appObjectId string) (*GetAssignmentsForApplicationResponse, error)
- func (c *Client) GetGroupMembers(id string) (*GroupMembers, error)
- func (c *Client) GetGroups(prefix string) (*GroupsListResponse, error)
- func (c *Client) GetUserViaUPN(upn string) (*GetUserViaUPNResponse, error)
- func (c *Client) HasTokenExpired() bool
- func (c *Client) RefreshAuth() error
- func (c *Client) UnassignGroupFromApplication(groupId string, assignmentId string) error
- type Config
- type CreateAdministrativeUnitGroupRequest
- type CreateAdministrativeUnitGroupResponse
- type GetAdministrativeUnitMembersResponse
- type GetAdministrativeUnitMembersResponseUnit
- type GetAdministrativeUnitsResponse
- type GetAdministrativeUnitsResponseUnit
- type GetApplicationRolesResponse
- type GetAssignmentsForApplicationResponse
- type GetAssignmentsForApplicationResponseAssignment
- type GetUserViaUPNResponse
- type Group
- type GroupMembers
- type GroupsListResponse
- type Member
Constants ¶
View Source
const AZURE_CAPABILITY_GROUP_MAIL_PREFIX = "ci-ssu_cap_"
View Source
const AZURE_CAPABILITY_GROUP_PREFIX = "CI_SSU_Cap -"
Variables ¶
View Source
var ( AzureError = errorx.NewNamespace("azure") AdUserNotFound = AzureError.NewType("ad_user_not_found") HttpError403 = AzureError.NewType("http_error_403") HttpError = AzureError.NewType("http_error") )
Functions ¶
Types ¶
type AddGroupMemberRequest ¶
type AddGroupMemberRequest struct {
OdataId string `json:"@odata.id"`
}
type AssignGroupToApplicationResponse ¶
type AssignGroupToApplicationResponse struct { OdataContext string `json:"@odata.context"` ID string `json:"id"` DeletedDateTime interface{} `json:"deletedDateTime"` AppRoleID string `json:"appRoleId"` CreatedDateTime time.Time `json:"createdDateTime"` PrincipalDisplayName string `json:"principalDisplayName"` PrincipalID string `json:"principalId"` PrincipalType string `json:"principalType"` ResourceDisplayName string `json:"resourceDisplayName"` ResourceID string `json:"resourceId"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewAzureClient ¶
func (*Client) AssignGroupToApplication ¶
func (*Client) CreateAdministrativeUnitGroup ¶
func (c *Client) CreateAdministrativeUnitGroup(ctx context.Context, requestPayload CreateAdministrativeUnitGroupRequest) (*CreateAdministrativeUnitGroupResponse, error)
func (*Client) DeleteAdministrativeUnitGroup ¶
func (*Client) DeleteGroupMember ¶
func (*Client) GetAdministrativeUnitMembers ¶
func (c *Client) GetAdministrativeUnitMembers(id string) (*GetAdministrativeUnitMembersResponse, error)
func (*Client) GetAdministrativeUnits ¶
func (c *Client) GetAdministrativeUnits() (*GetAdministrativeUnitsResponse, error)
func (*Client) GetApplicationRoles ¶
func (c *Client) GetApplicationRoles(appId string) (*GetApplicationRolesResponse, error)
func (*Client) GetAssignmentsForApplication ¶
func (c *Client) GetAssignmentsForApplication(appObjectId string) (*GetAssignmentsForApplicationResponse, error)
func (*Client) GetGroupMembers ¶
func (c *Client) GetGroupMembers(id string) (*GroupMembers, error)
func (*Client) GetUserViaUPN ¶ added in v0.0.11
func (c *Client) GetUserViaUPN(upn string) (*GetUserViaUPNResponse, error)
func (*Client) HasTokenExpired ¶
func (*Client) RefreshAuth ¶
type CreateAdministrativeUnitGroupRequest ¶
type CreateAdministrativeUnitGroupRequest struct { OdataType string `json:"@odata.type"` Description string `json:"description"` DisplayName string `json:"displayName"` MailNickname string `json:"mailNickname"` GroupTypes []interface{} `json:"groupTypes"` MailEnabled bool `json:"mailEnabled"` SecurityEnabled bool `json:"securityEnabled"` ParentAdministrativeUnitId string `json:"-"` }
type CreateAdministrativeUnitGroupResponse ¶
type CreateAdministrativeUnitGroupResponse struct { OdataContext string `json:"@odata.context"` OdataType string `json:"@odata.type"` ID string `json:"id"` DeletedDateTime interface{} `json:"deletedDateTime"` Classification interface{} `json:"classification"` CreatedDateTime time.Time `json:"createdDateTime"` CreationOptions []interface{} `json:"creationOptions"` Description string `json:"description"` DisplayName string `json:"displayName"` ExpirationDateTime interface{} `json:"expirationDateTime"` GroupTypes []interface{} `json:"groupTypes"` IsAssignableToRole interface{} `json:"isAssignableToRole"` Mail interface{} `json:"mail"` MailEnabled bool `json:"mailEnabled"` MailNickname string `json:"mailNickname"` MembershipRule interface{} `json:"membershipRule"` MembershipRuleProcessingState interface{} `json:"membershipRuleProcessingState"` OnPremisesDomainName interface{} `json:"onPremisesDomainName"` OnPremisesLastSyncDateTime interface{} `json:"onPremisesLastSyncDateTime"` OnPremisesNetBiosName interface{} `json:"onPremisesNetBiosName"` OnPremisesSamAccountName interface{} `json:"onPremisesSamAccountName"` OnPremisesSecurityIdentifier interface{} `json:"onPremisesSecurityIdentifier"` OnPremisesSyncEnabled interface{} `json:"onPremisesSyncEnabled"` PreferredDataLocation interface{} `json:"preferredDataLocation"` PreferredLanguage interface{} `json:"preferredLanguage"` ProxyAddresses []interface{} `json:"proxyAddresses"` RenewedDateTime time.Time `json:"renewedDateTime"` ResourceBehaviorOptions []interface{} `json:"resourceBehaviorOptions"` ResourceProvisioningOptions []interface{} `json:"resourceProvisioningOptions"` SecurityEnabled bool `json:"securityEnabled"` SecurityIdentifier string `json:"securityIdentifier"` Theme interface{} `json:"theme"` Visibility interface{} `json:"visibility"` OnPremisesProvisioningErrors []interface{} `json:"onPremisesProvisioningErrors"` }
type GetAdministrativeUnitMembersResponse ¶
type GetAdministrativeUnitMembersResponse struct { OdataContext string `json:"@odata.context"` OdataNextLink string `json:"@odata.nextLink,omitempty"` Value []GetAdministrativeUnitMembersResponseUnit `json:"value"` }
type GetAdministrativeUnitMembersResponseUnit ¶
type GetAdministrativeUnitMembersResponseUnit struct { OdataType string `json:"@odata.type"` ID string `json:"id"` DeletedDateTime interface{} `json:"deletedDateTime"` Classification interface{} `json:"classification"` CreatedDateTime time.Time `json:"createdDateTime"` CreationOptions []interface{} `json:"creationOptions"` Description interface{} `json:"description"` DisplayName string `json:"displayName"` ExpirationDateTime interface{} `json:"expirationDateTime"` GroupTypes []interface{} `json:"groupTypes"` IsAssignableToRole interface{} `json:"isAssignableToRole"` Mail interface{} `json:"mail"` MailEnabled bool `json:"mailEnabled"` MailNickname string `json:"mailNickname"` MembershipRule interface{} `json:"membershipRule"` MembershipRuleProcessingState interface{} `json:"membershipRuleProcessingState"` OnPremisesDomainName interface{} `json:"onPremisesDomainName"` OnPremisesLastSyncDateTime interface{} `json:"onPremisesLastSyncDateTime"` OnPremisesNetBiosName interface{} `json:"onPremisesNetBiosName"` OnPremisesSamAccountName interface{} `json:"onPremisesSamAccountName"` OnPremisesSecurityIdentifier interface{} `json:"onPremisesSecurityIdentifier"` OnPremisesSyncEnabled interface{} `json:"onPremisesSyncEnabled"` PreferredDataLocation interface{} `json:"preferredDataLocation"` PreferredLanguage interface{} `json:"preferredLanguage"` ProxyAddresses []interface{} `json:"proxyAddresses"` RenewedDateTime time.Time `json:"renewedDateTime"` ResourceBehaviorOptions []interface{} `json:"resourceBehaviorOptions"` ResourceProvisioningOptions []interface{} `json:"resourceProvisioningOptions"` SecurityEnabled bool `json:"securityEnabled"` SecurityIdentifier string `json:"securityIdentifier"` Theme interface{} `json:"theme"` Visibility interface{} `json:"visibility"` OnPremisesProvisioningErrors []interface{} `json:"onPremisesProvisioningErrors"` }
type GetAdministrativeUnitsResponse ¶
type GetAdministrativeUnitsResponse struct { OdataContext string `json:"@odata.context"` Value []*GetAdministrativeUnitsResponseUnit `json:"value"` }
func (*GetAdministrativeUnitsResponse) GetUnit ¶
func (g *GetAdministrativeUnitsResponse) GetUnit(name string) *GetAdministrativeUnitsResponseUnit
type GetAdministrativeUnitsResponseUnit ¶
type GetAdministrativeUnitsResponseUnit struct { ID string `json:"id"` DeletedDateTime interface{} `json:"deletedDateTime"` DisplayName string `json:"displayName"` Description string `json:"description"` MembershipRule interface{} `json:"membershipRule"` MembershipType interface{} `json:"membershipType"` MembershipRuleProcessingState interface{} `json:"membershipRuleProcessingState"` Visibility interface{} `json:"visibility"` }
type GetApplicationRolesResponse ¶
type GetApplicationRolesResponse struct { OdataContext string `json:"@odata.context"` Value []struct { DisplayName string `json:"displayName"` AppID string `json:"appId"` AppRoles []struct { AllowedMemberTypes []string `json:"allowedMemberTypes"` Description string `json:"description"` DisplayName string `json:"displayName"` ID string `json:"id"` IsEnabled bool `json:"isEnabled"` Origin string `json:"origin"` Value interface{} `json:"value"` } `json:"appRoles"` } `json:"value"` }
type GetAssignmentsForApplicationResponse ¶
type GetAssignmentsForApplicationResponse struct { OdataContext string `json:"@odata.context"` OdataNextLink string `json:"@odata.nextLink,omitempty"` Value []*GetAssignmentsForApplicationResponseAssignment `json:"value"` }
func (*GetAssignmentsForApplicationResponse) ContainsGroup ¶
func (g *GetAssignmentsForApplicationResponse) ContainsGroup(name string) bool
func (*GetAssignmentsForApplicationResponse) GetAssignmentByGroupName ¶
func (g *GetAssignmentsForApplicationResponse) GetAssignmentByGroupName(name string) *GetAssignmentsForApplicationResponseAssignment
type GetAssignmentsForApplicationResponseAssignment ¶
type GetAssignmentsForApplicationResponseAssignment struct { ID string `json:"id"` CreationTimestamp time.Time `json:"creationTimestamp"` AppRoleID string `json:"appRoleId"` PrincipalDisplayName string `json:"principalDisplayName"` PrincipalID string `json:"principalId"` PrincipalType string `json:"principalType"` ResourceDisplayName string `json:"resourceDisplayName"` ResourceID string `json:"resourceId"` }
type GetUserViaUPNResponse ¶ added in v0.0.11
type GetUserViaUPNResponse struct { OdataContext string `json:"@odata.context"` BusinessPhones []interface{} `json:"businessPhones"` DisplayName string `json:"displayName"` GivenName string `json:"givenName"` JobTitle string `json:"jobTitle"` Mail string `json:"mail"` MobilePhone interface{} `json:"mobilePhone"` OfficeLocation interface{} `json:"officeLocation"` PreferredLanguage interface{} `json:"preferredLanguage"` Surname string `json:"surname"` UserPrincipalName string `json:"userPrincipalName"` ID string `json:"id"` }
type Group ¶
type GroupMembers ¶
type GroupMembers struct { OdataContext string `json:"@odata.context"` Value []struct { OdataType string `json:"@odata.type"` ID string `json:"id"` BusinessPhones []interface{} `json:"businessPhones"` DisplayName string `json:"displayName"` GivenName string `json:"givenName"` JobTitle string `json:"jobTitle"` Mail string `json:"mail"` MobilePhone string `json:"mobilePhone"` OfficeLocation interface{} `json:"officeLocation"` PreferredLanguage interface{} `json:"preferredLanguage"` Surname string `json:"surname"` UserPrincipalName string `json:"userPrincipalName"` } `json:"value"` }
type GroupsListResponse ¶
type GroupsListResponse struct { OdataContext string `json:"@odata.context"` OdataNextLink string `json:"@odata.nextLink"` Value []struct { ID string `json:"id"` DeletedDateTime interface{} `json:"deletedDateTime"` Classification interface{} `json:"classification"` CreatedDateTime time.Time `json:"createdDateTime"` CreationOptions []interface{} `json:"creationOptions"` Description string `json:"description"` DisplayName string `json:"displayName"` ExpirationDateTime interface{} `json:"expirationDateTime"` GroupTypes []interface{} `json:"groupTypes"` IsAssignableToRole interface{} `json:"isAssignableToRole"` Mail interface{} `json:"mail"` MailEnabled bool `json:"mailEnabled"` MailNickname string `json:"mailNickname"` MembershipRule interface{} `json:"membershipRule"` MembershipRuleProcessingState interface{} `json:"membershipRuleProcessingState"` OnPremisesDomainName string `json:"onPremisesDomainName"` OnPremisesLastSyncDateTime time.Time `json:"onPremisesLastSyncDateTime"` OnPremisesNetBiosName string `json:"onPremisesNetBiosName"` OnPremisesSamAccountName string `json:"onPremisesSamAccountName"` OnPremisesSecurityIdentifier string `json:"onPremisesSecurityIdentifier"` OnPremisesSyncEnabled bool `json:"onPremisesSyncEnabled"` PreferredDataLocation interface{} `json:"preferredDataLocation"` PreferredLanguage interface{} `json:"preferredLanguage"` ProxyAddresses []interface{} `json:"proxyAddresses"` RenewedDateTime time.Time `json:"renewedDateTime"` ResourceBehaviorOptions []interface{} `json:"resourceBehaviorOptions"` ResourceProvisioningOptions []interface{} `json:"resourceProvisioningOptions"` SecurityEnabled bool `json:"securityEnabled"` SecurityIdentifier string `json:"securityIdentifier"` Theme interface{} `json:"theme"` Visibility interface{} `json:"visibility"` OnPremisesProvisioningErrors []interface{} `json:"onPremisesProvisioningErrors"` } `json:"value"` }
Click to show internal directories.
Click to hide internal directories.