Documentation ¶
Index ¶
- Variables
- func MakePrettySlice(s string) []string
- type Handler
- func (h *Handler) CreateEntity(c *fiber.Ctx) error
- func (h *Handler) CreateField(c *fiber.Ctx) error
- func (h *Handler) CreateGroup(c *fiber.Ctx) error
- func (h *Handler) DefaultValuesConfiguration(c *fiber.Ctx) error
- func (h *Handler) DeleteEntity(c *fiber.Ctx) error
- func (h *Handler) DeleteField(c *fiber.Ctx) error
- func (h *Handler) DeleteGroup(c *fiber.Ctx) error
- func (h *Handler) DownloadFile(c *fiber.Ctx) error
- func (h *Handler) FieldTypeConfiguration(c *fiber.Ctx) error
- func (h *Handler) GetAllEntityGet(c *fiber.Ctx) error
- func (h *Handler) GetAllEntityPost(c *fiber.Ctx) error
- func (h *Handler) GetAllField(c *fiber.Ctx) error
- func (h *Handler) GetAllGroup(c *fiber.Ctx) error
- func (h *Handler) GetAllServices(c *fiber.Ctx) error
- func (h *Handler) GetEntity(c *fiber.Ctx) error
- func (h *Handler) GetEntityService(c *fiber.Ctx) error
- func (h *Handler) GetExampleEntity(c *fiber.Ctx) error
- func (h *Handler) GetFieldById(c *fiber.Ctx) error
- func (h *Handler) GetFullGroup(c *fiber.Ctx) error
- func (h *Handler) GetGroup(c *fiber.Ctx) error
- func (h *Handler) GetJoinEntity(c *fiber.Ctx) error
- func (h *Handler) GroupTypeConfiguration(c *fiber.Ctx) error
- func (h *Handler) HandlerLanguage() fiber.Handler
- func (h *Handler) HasAccessMiddleware(c *fiber.Ctx) error
- func (h *Handler) Limiter(max int, expiration_second time.Duration) func(*fiber.Ctx) error
- func (h *Handler) PatchUpdateEntity(c *fiber.Ctx) error
- func (h *Handler) RegexConfiguration(c *fiber.Ctx) error
- func (h *Handler) SignIn(c *fiber.Ctx) error
- func (h *Handler) UpdateEntity(c *fiber.Ctx) error
- func (h *Handler) UpdateField(c *fiber.Ctx) error
- func (h *Handler) UpdateGroup(c *fiber.Ctx) error
- func (h *Handler) Upload(c *fiber.Ctx) error
- func (h *Handler) ValidationFunctionConfiguration(c *fiber.Ctx) error
- type Map
Constants ¶
This section is empty.
Variables ¶
var ( ErrAlreadyExists = "ALREADY_EXISTS" ErrNotFound = "NOT_FOUND" ErrInternalServerError = "INTERNAL_SERVER_ERROR" SigningKey = []byte("FfLbN7pIEYe8@!EqrttOLiwa(H8)7Ddo") SuperAdminUserType = "superadmin" SystemUserType = "admin" )
Functions ¶
func MakePrettySlice ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) CreateEntity ¶
CreateEntity godoc @Security ApiKeyAuth @ID create_entity @Router /client-api/entity/{slug}/create [POST] @Param location header string false "Location" default("Asia/Tashkent") @Summary Create Entity @Description Create Entity @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param entity body models.Entity true "Create Entity" @Success 201 {object} http.Response{data=models.Entity} "Created" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) CreateField ¶
CreateField godoc @Security ApiKeyAuth @ID create_field @Router /client-api/dynamic/field [POST] @Summary Create Field @Description Create Field @Accept json @Produce json @Tags Field @Param field body dynamic_service.Field true "Create Field" @Success 201 {object} http.Response{data=dynamic_service.Field} "Created" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) CreateGroup ¶
CreateGroup godoc @Security ApiKeyAuth @ID create_group @Router /client-api/dynamic/group [POST] @Summary Create Group @Description Create Group @Accept json @Produce json @Tags Group @Param group body models.Group true "Create Group" @Success 201 {object} http.Response{data=models.Group} "Created" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) DefaultValuesConfiguration ¶
DefaultValuesConfiguration godoc @Security ApiKeyAuth @ID default_values_configuration @Router /client-api/configuration/default_values [GET] @Summary Default Values Configuration @Description Default Values Configuration @Accept json @Produce json @Tags Configuration @Success 200 {object} http.Response{data=[]models.Configuration} "Success" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) DeleteEntity ¶
DeleteEntity godoc @Security ApiKeyAuth @ID delete_entity @Router /client-api/entity/{slug}/delete/{id} [DELETE] @Param location header string false "Location" default("Asia/Tashkent") @Summary Delete Entity @Description Delete Entity @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param id path string true "Entity ID" @Success 200 {object} http.Response{data=string} "Deleted" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) DeleteField ¶
DeleteField godoc @Security ApiKeyAuth @ID delete_field @Router /client-api/dynamic/field/{id} [DELETE] @Summary Delete Field @Description Delete Field @Accept json @Produce json @Tags Field @Param id path string true "Field ID" @Success 200 {object} http.Response{data=string} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) DeleteGroup ¶
DeleteGroup godoc @Security ApiKeyAuth @ID delete_group @Router /client-api/dynamic/group/{id} [DELETE] @Summary Delete Group @Description Delete Group @Accept json @Produce json @Tags Group @Param id path string true "Group ID" @Success 200 {object} string "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) DownloadFile ¶
Download godoc @Router /client-api/download-file [get] @Tags upload @Accept multipart/form-data @Produce json @Param link query string true "link" @Success 200 {object} http.Response{data=string} "Success" @Response 400 {object} http.Response{error=string} "Bad Request" @Failure 500 {object} http.Response{error=string} "Server Error"
func (*Handler) FieldTypeConfiguration ¶
FieldTypeConfiguration godoc @Security ApiKeyAuth @Security ApiKeyAuth @ID field_type_configuration @Router /client-api/configuration/field_types [GET] @Summary Field Type Configuration @Description Field Type Configuration @Accept json @Produce json @Tags Configuration @Success 200 {object} http.Response{data=[]models.Configuration} "Success" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetAllEntityGet ¶
GetAllEntityGet godoc @Security ApiKeyAuth @ID get_all_get @Router /client-api/entity/{slug}/get-all [GET] @Param location header string false "Location" default("Asia/Tashkent") @Summary Get All Entities @Description Get All Entities @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param offset query int false "Offset" @Param limit query int false "Limit" @Param sort query string false "Sort" @Param order query string false "Order" @Param search query string false "Search" @Success 200 {object} http.Response{data=models.Entity} "Entities" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetAllEntityPost ¶
GetAll godoc @Security ApiKeyAuth @ID get_all_post @Router /client-api/entity/{slug}/get-all [POST] @Param location header string false "Location" default("Asia/Tashkent") @Summary Get All Entities @Description Get All Entities @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param offset query int false "Offset" @Param limit query int false "Limit" @Param sort query string false "Sort" @Param order query string false "Order" @Param search query string false "Search" @Param filter body models.Entity false "Filter Entity" @Success 200 {object} http.Response{data=models.Entity} "Entities" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetAllField ¶
GetAllField godoc @Security ApiKeyAuth @ID get_all_field @Router /client-api/dynamic/field [GET] @Summary Get All Field @Description Get All Field @Accept json @Produce json @Tags Field @Param offset query int false "Offset" @Param limit query int false "Limit" @Param sort query string false "Sort" @Param order query string false "Order" @Param group_id query string false "Group ID" @Param search query string false "Search" @Param slug query string false "Slug" @Success 200 {object} http.Response{data=dynamic_service.GetAllFieldResponse} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetAllGroup ¶
GetAllGroup godoc @Security ApiKeyAuth @ID get_all_group @Router /client-api/dynamic/group [GET] @Summary Get All Group @Description Get All Group @Accept json @Produce json @Tags Group @Param offset query int false "Offset" @Param limit query int false "Limit" @Param sort query string false "Sort" @Param order query string false "Order" @Param group_type query int false "Group Type" @Param slug query string false "Slug" @Param search query string false "Search" @Param parent_id query string false "Parent ID" @Success 200 {object} http.Response{data=models.GetAllGroupResponse} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetAllServices ¶
GetAllService godoc @Security ApiKeyAuth @ID get_all_service @Router /client-api/service/{slug}/get-all [GET] @Param location header string false "Location" default("Asia/Tashkent") @Summary Get All Services @Description Get All Services @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param offset query int false "Offset" @Param limit query int false "Limit" @Param sort query string false "Sort" @Param order query string false "Order" @Param search query string false "Search" @Success 200 {object} http.Response{data=models.Entity} "Services" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetEntity ¶
GetEntity godoc @Security ApiKeyAuth @ID get_entity @Router /client-api/entity/{slug}/get/{id} [GET] @Param location header string false "Location" default("Asia/Tashkent") @Summary Get Entity @Description Get Entity @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param id path string true "Entity ID" @Success 200 {object} http.Response{data=models.Entity} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetEntityService ¶
GetEntityService godoc @Security ApiKeyAuth @ID get_entity_service @Router /client-api/service/{slug}/get/{id} [GET] @Param location header string false "Location" default("Asia/Tashkent") @Summary Get Entity @Description Get Entity @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param id path string true "Entity ID" @Success 200 {object} http.Response{data=models.Entity} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetExampleEntity ¶
GetExampleEntity godoc @Security ApiKeyAuth @ID get_example_entity @Router /client-api/entity/{slug}/example [GET] @Summary Get Example Entity @Description Get Example Entity @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Success 200 {object} http.Response{data=models.Entity} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetFieldById ¶
GetFieldById godoc @Security ApiKeyAuth @ID get_field_by_id @Router /client-api/dynamic/field/{id} [GET] @Summary Get Field By ID @Description Get Field By ID @Accept json @Produce json @Tags Field @Param id path string true "Field ID" @Success 200 {object} http.Response{data=dynamic_service.Field} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetFullGroup ¶
GetFullGroup godoc @Security ApiKeyAuth @ID get_full_group @Router /client-api/dynamic/group/{slug}/full [GET] @Summary Get Full Group @Description Get Full Group @Accept json @Produce json @Tags Group @Param slug path string true "Group Slug Or ID" @Success 200 {object} http.Response{data=models.Group} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetGroup ¶
GetGroup godoc @Security ApiKeyAuth @ID get_group @Router /client-api/dynamic/group/{id} [GET] @Summary Get Group @Description Get Group @Accept json @Produce json @Tags Group @Param id path string true "Group ID" @Success 200 {object} http.Response{data=models.Group} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) GetJoinEntity ¶
GetJoin godoc @Security ApiKeyAuth @ID get_join @Router /client-api/entity/{slug}/get-join [POST] @Param location header string false "Location" default("Asia/Tashkent") @Summary Get Join Entities @Description Get Join Entities @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param offset query int false "Offset" @Param limit query int false "Limit" @Param sort query string false "Sort" @Param order query string false "Order" @Param search query string false "Search" @Param filter body models.JoinGroupRequest false "Filter Entity"
func (*Handler) GroupTypeConfiguration ¶
GroupTypeConfiguration godoc @Security ApiKeyAuth @ID group_type_configuration @Router /client-api/configuration/group_types [GET] @Summary Group Type Configuration @Description Group Type Configuration @Accept json @Produce json @Tags Configuration @Success 200 {object} http.Response{data=[]models.Configuration} "Success" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) HandlerLanguage ¶
func (*Handler) PatchUpdateEntity ¶
PatchUpdateEntity godoc @Security ApiKeyAuth @ID update_entity @Router /client-api/entity/{slug}/update/{id} [PATCH] @Summary Patch Update Entity @Description Patch Update Entity @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param id path string true "Entity ID" @Param entity body models.Entity true "Update Entity" @Success 200 {object} http.Response{data=models.Entity} @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) RegexConfiguration ¶
RegexConfiguration godoc @Security ApiKeyAuth @ID regex_configuration @Router /client-api/configuration/regex [GET] @Summary Regex Configuration @Description Regex Configuration @Accept json @Produce json @Tags Configuration @Param regex query string true "Regex" @Param value query string true "Value" @Success 200 {object} http.Response{data=[]models.Configuration} "Success" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) SignIn ¶
Sign In godoc @ID sign_in @Router /client-api/auth/sign-in [POST] @Summary Sign In @Description Sign In @Accept json @Produce json @Tags Auth @Param location header string false "Location" default("Asia/Tashkent") @Param body body models.SignInRequest true "Sign In" @Success 200 {object} http.Response{data=models.SignInResponse} "Success" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) UpdateEntity ¶
UpdateEntity godoc @Security ApiKeyAuth @ID update_entity @Router /client-api/entity/{slug}/update/{id} [PUT] @Summary Update Entity @Description Update Entity @Accept json @Produce json @Tags Entity @Param slug path string true "Entity Slug" @Param id path string true "Entity ID" @Param entity body models.Entity true "Update Entity" @Success 200 {object} http.Response{data=models.Entity} @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) UpdateField ¶
UpdateField godoc @Security ApiKeyAuth @ID update_field @Router /client-api/dynamic/field/{id} [PUT] @Summary Update Field @Description Update Field @Accept json @Produce json @Tags Field @Param id path string true "Field ID" @Param field body dynamic_service.Field true "Update Field" @Success 200 {object} http.Response{data=dynamic_service.Field} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) UpdateGroup ¶
UpdateGroup godoc @Security ApiKeyAuth @ID update_group @Router /client-api/dynamic/group/{id} [PUT] @Summary Update Group @Description Update Group @Accept json @Produce json @Tags Group @Param id path string true "Group ID" @Param group body models.Group true "Update Group" @Success 200 {object} http.Response{data=string} "OK" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"
func (*Handler) Upload ¶
UploadFile godoc @Security ApiKeyAuth @Param platform-id header string true "uuid" default(7d4a4c38-dd84-4902-b744-0488b80a4c01) @Router /client-api/upload [POST] @Tags upload @Accept multipart/form-data @Produce json @Param file formData file true "file" @Success 201 {object} http.Response{data=models.Url} "Success" @Response 422 {object} http.Response{error=string} "Validation Error" @Response 400 {object} http.Response{error=string} "Bad Request" @Failure 500 {object} http.Response{error=string} "Server Error"
func (*Handler) ValidationFunctionConfiguration ¶
ValidationFunctionConfiguration godoc @Security ApiKeyAuth @ID validation_function_configuration @Router /client-api/configuration/validation_functions [GET] @Summary Validation Function Configuration @Description Validation Function Configuration @Accept json @Produce json @Tags Configuration @Success 200 {object} http.Response{data=[]models.Configuration} "Success" @Response 400 {object} http.Response{data=string} "Bad Request" @Failure 500 {object} http.Response{data=string} "Server Error"