Documentation ¶
Index ¶
- type AccreditationRepresentation
- type ActionRepresentation
- type AttachmentRepresentation
- type UserRepresentation
- func (u *UserRepresentation) ExportToDBUser(dbUser *dto.DBUser)
- func (u *UserRepresentation) ExportToKeycloak(kcUser *kc.UserRepresentation)
- func (u *UserRepresentation) ImportFromKeycloak(ctx context.Context, kcUser *kc.UserRepresentation, logger keycloakb.Logger)
- func (u *UserRepresentation) UserToJSON() string
- func (u *UserRepresentation) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccreditationRepresentation ¶
type AccreditationRepresentation struct { Type *string `json:"type"` ExpiryDate *string `json:"expiryDate"` Expired *bool `json:"expired,omitempty"` Revoked *bool `json:"revoked,omitempty"` }
AccreditationRepresentation is a representation of accreditations
type ActionRepresentation ¶
ActionRepresentation struct
type AttachmentRepresentation ¶
type AttachmentRepresentation struct { Filename *string `json:"filename,omitempty"` ContentType *string `json:"contentType,omitempty"` Content *[]byte `json:"content,omitempty"` }
AttachmentRepresentation is a representation of an attached file
func (*AttachmentRepresentation) Validate ¶
func (a *AttachmentRepresentation) Validate() error
Validate an AttachmentRepresentation
type UserRepresentation ¶
type UserRepresentation struct { ID *string `json:"id,omitempty"` Username *string `json:"username,omitempty"` Gender *string `json:"gender,omitempty"` FirstName *string `json:"firstName,omitempty"` LastName *string `json:"lastName,omitempty"` Email *string `json:"email,omitempty"` EmailVerified *bool `json:"emailVerified,omitempty"` PhoneNumber *string `json:"phoneNumber,omitempty"` PhoneNumberVerified *bool `json:"phoneNumberVerified,omitempty"` BirthDate *string `json:"birthDate,omitempty"` BirthLocation *string `json:"birthLocation,omitempty"` Nationality *string `json:"nationality,omitempty"` IDDocumentType *string `json:"idDocumentType,omitempty"` IDDocumentNumber *string `json:"idDocumentNumber,omitempty"` IDDocumentExpiration *string `json:"idDocumentExpiration,omitempty"` IDDocumentCountry *string `json:"idDocumentCountry,omitempty"` Locale *string `json:"locale,omitempty"` BusinessID *string `json:"businessId,omitempty"` Comment *string `json:"comment,omitempty"` Accreditations *[]AccreditationRepresentation `json:"accreditations,omitempty"` Attachments *[]AttachmentRepresentation `json:"attachments,omitempty"` }
UserRepresentation contains user details
func UserFromJSON ¶
func UserFromJSON(jsonRep string) (UserRepresentation, error)
UserFromJSON creates a User using its json representation
func (*UserRepresentation) ExportToDBUser ¶
func (u *UserRepresentation) ExportToDBUser(dbUser *dto.DBUser)
ExportToDBUser exports user details into a dto.DBUser
func (*UserRepresentation) ExportToKeycloak ¶
func (u *UserRepresentation) ExportToKeycloak(kcUser *kc.UserRepresentation)
ExportToKeycloak exports user details into a Keycloak UserRepresentation
func (*UserRepresentation) ImportFromKeycloak ¶
func (u *UserRepresentation) ImportFromKeycloak(ctx context.Context, kcUser *kc.UserRepresentation, logger keycloakb.Logger)
ImportFromKeycloak import details from Keycloak
func (*UserRepresentation) UserToJSON ¶
func (u *UserRepresentation) UserToJSON() string
UserToJSON returns a json representation of a given User
func (*UserRepresentation) Validate ¶
func (u *UserRepresentation) Validate() error
Validate checks the validity of the given User
Click to show internal directories.
Click to hide internal directories.