Documentation
¶
Index ¶
- Constants
- type ControllerAuth
- type ControllerCommon
- type ControllerMap
- 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 = "field_not_valid" FieldNotBlank = "field_not_blank" FieldSizeMax = "field_size_max" FieldSizeMin = "field_size_min" FieldInvalidLength = "field_invalid_length" FieldNotValidChars = "field_not_valid_chars" FieldMax = "field_max" FieldMin = "field_min" FieldFuture = "field_future" FieldPast = "field_past" FieldEmail = "field_email" FieldCardNumber = "field_card_number" FieldPhone = "field_phone" FieldDuplicate = "field_duplicate" FieldIp = "field_ip" FieldRange = "field_range" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerAuth ¶
type ControllerAuth struct {
*ControllerCommon
}
func NewControllerAuth ¶
func NewControllerAuth(common *ControllerCommon) *ControllerAuth
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
}
func NewControllerCommon ¶
func NewControllerCommon(adaptors *adaptors.Adaptors, core *core.Core, accessList *access_list.AccessListService, endpoint *endpoint.Endpoint) *ControllerCommon
type ControllerMap ¶
type ControllerMap struct {
*ControllerCommon
}
func NewControllerMap ¶
func NewControllerMap(common *ControllerCommon) *ControllerMap
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 ControllerWorkflow ¶
type ControllerWorkflow struct {
*ControllerCommon
}
func NewControllerWorkflow ¶
func NewControllerWorkflow(common *ControllerCommon) *ControllerWorkflow
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'
type Error ¶
type Error struct {
Payload *models.Error `json:"body,omitempty"`
// contains filtered or unexported fields
}
func (*Error) Fields ¶
func (o *Error) Fields() []*models.ErrorErrorsItems
func (*Error) SetMessage ¶
func (*Error) ValidationToErrors ¶
func (e *Error) ValidationToErrors(errs []*validation.Error) *Error
type MobileControllersV1 ¶
type MobileControllersV1 struct {
Auth *ControllerAuth
Workflow *ControllerWorkflow
Map *ControllerMap
}
func NewMobileControllersV1 ¶
func NewMobileControllersV1(adaptors *adaptors.Adaptors, core *core.Core, scriptService *scripts.ScriptService, accessList *access_list.AccessListService, command *endpoint.Endpoint) *MobileControllersV1