Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultSendOrder ¶
func DefaultSendOrder() []string
DefaultSendOrder returns the default send order to use for SS12000:2018
Types ¶
type Activity ¶
type Activity struct { ExternalID string `json:"externalId"` DisplayName string `json:"displayName"` Owner SCIMReference `json:"owner"` // The school unit Groups []SCIMReference `json:"groups"` Teachers []SCIMReference `json:"teachers"` ParentActivity []SCIMReference `json:"parentActivity"` }
Activity represents an activity
func (*Activity) UnmarshalJSON ¶
UnmarshalJSON implements the interface for custom unmarshalling
type ActivityJSON ¶
type ActivityJSON struct { ExternalID string `json:"externalId"` DisplayName string `json:"displayName"` Owner SCIMReference `json:"owner"` Group *SCIMReference `json:"group"` // Incorrect according to spec, but used traditionally by the EGIL client Groups []SCIMReference `json:"groups"` // According to spec Teachers []SCIMReference `json:"teachers"` ParentActivity []SCIMReference `json:"parentActivity"` }
ActivityJSON is used to implement UnmarshalJSON for Activity
type Employment ¶
type Employment struct { ID string `json:"externalId"` // ID is the UUID for the student group EmployedAt SCIMReference `json:"employedAt"` // EmployedAt is where the person is employed User SCIMReference `json:"user"` // User is the employed user EmploymentRole string `json:"employmentRole"` // EmploymentRole is the type of employment Signature string `json:"signature"` // Teacher signature }
Employment is an SS12000:2018 employment object
func (*Employment) GetID ¶
func (e *Employment) GetID() string
GetID returns the objects UUID (id/externalId)
func (*Employment) UnmarshalJSON ¶
func (e *Employment) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements the interface for custom unmarshalling
type Enrolment ¶
type Enrolment struct { Value string `json:"value"` Ref string `json:"$ref"` SchoolYear *int `json:"schoolYear,omitempty"` SchoolType *string `json:"schoolType,omitempty"` ProgramCode *string `json:"programCode,omitempty"` }
Enrolment is an enrolment as defined in SS12000:2018
func (*Enrolment) UnmarshalJSON ¶
UnmarshalJSON implements the interface for custom unmarshalling
type Object ¶
type Object interface { // GetID returns the objects UUID (id/externalId) GetID() string }
Object is an SS12000:2018 object
type Organisation ¶
type Organisation struct { ExternalID string `json:"externalId"` DisplayName string `json:"displayName"` }
Organisation represents an organisation
func (*Organisation) GetID ¶
func (o *Organisation) GetID() string
GetID returns the objects UUID (id/externalId)
func (*Organisation) UnmarshalJSON ¶
func (o *Organisation) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements the interface for custom unmarshalling
type SCIMEmail ¶
type SCIMEmail struct { Value string `json:"value,omitempty"` // Value is the actual email address Type string `json:"type,omitempty"` // Type is the type of email (work, home, etc.) }
SCIMEmail is an email address as defined in SCIM
type SCIMName ¶
type SCIMName struct { FamilyName string `json:"familyName,omitempty"` GivenName string `json:"givenName,omitempty"` }
SCIMName is a persons name as defined in SCIM
func (*SCIMName) UnmarshalJSON ¶
UnmarshalJSON implements the interface for custom unmarshalling
type SCIMReference ¶
SCIMReference is a reference to another SCIM resource
type SchoolUnit ¶
type SchoolUnit struct { ExternalID string `json:"externalId"` SchoolUnitCode string `json:"schoolUnitCode"` DisplayName string `json:"displayName"` Organisation *SCIMReference `json:"organisation"` SchoolUnitGroup *SCIMReference `json:"schoolUnitGroup"` SchoolTypes *[]string `json:"schoolTypes"` MunicipalityCode *string `json:"municipalityCode"` }
SchoolUnit represents a school unit
func (*SchoolUnit) GetID ¶
func (su *SchoolUnit) GetID() string
GetID returns the objects UUID (id/externalId)
func (*SchoolUnit) UnmarshalJSON ¶
func (su *SchoolUnit) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements the interface for custom unmarshalling
type SchoolUnitGroup ¶
type SchoolUnitGroup struct { ExternalID string `json:"externalId"` DisplayName string `json:"displayName"` }
SchoolUnitGroup represents a school unit group
func (*SchoolUnitGroup) GetID ¶
func (sug *SchoolUnitGroup) GetID() string
GetID returns the objects UUID (id/externalId)
func (*SchoolUnitGroup) UnmarshalJSON ¶
func (sug *SchoolUnitGroup) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements the interface for custom unmarshalling
type StudentGroup ¶
type StudentGroup struct { ID string `json:"externalId"` // ID is the UUID for the student group DisplayName string `json:"displayName"` // DisplayName is the human readable name Owner SCIMReference `json:"owner"` // The school unit Type *string `json:"studentGroupType"` // Type is the type of group (klass, undervisning...) StudentMemberships []SCIMReference `json:"studentMemberships"` // StudentMemberships is a list of students in the group SchoolType *string `json:"schoolType"` // SchoolType is the type of education ("skolform", GR, GY etc.) }
StudentGroup represents a student group
func (*StudentGroup) GetID ¶
func (sg *StudentGroup) GetID() string
GetID returns the objects UUID (id/externalId)
func (*StudentGroup) UnmarshalJSON ¶
func (sg *StudentGroup) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements the interface for custom unmarshalling
type User ¶
type User struct { ID string `json:"externalId"` // ID is the UUID for the student group UserName string `json:"userName"` // UserName is the user's EPPN Name SCIMName `json:"name"` // Name is the user's real name (given/family name etc.) DisplayName string `json:"displayName"` // DisplayName is what to show (required in EGIL, not in SS12000:2018 it seems) Emails []SCIMEmail `json:"emails"` // Emails is the user's email addresses Extension UserExtension `json:"urn:scim:schemas:extension:sis:school:1.0:User"` // Extension is the SS12000:2028 SCIM extension }
User is an SS12000:2018 user
func (*User) IsEnrolledAt ¶
IsEnrolledAt checks if a user is enrolled at a school unit with a given school unit code
func (*User) UnmarshalJSON ¶
UnmarshalJSON implements the interface for custom unmarshalling
type UserExtension ¶
type UserExtension struct { Enrolments []Enrolment `json:"enrolments,omitempty"` CivicNo *string `json:"civicNo,omitempty"` UserRelations []UserRelation `json:"userRelations,omitempty"` }
UserExtension is SS12000:2018's extension to the SCIM user object
type UserRelation ¶ added in v0.7.0
type UserRelation struct { Value string `json:"value"` Ref string `json:"$ref"` RelationType string `json:"relationType"` DisplayName *string `json:"displayName,omitempty"` }
UserRelation is a user relation as defined in SS12000:2018
func (*UserRelation) UnmarshalJSON ¶ added in v0.7.0
func (ur *UserRelation) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON implements the interface for custom unmarshalling