customsettings

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repos

type Repos interface {
	SettingsRepo
}

func NewRepos

func NewRepos(db *sqlx.DB, access utils.Repo) Repos

NewRepos creates our data store

type SettingsRepo

type SettingsRepo interface {
	ListCustomSettings(c echo.Context) error
	GetCustomSetting(c echo.Context) error
	AddCustomSetting(c echo.Context) error
	EditCustomSetting(c echo.Context) error
	DeleteCustomSetting(c echo.Context) error
}

type Store

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

Store stores our dependencies

func (*Store) AddCustomSetting

func (s *Store) AddCustomSetting(c echo.Context) error

AddCustomSetting handles creating a custom setting

@Summary Create a custom setting @ID add-custom-setting @Tags custom-settings @Produce json @Param customSetting body customsettings.CustomSetting true "Custom Setting object" @Success 201 {object} customsettings.CustomSetting @Router /v1/internal/custom-setting [post]

func (*Store) DeleteCustomSetting

func (s *Store) DeleteCustomSetting(c echo.Context) error

DeleteCustomSetting handles deleting a custom setting

@Summary Deletes custom setting @ID delete-custom-setting @Tags custom-settings @Param settingid path int true "setting id" @Produce json @Success 204 @Router /v1/internal/custom-setting/{settingid} [delete]

func (*Store) EditCustomSetting

func (s *Store) EditCustomSetting(c echo.Context) error

EditCustomSetting handles editing a custom setting

@Summary Edits a custom setting @ID edit-custom-setting @Tags custom-settings @Produce json @Param settingid path int true "setting id" @Param customSetting body customsettings.CustomSettingEditDTO true "Custom Setting object" @Success 200 {object} customsettings.CustomSetting @Router /v1/internal/custom-setting/{officerid} [put]

func (*Store) GetCustomSetting

func (s *Store) GetCustomSetting(c echo.Context) error

GetCustomSetting handles getting a single setting

@Summary Provides a single setting @Description Contains a single setting value in string base64 format @ID get-custom-setting @Tags custom-settings @Param settingid path string true "Setting id" @Produce json @Success 200 {object} customsettings.CustomSetting @Router /v1/internal/custom-setting/{settingid} [get]

func (*Store) ListCustomSettings

func (s *Store) ListCustomSettings(c echo.Context) error

ListCustomSettings handles listing settings

@Summary Provides all settings @Description Contains settings and value in string base64 format @ID get-custom-settings @Tags custom-settings @Produce json @Success 200 {array} customsettings.CustomSetting @Router /v1/internal/custom-settings [get]

Jump to

Keyboard shortcuts

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