_20231017112246

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundJob

type BackgroundJob struct {
	models.ModelBase
	User   models.User `json:"user,omitempty"` //SECURITY: user and user.id will be set by the repository service
	UserID uuid.UUID   `json:"user_id"`

	JobType    pkg.BackgroundJobType      `json:"job_type"`
	Data       datatypes.JSON             `gorm:"column:data;type:text;serializer:json" json:"data,omitempty"`
	JobStatus  pkg.BackgroundJobStatus    `json:"job_status"`
	LockedTime *time.Time                 `json:"locked_time"`
	DoneTime   *time.Time                 `json:"done_time"`
	Retries    int                        `json:"retries"`
	Schedule   *pkg.BackgroundJobSchedule `json:"schedule,omitempty"`
}

type Glossary

type Glossary struct {
	models.ModelBase
	Code        string `json:"code" gorm:"uniqueIndex:idx_glossary_term"`
	CodeSystem  string `json:"code_system" gorm:"uniqueIndex:idx_glossary_term"`
	Publisher   string `json:"publisher"`
	Title       string `json:"title"`
	Url         string `json:"url"`
	Description string `json:"description"`
}

Glossary contains patient friendly terms for medical concepts Can be retrieved by Code and CodeSystem Structured similar to ValueSet https://hl7.org/fhir/valueset.html

type SourceCredential

type SourceCredential struct {
	models.ModelBase
	User       *User     `json:"user,omitempty"`
	UserID     uuid.UUID `json:"user_id" gorm:"uniqueIndex:idx_user_source_patient"`
	SourceType string    `json:"source_type" gorm:"uniqueIndex:idx_user_source_patient"`
	Patient    string    `json:"patient" gorm:"uniqueIndex:idx_user_source_patient"`

	LatestBackgroundJob   *BackgroundJob `json:"latest_background_job,omitempty"`
	LatestBackgroundJobID *uuid.UUID     `json:"-"`

	//oauth endpoints
	AuthorizationEndpoint string `json:"authorization_endpoint"`
	TokenEndpoint         string `json:"token_endpoint"`
	IntrospectionEndpoint string `json:"introspection_endpoint"`
	RegistrationEndpoint  string `json:"registration_endpoint"` //optional - required when Dynamic Client Registration mode is set

	Scopes                        []string `json:"scopes_supported" gorm:"type:text;serializer:json"`
	Issuer                        string   `json:"issuer"`
	GrantTypesSupported           []string `json:"grant_types_supported" gorm:"type:text;serializer:json"`
	ResponseType                  []string `json:"response_types_supported" gorm:"type:text;serializer:json"`
	ResponseModesSupported        []string `json:"response_modes_supported" gorm:"type:text;serializer:json"`
	Audience                      string   `json:"aud"` //optional - required for some providers
	CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported" gorm:"type:text;serializer:json"`

	//Fasten custom configuration
	UserInfoEndpoint   string `json:"userinfo_endpoint"`     //optional - supported by some providers, not others.
	ApiEndpointBaseUrl string `json:"api_endpoint_base_url"` //api endpoint we'll communicate with after authentication
	ClientId           string `json:"client_id"`
	RedirectUri        string `json:"redirect_uri"` //lighthouse url the provider will redirect to (registered with App)

	Confidential                  bool   `json:"confidential"`                     //if enabled, requires client_secret to authenticate with provider (PKCE)
	DynamicClientRegistrationMode string `json:"dynamic_client_registration_mode"` //if enabled, will dynamically register client with provider (https://oauth.net/2/dynamic-client-registration/)
	CORSRelayRequired             bool   `json:"cors_relay_required"`              //if true, requires CORS proxy/relay, as provider does not return proper response to CORS preflight

	// auth/credential data
	AccessToken   string `json:"access_token"`
	RefreshToken  string `json:"refresh_token"`
	IdToken       string `json:"id_token"`
	ExpiresAt     int64  `json:"expires_at"`
	CodeChallenge string `json:"code_challenge"`
	CodeVerifier  string `json:"code_verifier"`

	//dynamic client auth/credential data
	DynamicClientJWKS []map[string]string `json:"dynamic_client_jwks" gorm:"type:text;serializer:json"`
	DynamicClientId   string              `json:"dynamic_client_id"`
}

SourceCredential Data/Medical Provider Credentials similar to LighthouseSourceDefinition from fasten-source

type User

type User struct {
	models.ModelBase
	FullName string `json:"full_name"`
	Username string `json:"username" gorm:"unique"`
	Password string `json:"password"`

	//additional optional metadata that Fasten stores with users
	Picture string `json:"picture"`
	Email   string `json:"email"`
}

type UserSettingEntry

type UserSettingEntry struct {
	//GORM attributes, see: http://gorm.io/docs/conventions.html
	models.ModelBase
	User   *User     `json:"user,omitempty" gorm:"-"`
	UserID uuid.UUID `json:"user_id" gorm:"not null;index:,unique,composite:user_setting_key_name"`

	SettingKeyName        string `json:"setting_key_name" gorm:"not null;index:,unique,composite:user_setting_key_name"`
	SettingKeyDescription string `json:"setting_key_description"`
	SettingDataType       string `json:"setting_data_type"`

	SettingValueNumeric int      `json:"setting_value_numeric"`
	SettingValueString  string   `json:"setting_value_string"`
	SettingValueBool    bool     `json:"setting_value_bool"`
	SettingValueArray   []string `json:"setting_value_array" gorm:"column:setting_value_array;type:text;serializer:json"`
}

func (UserSettingEntry) TableName

func (s UserSettingEntry) TableName() string

Jump to

Keyboard shortcuts

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