Documentation
¶
Index ¶
- Constants
- type Links
- type Meta
- type Paging
- type RelationshipData
- type RequestQueryOptions
- type ResourceLinks
- type UserGroup
- type UserGroupAttributes
- type UserGroupRelationships
- type UserGroupResponse
- type UserGroupUserLinkage
- type UserGroupUsersLinkagesResponse
- type UserGroups
- func (s *UserGroups) GetByUserGroupIDV1(ctx context.Context, groupID string, opts *RequestQueryOptions) (*UserGroupResponse, *resty.Response, error)
- func (s *UserGroups) GetUserIDsByGroupIDV1(ctx context.Context, groupID string, opts *RequestQueryOptions) (*UserGroupUsersLinkagesResponse, *resty.Response, error)
- func (s *UserGroups) GetV1(ctx context.Context, opts *RequestQueryOptions) (*UserGroupsResponse, *resty.Response, error)
- type UserGroupsResponse
Constants ¶
const ( FieldOuId = "ouId" FieldName = "name" FieldType = "type" FieldTotalMemberCount = "totalMemberCount" FieldCreatedDateTime = "createdDateTime" FieldUpdatedDateTime = "updatedDateTime" FieldStatus = "status" FieldUsers = "users" )
Field constants for fields[userGroups] query parameter.
const ( UserGroupStatusActive = "ACTIVE" UserGroupStatusInactive = "INACTIVE" )
UserGroupStatus constants for status field values.
const (
UserGroupTypeStandard = "STANDARD"
)
UserGroupType constants for type field values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RelationshipData ¶
type RelationshipData struct {
Links *ResourceLinks `json:"links,omitempty"`
}
RelationshipData holds the links for a relationship.
type RequestQueryOptions ¶
type RequestQueryOptions struct {
// Fields specifies which fields to return. Use Field* constants.
Fields []string
// Limit is the number of resources to return (max 1000).
Limit int
}
RequestQueryOptions represents query parameters for user group endpoints.
type ResourceLinks ¶
type UserGroup ¶
type UserGroup struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes *UserGroupAttributes `json:"attributes,omitempty"`
Relationships *UserGroupRelationships `json:"relationships,omitempty"`
Links *ResourceLinks `json:"links,omitempty"`
}
UserGroup represents a user group resource.
type UserGroupAttributes ¶
type UserGroupAttributes struct {
OuId string `json:"ouId,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
TotalMemberCount int `json:"totalMemberCount,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
UpdatedDateTime *time.Time `json:"updatedDateTime,omitempty"`
Status string `json:"status,omitempty"`
}
UserGroupAttributes contains the attributes of a user group.
type UserGroupRelationships ¶
type UserGroupRelationships struct {
Users *RelationshipData `json:"users,omitempty"`
}
UserGroupRelationships contains relationship links for a user group.
type UserGroupResponse ¶
type UserGroupResponse struct {
Data UserGroup `json:"data"`
Links *Links `json:"links,omitempty"`
}
UserGroupResponse is the response for a single user group.
type UserGroupUserLinkage ¶
UserGroupUserLinkage represents a user linkage (type + ID only).
type UserGroupUsersLinkagesResponse ¶
type UserGroupUsersLinkagesResponse struct {
Data []UserGroupUserLinkage `json:"data"`
Links *Links `json:"links,omitempty"`
Meta *Meta `json:"meta,omitempty"`
}
UserGroupUsersLinkagesResponse is the response for user ID linkages of a user group.
type UserGroups ¶
type UserGroups struct {
// contains filtered or unexported fields
}
UserGroups handles communication with the user groups related methods of the Apple Business Manager API.
Apple Business Manager API docs: https://developer.apple.com/documentation/applebusinessapi/get-user-groups
func NewService ¶
func NewService(c client.Client) *UserGroups
NewService creates a new user groups service.
func (*UserGroups) GetByUserGroupIDV1 ¶
func (s *UserGroups) GetByUserGroupIDV1(ctx context.Context, groupID string, opts *RequestQueryOptions) (*UserGroupResponse, *resty.Response, error)
GetByUserGroupIDV1 retrieves information about a specific user group in an organization. URL: GET https://api-business.apple.com/v1/userGroups/{id} https://developer.apple.com/documentation/applebusinessapi/get-usergroup-information
func (*UserGroups) GetUserIDsByGroupIDV1 ¶
func (s *UserGroups) GetUserIDsByGroupIDV1(ctx context.Context, groupID string, opts *RequestQueryOptions) (*UserGroupUsersLinkagesResponse, *resty.Response, error)
GetUserIDsByGroupIDV1 retrieves a list of user IDs for a user group in an organization. URL: GET https://api-business.apple.com/v1/userGroups/{id}/relationships/users https://developer.apple.com/documentation/applebusinessapi/get-all-user-ids-for-a-user-group
func (*UserGroups) GetV1 ¶
func (s *UserGroups) GetV1(ctx context.Context, opts *RequestQueryOptions) (*UserGroupsResponse, *resty.Response, error)
GetV1 retrieves a list of user groups in an organization. URL: GET https://api-business.apple.com/v1/userGroups https://developer.apple.com/documentation/applebusinessapi/get-user-groups
type UserGroupsResponse ¶
type UserGroupsResponse struct {
Data []UserGroup `json:"data"`
Links *Links `json:"links,omitempty"`
Meta *Meta `json:"meta,omitempty"`
}
UserGroupsResponse is the response for a list of user groups.