account

package
v0.0.0-...-8a398ea Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewApi

func NewApi(store Store) API

type EditRequest

type EditRequest struct {
	ID                     string          `json:"-"`
	Password               string          `json:"password"`
	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"`
}

type Validator

type Validator interface {
	ValidateEditRequest(ctx context.Context, sl validator.StructLevel)
}

func NewValidator

func NewValidator(dbClient mongo.DbClient) Validator

Jump to

Keyboard shortcuts

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