settings

package
v1.35.9 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidField = errors.New("invalid field")
)

Functions

func Migrate

func Migrate(db *gorm.DB) error

func Module

func Module() fx.Option

Types

type DeviceSettings

type DeviceSettings struct {
	models.TimedModel

	UserID   string         `gorm:"primaryKey;not null;type:varchar(32)"`
	Settings map[string]any `gorm:"not null;type:json;serializer:json"`

	User users.User `gorm:"foreignKey:UserID;constraint:OnDelete:CASCADE"`
}

func NewDeviceSettings added in v1.34.3

func NewDeviceSettings(userID string, settings map[string]any) *DeviceSettings

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(params ServiceParams) *Service

func (*Service) GetSettings

func (s *Service) GetSettings(userID string, public bool) (map[string]any, error)

func (*Service) ReplaceSettings

func (s *Service) ReplaceSettings(userID string, settings map[string]any) (map[string]any, error)

func (*Service) UpdateSettings

func (s *Service) UpdateSettings(userID string, settings map[string]any) (map[string]any, error)

type ServiceParams

type ServiceParams struct {
	fx.In

	Repository *repository

	EventsSvc *events.Service

	Logger *zap.Logger
}

Jump to

Keyboard shortcuts

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