user

package
v0.14.7 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

type Notification

type Notification struct {
	Id        *string    `json:"id,omitempty"`
	Subject   *string    `json:"subject,omitempty"`
	Content   *string    `json:"content,omitempty"`
	Read      *bool      `json:"read,omitempty"`
	CreatedAt *time.Time `json:"created_at,omitempty"`
	Action    *string    `json:"action,omitempty"`
}

type Notifications

type Notifications struct {
	Notifications []Notification `json:"notifications,omitempty"`
}

type System

type System struct {
	Config  *ConfigBuilder.Config
	Context context.Context
}

func NewSystem

func NewSystem(cfg *ConfigBuilder.Config) *System

func (*System) CreateUser

func (s *System) CreateUser(w http.ResponseWriter, r *http.Request)

func (*System) CreateUserDetails

func (s *System) CreateUserDetails(subject, knownAs, email, firstname, lastname, location string, userGroup int) error

func (*System) DeleteUser

func (s *System) DeleteUser(w http.ResponseWriter, r *http.Request)

func (*System) DeleteUserInDB

func (s *System) DeleteUserInDB(subject string) error

func (*System) DeleteUserInKeycloak

func (s *System) DeleteUserInKeycloak(subject string) error

func (*System) DeleteUserNotification

func (s *System) DeleteUserNotification(w http.ResponseWriter, r *http.Request)

func (*System) DeleteUserNotificationInDB

func (s *System) DeleteUserNotificationInDB(subject, notificationId string) error

func (*System) GetKeycloakDetails

func (s *System) GetKeycloakDetails(subject string) (*gocloak.User, error)

func (*System) GetUser

func (s *System) GetUser(w http.ResponseWriter, r *http.Request)

func (*System) GetUserNotifications

func (s *System) GetUserNotifications(w http.ResponseWriter, r *http.Request)

func (*System) MarkNotificationAsRead

func (s *System) MarkNotificationAsRead(subject, notificationId string) error

func (*System) RetrieveUserDetailsDB

func (s *System) RetrieveUserDetailsDB(subject string) (*User, error)

func (*System) RetrieveUserNotifications

func (s *System) RetrieveUserNotifications(subject string) ([]Notification, error)

func (*System) SetContext

func (s *System) SetContext(ctx context.Context) *System

func (*System) UpdateUser

func (s *System) UpdateUser(w http.ResponseWriter, r *http.Request)

func (*System) UpdateUserDetailsDB

func (s *System) UpdateUserDetailsDB(subject, knownAs, email, firstname, lastname, location string) error

func (*System) UpdateUserImage

func (s *System) UpdateUserImage(w http.ResponseWriter, r *http.Request)

func (*System) UpdateUserImageInDB

func (s *System) UpdateUserImageInDB(subject string, image string) error

func (*System) UpdateUserNotification

func (s *System) UpdateUserNotification(w http.ResponseWriter, r *http.Request)

func (*System) UploadThing

func (s *System) UploadThing(w http.ResponseWriter, r *http.Request)

type User

type User struct {
	Id        *string `json:"id,omitempty"`
	KnownAs   *string `json:"known_as,omitempty"`
	Email     *string `json:"email_address,omitempty"`
	Subject   *string `json:"subject,omitempty"`
	Timezone  *string `json:"timezone,omitempty"`
	JobTitle  *string `json:"job_title,omitempty"`
	Location  *string `json:"location,omitempty"`
	Avatar    *string `json:"avatar,omitempty"`
	FirstName *string `json:"first_name,omitempty"`
	LastName  *string `json:"last_name,omitempty"`
	UserGroup *Group  `json:"user_group,omitempty"`
	Onboarded bool    `json:"onboarded,omitempty"`
	Created   bool    `json:"created,omitempty"`
}

Jump to

Keyboard shortcuts

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