account

package
v0.0.0-...-b4a6cbe Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateEditRequest

func ValidateEditRequest(sl validator.StructLevel)

Types

type API

type API interface {
	Me(c *gin.Context)
	Update(c *gin.Context)
}

func NewApi

func NewApi(store Store, errorResponder httperror.Responder) API

type EditRequest

type EditRequest struct {
	ID                     string          `json:"-"`
	Password               string          `json:"password"` //nolint:gosec
	UILanguage             string          `json:"ui_language"`
	UIGroupsNavigationType string          `json:"ui_groups_navigation_type"`
	UITheme                string          `json:"ui_theme"`
	DefaultView            string          `json:"defaultview"`
	UITours                map[string]bool `json:"ui_tours"`
	Author                 string          `json:"author" swaggerignore:"true"`
}

type Store

type Store interface {
	GetOneBy(ctx context.Context, id string) (*User, error)
	Update(ctx context.Context, r EditRequest) (*User, error)
}

func NewStore

type User

type User struct {
	user.User     `bson:",inline"`
	Permissions   []role.Permission   `bson:"permissions" json:"permissions"`
	UITours       map[string]bool     `bson:"ui_tours" json:"ui_tours"`
	UIThemeColors colortheme.Response `bson:"ui_theme_colors" json:"ui_theme_colors"`
}

Source Files

  • api.go
  • models.go
  • store.go
  • validator.go

Jump to

Keyboard shortcuts

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