apikyc

package
v3.22.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2021 License: GPL-3.0 Imports: 9 Imported by: 2

Documentation

Index

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

type ActionRepresentation struct {
	Name  *string `json:"name"`
	Scope *string `json:"scope"`
}

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"`
	Groups               *[]string                      `json:"groups,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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL