Documentation
¶
Index ¶
- Constants
- Variables
- type AzureUserConfig
- type AzureUserManager
- func (azum *AzureUserManager) AddRemoveLicenses(ctx context.Context, uid string, skusToAdd []string, skusToRemove []string) error
- func (azum *AzureUserManager) Configure(cfg interface{}) error
- func (azum *AzureUserManager) DebugSerialize(v serialization.Parsable)
- func (azum *AzureUserManager) DeleteUser(ctx context.Context, uid string) (bool, error)
- func (azum *AzureUserManager) Disable(ctx context.Context, uid string) (bool, error)
- func (azum *AzureUserManager) Enable(ctx context.Context, uid string) (bool, error)
- func (azum *AzureUserManager) GetUser(ctx context.Context, uid string) (*models.User, error)
- func (azum *AzureUserManager) ListUsers(ctx context.Context, page interface{}, filter interface{}) ([]*models.User, interface{}, error)
- func (azum *AzureUserManager) NewUser(ctx context.Context, newUser *cloudymodels.User) (*cloudymodels.User, error)
- func (azum *AzureUserManager) SetLicenses(ctx context.Context, uid string, skus []string) error
- func (azum *AzureUserManager) ToAzure(user *cloudymodels.User) *models.User
- func (azum *AzureUserManager) ToCloudy(user models.Userable) *cloudymodels.User
- func (azum *AzureUserManager) UpdateUser(ctx context.Context, usr *models.User) (bool, error)
- type LicenseManager
- func (lm *LicenseManager) AssignLicense(ctx context.Context, userId string, licenseSku string) error
- func (lm *LicenseManager) GetAssigned(ctx context.Context, licenseSku string) ([]string, error)
- func (lm *LicenseManager) GetLicenses(ctx context.Context, userId string, licenseSku string) ([]string, error)
- func (lm *LicenseManager) RemoveLicense(ctx context.Context, userId string, licenseSku string) error
- type MSGraph
- func (graph *MSGraph) AssignLicenses(ctx context.Context, userId string, licenseSkus ...string) error
- func (graph *MSGraph) CreateGroup(ctx context.Context, groupId string, groupName string) error
- func (graph *MSGraph) CreateUser(ctx context.Context, userId string) error
- func (graph *MSGraph) DebugSerialize(v serialization.Parsable)
- func (graph *MSGraph) GetAllGroups(ctx context.Context)
- func (graph *MSGraph) GetGroupMembers(ctx context.Context, groupId string) ([]string, error)
- func (graph *MSGraph) GetGroups(ctx context.Context, userId string)
- func (graph *MSGraph) GetUserByID(id string) (models.Userable, error)
- func (graph *MSGraph) RemoveLicenses(ctx context.Context, userId string, licenseSkus ...string) error
- func (graph *MSGraph) SetLicenses(ctx context.Context, userId string, licenseSkus []string) error
- type MSGraphInstance
Constants ¶
View Source
const Azure = "azure"
View Source
const MSGraphVersionBeta = "beta"
View Source
const MSGraphVersionV1 = "v1.0"
Variables ¶
View Source
var AzurePublic = MSGraphInstance{
Name: "Public",
Login: "https://login.microsoftonline.com/",
Base: "https://graph.microsoft.com/",
}
View Source
var DefaultUserSelectFields = []string{
"businessPhones",
"displayName",
"givenName",
"id",
"jobTitle",
"mail",
"mobilePhone",
"officeLocation",
"surname",
"userPrincipalName",
"assignedLicenses",
"companyName",
}
View Source
var GCCHighOffice365E3 = "aea38a85-9bd5-4981-aa00-616b411205bf"
View Source
var GCCHighProjectPlan3 = "64758d81-92b7-4855-bcac-06617becb3e8"
View Source
var GCCHighTeamsAudio = "4dee1f32-0808-4fd2-a2ed-fdd575e3a45f"
View Source
var GCCHighTeamsPhone = "985fcb26-7b94-475b-b512-89356697be71"
View Source
var GCCHighVisioPlan1 = "50a4284d-f0b2-4779-8de6-72c5f9b4349f"
View Source
var InvalidInstanceName = errors.New("invalid instance name")
View Source
var USGovernment = MSGraphInstance{
Name: "USGovernment",
Login: "https://login.microsoftonline.us/",
Base: "https://graph.microsoft.us/",
}
Functions ¶
This section is empty.
Types ¶
type AzureUserConfig ¶
type AzureUserConfig struct {
TenantID string
ClientID string
ClientSecret string
Region string
APIBase string
Version string
SelectFields []string
}
func (*AzureUserConfig) SetInstance ¶
func (azcfg *AzureUserConfig) SetInstance(instance *MSGraphInstance)
func (*AzureUserConfig) SetInstanceName ¶
func (azcfg *AzureUserConfig) SetInstanceName(name string) error
type AzureUserManager ¶
type AzureUserManager struct {
Client *msgraphsdk.GraphServiceClient
Adapter *msgraphsdk.GraphRequestAdapter
Cfg *AzureUserConfig
}
func (*AzureUserManager) AddRemoveLicenses ¶
func (*AzureUserManager) Configure ¶
func (azum *AzureUserManager) Configure(cfg interface{}) error
func (*AzureUserManager) DebugSerialize ¶
func (azum *AzureUserManager) DebugSerialize(v serialization.Parsable)
func (*AzureUserManager) DeleteUser ¶
func (*AzureUserManager) NewUser ¶
func (azum *AzureUserManager) NewUser(ctx context.Context, newUser *cloudymodels.User) (*cloudymodels.User, error)
func (*AzureUserManager) SetLicenses ¶
func (*AzureUserManager) ToAzure ¶
func (azum *AzureUserManager) ToAzure(user *cloudymodels.User) *models.User
func (*AzureUserManager) ToCloudy ¶
func (azum *AzureUserManager) ToCloudy(user models.Userable) *cloudymodels.User
func (*AzureUserManager) UpdateUser ¶
type LicenseManager ¶
type LicenseManager struct {
// contains filtered or unexported fields
}
func (*LicenseManager) AssignLicense ¶
func (*LicenseManager) GetAssigned ¶
func (*LicenseManager) GetLicenses ¶
func (*LicenseManager) RemoveLicense ¶
type MSGraph ¶
type MSGraph struct {
Client *msgraphsdk.GraphServiceClient
Adapter *msgraphsdk.GraphRequestAdapter
}
func (*MSGraph) AssignLicenses ¶
func (*MSGraph) CreateGroup ¶
func (*MSGraph) CreateUser ¶
func (*MSGraph) DebugSerialize ¶
func (graph *MSGraph) DebugSerialize(v serialization.Parsable)
func (*MSGraph) GetAllGroups ¶
func (*MSGraph) GetGroupMembers ¶
func (*MSGraph) RemoveLicenses ¶
type MSGraphInstance ¶
Click to show internal directories.
Click to hide internal directories.