user

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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)

func (*System) ValidateUser

func (s *System) ValidateUser(ctx context.Context, subject string) bool

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