handlers

package
v0.0.0-...-476e770 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSettingGroupHandle

func CreateSettingGroupHandle(c *fiber.Ctx) error

@Summary Create a new setting group @Description Create a new setting group @Tags setting-group @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param body body models.CreateMultipleSettingsModel true "CreateMultipleSettingsModel" @Success 200 @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router / [post]

func CreateUserSettingHandle

func CreateUserSettingHandle(c *fiber.Ctx) error

@Summary Create a new user setting @Description Create a new user setting @Tags user-setting @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param body body models.CreateUserSettingModel true "CreateUserSettingModel" @Success 200 {object} fiber.Map{objectId=string} @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router /user-setting [post]

func DeleteUserAllSettingHandle

func DeleteUserAllSettingHandle(c *fiber.Ctx) error

@Summary Delete all user settings @Description Delete all user settings for the current user @Tags user-settings @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Success 200 {string} string "OK" @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router / [delete]

func DeleteUserSettingHandle

func DeleteUserSettingHandle(c *fiber.Ctx) error

@Summary Delete a user setting @Description Delete a user setting by ID @Tags user-settings @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param key path string true "User Setting ID" @Success 200 {string} string "OK" @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router /userSettings/{key} [delete]

func GetAllUserSetting

func GetAllUserSetting(c *fiber.Ctx) error

@Summary Get all user settings @Description Get all user settings for the current user @Tags user-settings @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Success 200 {object} map[string][]models.GetSettingGroupItemModel @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router / [get]

func GetAllUserSettingByType

func GetAllUserSettingByType(c *fiber.Ctx) error

@Summary Get all user settings by type @Description Get all user settings by type for the current user @Tags user-settings @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param key path string true "Setting type" @Success 200 {object} models.GetSettingGroupModel @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router /userSettings/{key} [get]

func GetSettingByUserIds

func GetSettingByUserIds(c *fiber.Ctx) error

@Summary Get settings by user IDs @Description Get settings by user IDs @Tags user-settings @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param body body models.GetSettingsModel true "Get settings model" @Success 200 {object} map[string]string @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router /dto/ids [post]

func GetUserSettingHandle

func GetUserSettingHandle(c *fiber.Ctx) error

@Summary Get a user setting by ID @Description Get a user setting by ID for the current user @Tags user-settings @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param key path string true "User setting ID" @Success 200 {object} models.UserSettingModel @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router /userSettings/{key} [get]

func QueryUserSettingHandle

func QueryUserSettingHandle(c *fiber.Ctx) error

@Summary Query user settings @Description Query user settings based on search, owner, and type @Tags user-settings @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param query body UserSettingQueryModel true "Query parameters" @Success 200 {array} dto.UserSetting @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router /userSettings [get]

func UpdateUserSettingHandle

func UpdateUserSettingHandle(c *fiber.Ctx) error

@Summary Update user settings @Description Update user settings for the current user @Tags user-settings @Accept json @Produce json @Security JWT @Param Authorization header string true "Authentication" default(Bearer <Add_token_here>) @Param body body models.UpdateSettingGroupModel true "Update setting group model" @Success 200 @Failure 400 {object} utils.TelarError @Failure 500 {object} utils.TelarError @Router / [put]

Types

type UserSettingQueryModel

type UserSettingQueryModel struct {
	Search string    `query:"search"`
	Page   int64     `query:"page"`
	Owner  uuid.UUID `query:"owner"`
	Type   int       `query:"type"`
}

Jump to

Keyboard shortcuts

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