Documentation ¶
Index ¶
- Constants
- type ControllerAuth
- type ControllerCommon
- type ControllerMap
- type ControllerMapDevice
- type ControllerWorkflow
- type Error
- func (o *Error) AddField(code, message, field string) *Error
- func (o *Error) AddFieldf(name, code string, N ...int) *Error
- func (o *Error) CheckNum(num interface{}, name string, min, max float64) *Error
- func (e *Error) Error() string
- func (o *Error) Errors() bool
- func (o *Error) Fields() []*models.ErrorErrorsItems
- func (e *Error) Send(ctx *gin.Context)
- func (o *Error) SetMessage(err error) *Error
- func (e *Error) ValidationToErrors(errs []*validation.Error) *Error
- type MobileControllersV1
- type Response
Constants ¶
const ( // FieldNotValid ... FieldNotValid = "field_not_valid" // FieldNotBlank ... FieldNotBlank = "field_not_blank" // FieldSizeMax ... FieldSizeMax = "field_size_max" // FieldSizeMin ... FieldSizeMin = "field_size_min" // FieldInvalidLength ... FieldInvalidLength = "field_invalid_length" // FieldNotValidChars ... FieldNotValidChars = "field_not_valid_chars" // FieldMax ... FieldMax = "field_max" // FieldMin ... FieldMin = "field_min" // FieldFuture ... FieldFuture = "field_future" // FieldPast ... FieldPast = "field_past" // FieldEmail ... FieldEmail = "field_email" // FieldCardNumber ... FieldCardNumber = "field_card_number" // FieldPhone ... FieldPhone = "field_phone" // FieldDuplicate ... FieldDuplicate = "field_duplicate" // FieldIp ... FieldIp = "field_ip" // FieldRange ... FieldRange = "field_range" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerAuth ¶
type ControllerAuth struct {
*ControllerCommon
}
ControllerAuth ...
func NewControllerAuth ¶
func NewControllerAuth(common *ControllerCommon) *ControllerAuth
NewControllerAuth ...
func (ControllerAuth) AccessList ¶
func (c ControllerAuth) AccessList(ctx *gin.Context)
swagger:operation GET /access_list authGetAccessList --- summary: get user access list description: security: - ApiKeyAuth: [] tags: - auth responses:
"200": description: OK schema: type: object properties: access_list: $ref: '#/definitions/AccessList' "401": description: "Unauthorized" "403": description: "Forbidden" "500": $ref: '#/responses/Error'
func (ControllerAuth) Recovery ¶
func (c ControllerAuth) Recovery(ctx *gin.Context)
swagger:operation POST /recovery authRecovery --- summary: recovery access description: tags: - auth responses:
"200": $ref: '#/responses/Success' "500": $ref: '#/responses/Error'
func (ControllerAuth) Reset ¶
func (c ControllerAuth) Reset(ctx *gin.Context)
swagger:operation POST /reset authReset --- summary: reset access description: tags: - auth responses:
"200": $ref: '#/responses/Success' "500": $ref: '#/responses/Error'
func (ControllerAuth) SignIn ¶
func (c ControllerAuth) SignIn(ctx *gin.Context)
swagger:operation POST /signin authSignin --- summary: sign in description: security: - BasicAuth: [] tags: - auth responses:
"200": description: OK schema: $ref: '#/definitions/AuthSignInResponse' "400": $ref: '#/responses/Error' "401": description: "Unauthorized" "403": description: "Forbidden" "500": $ref: '#/responses/Error'
func (ControllerAuth) SignOut ¶
func (c ControllerAuth) SignOut(ctx *gin.Context)
swagger:operation POST /signout authSignout --- summary: sign out description: security: - ApiKeyAuth: [] tags: - auth responses:
"200": $ref: '#/responses/Success' "401": description: "Unauthorized" "403": description: "Forbidden" "500": $ref: '#/responses/Error'
type ControllerCommon ¶
type ControllerCommon struct {
// contains filtered or unexported fields
}
ControllerCommon ...
func NewControllerCommon ¶
func NewControllerCommon(adaptors *adaptors.Adaptors, core *core.Core, accessList *access_list.AccessListService, endpoint *endpoint.Endpoint) *ControllerCommon
NewControllerCommon ...
type ControllerMap ¶
type ControllerMap struct {
*ControllerCommon
}
ControllerMap ...
func NewControllerMap ¶
func NewControllerMap(common *ControllerCommon) *ControllerMap
NewControllerMap ...
func (ControllerMap) GetActiveElements ¶
func (c ControllerMap) GetActiveElements(ctx *gin.Context)
swagger:operation GET /map/active_elements mapGetActiveElements --- summary: get active map elements description: security: - ApiKeyAuth: [] tags: - map parameters:
- default: 10 description: limit in: query name: limit required: true type: integer
- default: 0 description: offset in: query name: offset required: true type: integer
- default: DESC description: order in: query name: order type: string
- default: id description: sort_by in: query name: sort_by type: string
responses:
"200": description: OK schema: $ref: '#/responses/MapActiveElementList' "400": $ref: '#/responses/Error' "401": description: "Unauthorized" "403": description: "Forbidden" "500": $ref: '#/responses/Error'
type ControllerMapDevice ¶ added in v0.2.0
type ControllerMapDevice struct {
*ControllerCommon
}
ControllerMapDevice ...
func NewControllerMapDevice ¶ added in v0.2.0
func NewControllerMapDevice(common *ControllerCommon) *ControllerMapDevice
NewControllerMapDevice ...
func (*ControllerMapDevice) GetHistory ¶ added in v0.2.0
func (c *ControllerMapDevice) GetHistory(ctx *gin.Context)
GetHistory ...
type ControllerWorkflow ¶
type ControllerWorkflow struct {
*ControllerCommon
}
ControllerWorkflow ...
func NewControllerWorkflow ¶
func NewControllerWorkflow(common *ControllerCommon) *ControllerWorkflow
NewControllerWorkflow ...
func (ControllerWorkflow) GetById ¶
func (c ControllerWorkflow) GetById(ctx *gin.Context)
swagger:operation GET /workflow/{id} workflowGetById --- parameters:
- description: Workflow ID in: path name: id required: true type: integer
summary: get workflow by id description: security: - ApiKeyAuth: [] tags: - workflow responses:
"200": description: OK schema: $ref: '#/definitions/Workflow' "400": $ref: '#/responses/Error' "401": description: "Unauthorized" "403": description: "Forbidden" "404": $ref: '#/responses/Error' "500": $ref: '#/responses/Error'
func (ControllerWorkflow) GetList ¶
func (c ControllerWorkflow) GetList(ctx *gin.Context)
swagger:operation GET /workflows workflowList --- summary: get workflow list description: security: - ApiKeyAuth: [] tags: - workflow parameters:
- default: 10 description: limit in: query name: limit required: true type: integer
- default: 0 description: offset in: query name: offset required: true type: integer
- default: DESC description: order in: query name: order type: string
- default: id description: sort_by in: query name: sort_by type: string
responses:
"200": $ref: '#/responses/WorkflowList' "401": description: "Unauthorized" "403": description: "Forbidden" "500": $ref: '#/responses/Error'
func (ControllerWorkflow) UpdateScenario ¶ added in v0.0.25
func (c ControllerWorkflow) UpdateScenario(ctx *gin.Context)
Workflow godoc swagger:operation PUT /workflow/{id}/update_scenario workflowUpdateScenario --- parameters:
- description: Workflow ID in: path name: id required: true type: integer
- description: Update workflow scenario params in: body name: workflowUpdateWorkflowScenario required: true schema: $ref: '#/definitions/WorkflowUpdateWorkflowScenario'
summary: update workflow scenario description: security: - ApiKeyAuth: [] tags: - workflow responses:
"200": $ref: '#/responses/Success' "400": $ref: '#/responses/Error' "401": description: "Unauthorized" "403": description: "Forbidden" "404": $ref: '#/responses/Error' "500": $ref: '#/responses/Error'
type Error ¶
type Error struct { Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
Error ...
func (*Error) ValidationToErrors ¶
func (e *Error) ValidationToErrors(errs []*validation.Error) *Error
ValidationToErrors ...
type MobileControllersV1 ¶
type MobileControllersV1 struct { Auth *ControllerAuth Workflow *ControllerWorkflow Map *ControllerMap MapDevice *ControllerMapDevice }
MobileControllersV1 ...
func NewMobileControllersV1 ¶
func NewMobileControllersV1(adaptors *adaptors.Adaptors, core *core.Core, accessList *access_list.AccessListService, command *endpoint.Endpoint) *MobileControllersV1
NewMobileControllersV1 ...