userpreferences

package
v0.0.0-...-0baf869 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 15 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 {
	Get(c *gin.Context)
	Update(c *gin.Context)
}

func NewApi

func NewApi(
	store Store,
	widgetStore widget.Store,
	enforcer security.Enforcer,
) API

type EditRequest

type EditRequest struct {
	Widget  string                 `json:"widget" binding:"required"`
	Content map[string]interface{} `json:"content" binding:"required"`
}

type Response

type Response struct {
	Widget  string                 `bson:"widget" json:"widget"`
	Content map[string]interface{} `bson:"content" json:"content"`

	Filters []widgetfilter.Response `bson:"filters" json:"filters"`
}

type Store

type Store interface {
	Find(ctx context.Context, userID, widgetId string) (*Response, error)
	Update(ctx context.Context, userID string, request EditRequest) (*Response, error)
}

func NewStore

func NewStore(
	dbClient mongo.DbClient,
	authorProvider author.Provider,
) Store

Jump to

Keyboard shortcuts

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