Documentation
¶
Overview ¶
Package settingshttp adapts setting and dictionary HTTP requests to the settings usecase.
Index ¶
- func Register(group *echo.Group, handler *Handler)
- type Handler
- func (h *Handler) AddDictionaryItem(c *echo.Context) error
- func (h *Handler) BatchDeleteParams(c *echo.Context) error
- func (h *Handler) BatchDeleteVersions(c *echo.Context) error
- func (h *Handler) CreateDictionary(c *echo.Context) error
- func (h *Handler) CreateParam(c *echo.Context) error
- func (h *Handler) CreateVersion(c *echo.Context) error
- func (h *Handler) DeleteConfig(c *echo.Context) error
- func (h *Handler) DeleteDictionary(c *echo.Context) error
- func (h *Handler) DeleteDictionaryItem(c *echo.Context) error
- func (h *Handler) DeleteParam(c *echo.Context) error
- func (h *Handler) DeleteVersion(c *echo.Context) error
- func (h *Handler) DownloadVersion(c *echo.Context) error
- func (h *Handler) ExportDictionaries(c *echo.Context) error
- func (h *Handler) ExportVersion(c *echo.Context) error
- func (h *Handler) FindParam(c *echo.Context) error
- func (h *Handler) FindParamByKey(c *echo.Context) error
- func (h *Handler) FindVersion(c *echo.Context) error
- func (h *Handler) ImportDictionaries(c *echo.Context) error
- func (h *Handler) ImportVersion(c *echo.Context) error
- func (h *Handler) ListConfigs(c *echo.Context) error
- func (h *Handler) ListDictionaries(c *echo.Context) error
- func (h *Handler) ListParams(c *echo.Context) error
- func (h *Handler) ListVersions(c *echo.Context) error
- func (h *Handler) UpdateDictionary(c *echo.Context) error
- func (h *Handler) UpdateDictionaryItem(c *echo.Context) error
- func (h *Handler) UpdateParam(c *echo.Context) error
- func (h *Handler) UpdateVersion(c *echo.Context) error
- func (h *Handler) UpsertConfig(c *echo.Context) error
- type OperationRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler adapts setting and dictionary HTTP requests to the settings usecase.
func New ¶
func New(uc *usecase.Usecase, operation OperationRecorder) *Handler
New creates a settings HTTP handler.
func (*Handler) AddDictionaryItem ¶
AddDictionaryItem appends one dictionary item.
func (*Handler) BatchDeleteParams ¶
BatchDeleteParams deletes system parameters by id.
func (*Handler) BatchDeleteVersions ¶
BatchDeleteVersions deletes release records by id.
func (*Handler) CreateDictionary ¶
CreateDictionary creates a dictionary.
func (*Handler) CreateParam ¶
CreateParam creates one system parameter.
func (*Handler) CreateVersion ¶
CreateVersion creates a release record.
func (*Handler) DeleteConfig ¶
DeleteConfig deletes a system config.
func (*Handler) DeleteDictionary ¶
DeleteDictionary deletes a dictionary.
func (*Handler) DeleteDictionaryItem ¶
DeleteDictionaryItem deletes one dictionary item.
func (*Handler) DeleteParam ¶
DeleteParam deletes one system parameter.
func (*Handler) DeleteVersion ¶
DeleteVersion deletes a release record.
func (*Handler) DownloadVersion ¶
DownloadVersion returns one release record as a JSON attachment.
func (*Handler) ExportDictionaries ¶
ExportDictionaries downloads all dictionaries as a JSON bundle.
func (*Handler) ExportVersion ¶
ExportVersion creates a portable version bundle from selected resources.
func (*Handler) FindParamByKey ¶
FindParamByKey returns one system parameter by key.
func (*Handler) FindVersion ¶
FindVersion returns one release record.
func (*Handler) ImportDictionaries ¶
ImportDictionaries imports dictionaries from a JSON bundle.
func (*Handler) ImportVersion ¶
ImportVersion imports a portable version bundle.
func (*Handler) ListConfigs ¶
ListConfigs returns system configs.
func (*Handler) ListDictionaries ¶
ListDictionaries returns dictionaries.
func (*Handler) ListParams ¶
ListParams returns system parameters.
func (*Handler) ListVersions ¶
ListVersions returns release records.
func (*Handler) UpdateDictionary ¶
UpdateDictionary updates a dictionary.
func (*Handler) UpdateDictionaryItem ¶
UpdateDictionaryItem updates one dictionary item.
func (*Handler) UpdateParam ¶
UpdateParam updates one system parameter.
func (*Handler) UpdateVersion ¶
UpdateVersion updates a release record.
type OperationRecorder ¶
type OperationRecorder interface {
RecordOperation(context.Context, auditusecase.OperationInput) (auditusecase.OperationLog, error)
}
OperationRecorder records setting mutations for audit.