controllers

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
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 ControllerDevice

type ControllerDevice struct {
	*ControllerCommon
}

func NewControllerDevice

func NewControllerDevice(common *ControllerCommon) *ControllerDevice

func (ControllerDevice) Add

func (c ControllerDevice) Add(ctx *gin.Context)

swagger:operation POST /device deviceAdd --- parameters:

  • description: device params in: body name: device required: true schema: $ref: '#/definitions/NewDevice' type: object

summary: add new device description: security: - ApiKeyAuth: [] tags: - device responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Device'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerDevice) Delete

func (c ControllerDevice) Delete(ctx *gin.Context)

swagger:operation DELETE /device/{id} deviceDeleteById --- parameters:

  • description: Device ID in: path name: id required: true type: integer

summary: delete device by id description: security: - ApiKeyAuth: [] tags: - device responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerDevice) GetById

func (c ControllerDevice) GetById(ctx *gin.Context)

swagger:operation GET /device/{id} deviceGetById --- parameters:

  • description: Device ID in: path name: id required: true type: integer

summary: get device by id description: security: - ApiKeyAuth: [] tags: - device responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Device'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerDevice) GetList

func (c ControllerDevice) GetList(ctx *gin.Context)

swagger:operation GET /devices deviceList --- summary: get device list description: security: - ApiKeyAuth: [] tags: - device 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/DeviceList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerDevice) Search

func (c ControllerDevice) Search(ctx *gin.Context)

swagger:operation GET /devices/search deviceSearch --- summary: search device description: security: - ApiKeyAuth: [] tags: - device parameters:

  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/DeviceSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerDevice) UpdateDevice

func (c ControllerDevice) UpdateDevice(ctx *gin.Context)

swagger:operation PUT /device/{id} deviceUpdateById --- parameters:

  • description: Device ID in: path name: id required: true type: integer
  • description: Update device params in: body name: device required: true schema: $ref: '#/definitions/UpdateDevice' type: object

summary: update device by id description: security: - ApiKeyAuth: [] tags: - device responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Device'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerDeviceAction

type ControllerDeviceAction struct {
	*ControllerCommon
}

func NewControllerDeviceAction

func NewControllerDeviceAction(common *ControllerCommon) *ControllerDeviceAction

func (ControllerDeviceAction) Add

func (c ControllerDeviceAction) Add(ctx *gin.Context)

swagger:operation POST /device_action deviceActionAdd --- parameters:

  • description: device action params in: body name: device_action required: true schema: $ref: '#/definitions/NewDeviceAction' type: object

summary: add new device action description: security: - ApiKeyAuth: [] tags: - device_action responses:

  "200":
    schema:
      $ref: '#/definitions/DeviceAction'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerDeviceAction) Delete

func (c ControllerDeviceAction) Delete(ctx *gin.Context)

swagger:operation DELETE /device_action/{id} deviceActionDeleteById --- parameters:

  • description: DeviceAction ID in: path name: id required: true type: integer

summary: delete device action by id description: security: - ApiKeyAuth: [] tags: - device_action responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerDeviceAction) GetActionList

func (c ControllerDeviceAction) GetActionList(ctx *gin.Context)

swagger:operation GET /device_actions/{id} deviceActionGetListByDeviceId --- parameters:

  • description: Device ID in: path name: id required: true type: integer

summary: get device actions by device id description: security: - ApiKeyAuth: [] tags: - device_action responses:

  "200":
    schema:
      type: array
      items:
        $ref: '#/definitions/DeviceAction'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerDeviceAction) GetById

func (c ControllerDeviceAction) GetById(ctx *gin.Context)

swagger:operation GET /device_action/{id} deviceActionGetById --- parameters:

  • description: DeviceAction ID in: path name: id required: true type: integer

summary: get device action by id description: security: - ApiKeyAuth: [] tags: - device_action responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/DeviceAction'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerDeviceAction) Search

func (c ControllerDeviceAction) Search(ctx *gin.Context)

swagger:operation GET /device_action1/search deviceActionSearch --- summary: search device actions description: security: - ApiKeyAuth: [] tags: - device_action parameters:

  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/DeviceActionSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerDeviceAction) Update

func (c ControllerDeviceAction) Update(ctx *gin.Context)

swagger:operation PUT /device_action/{id} deviceActionUpdateById --- parameters:

  • description: DeviceAction ID in: path name: id required: true type: integer
  • description: Update device action params in: body name: device_action required: true schema: $ref: '#/definitions/UpdateDeviceAction' type: object

summary: update device action by id description: security: - ApiKeyAuth: [] tags: - device_action responses:

  "200":
    schema:
      $ref: '#/definitions/DeviceAction'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerDeviceState

type ControllerDeviceState struct {
	*ControllerCommon
}

func NewControllerDeviceState

func NewControllerDeviceState(common *ControllerCommon) *ControllerDeviceState

func (ControllerDeviceState) Add

func (c ControllerDeviceState) Add(ctx *gin.Context)

swagger:operation POST /device_state deviceStateAdd --- parameters:

  • description: device state params in: body name: device_state required: true schema: $ref: '#/definitions/NewDeviceState' type: object

summary: add new device state description: security: - ApiKeyAuth: [] tags: - device_state responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/DeviceState'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerDeviceState) Delete

func (c ControllerDeviceState) Delete(ctx *gin.Context)

swagger:operation DELETE /device_state/{id} deviceStateDeleteById --- parameters:

  • description: DeviceState ID in: path name: id required: true type: integer

summary: delete device state by id description: security: - ApiKeyAuth: [] tags: - device_state responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerDeviceState) GetById

func (c ControllerDeviceState) GetById(ctx *gin.Context)

swagger:operation GET /device_state/{id} deviceStateGetById --- parameters:

  • description: DeviceState ID in: path name: id required: true type: integer

summary: get device state by id description: security: - ApiKeyAuth: [] tags: - device_state responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/DeviceState'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerDeviceState) GetStateList

func (c ControllerDeviceState) GetStateList(ctx *gin.Context)

swagger:operation GET /device_states/{id} deviceStateList --- summary: get device state list by device id description: security: - ApiKeyAuth: [] tags: - device_state parameters:

  • description: Device ID in: path name: id required: true type: integer

responses:

  "200":
    description: OK
    schema:
      type: array
      items:
        $ref: '#/definitions/DeviceState'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerDeviceState) Update

func (c ControllerDeviceState) Update(ctx *gin.Context)

swagger:operation PUT /device_state/{id} deviceStateUpdateById --- parameters:

  • description: DeviceState ID in: path name: id required: true type: integer
  • description: Update device state params in: body name: device_state required: true schema: $ref: '#/definitions/UpdateDeviceState' type: object

summary: update device state by id description: security: - ApiKeyAuth: [] tags: - device_state responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/DeviceState'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerFlow

type ControllerFlow struct {
	*ControllerCommon
}

func NewControllerFlow

func NewControllerFlow(common *ControllerCommon) *ControllerFlow

func (ControllerFlow) Add

func (c ControllerFlow) Add(ctx *gin.Context)

swagger:operation POST /flow flowAdd --- parameters:

  • description: flow params in: body name: flow required: true schema: $ref: '#/definitions/NewFlow' type: object

summary: add new flow description: security: - ApiKeyAuth: [] tags: - flow responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Flow'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerFlow) Delete

func (c ControllerFlow) Delete(ctx *gin.Context)

swagger:operation DELETE /flow/{id} flowDeleteById --- parameters:

  • description: Flow ID in: path name: id required: true type: integer

summary: delete flow by id description: security: - ApiKeyAuth: [] tags: - flow responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerFlow) GetById

func (c ControllerFlow) GetById(ctx *gin.Context)

swagger:operation GET /flow/{id} flowGetById --- parameters:

  • description: Flow ID in: path name: id required: true type: integer

summary: get flow by id description: security: - ApiKeyAuth: [] tags: - flow responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Flow'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerFlow) GetList

func (c ControllerFlow) GetList(ctx *gin.Context)

swagger:operation GET /flows flowList --- summary: get flow list description: security: - ApiKeyAuth: [] tags: - flow 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/FlowList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerFlow) GetRedactor

func (c ControllerFlow) GetRedactor(ctx *gin.Context)

swagger:operation GET /flow/{id}/redactor flowGetRedactor --- parameters:

  • description: Flow ID in: path name: id required: true type: integer

summary: get flow redactor data by flow id description: security: - ApiKeyAuth: [] tags: - flow responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/RedactorFlow'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerFlow) Search

func (c ControllerFlow) Search(ctx *gin.Context)

swagger:operation GET /flows/search flowSearch --- summary: search flow description: security: - ApiKeyAuth: [] tags: - flow parameters:

  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/FlowSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerFlow) Update

func (c ControllerFlow) Update(ctx *gin.Context)

swagger:operation PUT /flow/{id} flowUpdateById --- parameters:

  • description: Flow ID in: path name: id required: true type: integer
  • description: Update flow params in: body name: flow required: true schema: $ref: '#/definitions/UpdateFlow' type: object

summary: update flow by id description: security: - ApiKeyAuth: [] tags: - flow responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Flow'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerFlow) UpdateRedactor

func (c ControllerFlow) UpdateRedactor(ctx *gin.Context)

swagger:operation PUT /flow/{id}/redactor flowUpdateRedactor --- parameters:

  • description: Flow ID in: path name: id required: true type: integer
  • description: flow redactor params in: body name: flow required: true schema: $ref: '#/definitions/RedactorFlow' type: object

summary: update flow by id description: security: - ApiKeyAuth: [] tags: - flow responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/RedactorFlow'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerGate added in v0.0.9

type ControllerGate struct {
	*ControllerCommon
}

func NewControllerGate added in v0.0.9

func NewControllerGate(common *ControllerCommon) *ControllerGate

func (ControllerGate) AddMobile added in v0.0.9

func (c ControllerGate) AddMobile(ctx *gin.Context)

swagger:operation POST /gate/mobile gateAddMobile --- parameters: summary: add new mobile client description: security: - ApiKeyAuth: [] tags: - gate responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerGate) DeleteMobile added in v0.0.9

func (c ControllerGate) DeleteMobile(ctx *gin.Context)

swagger:operation DELETE /gate/mobile/{token} gateDeleteMobile --- parameters:

  • description: mobile token in: path name: token required: true type: string

summary: delete mobile by token description: security: - ApiKeyAuth: [] tags: - gate responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerGate) GetMobileList added in v0.0.9

func (c ControllerGate) GetMobileList(ctx *gin.Context)

swagger:operation GET /gate/mobiles gateGetMobileList --- parameters: summary: get gate mobile list description: security: - ApiKeyAuth: [] tags: - gate responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/GateMobileList'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerGate) GetSettings added in v0.0.9

func (c ControllerGate) GetSettings(ctx *gin.Context)

swagger:operation GET /gate gateGetSettings --- parameters: summary: get gate settings description: security: - ApiKeyAuth: [] tags: - gate responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/GateSettings'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerGate) UpdateSettings added in v0.0.9

func (c ControllerGate) UpdateSettings(ctx *gin.Context)

swagger:operation PUT /gate gateUpdateSettings --- parameters:

  • description: Update gate params in: body name: user required: true schema: $ref: '#/definitions/UpdateGateSettings' type: object

summary: update gate settings description: security: - ApiKeyAuth: [] tags: - gate responses:

  "200":
    $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerImage

type ControllerImage struct {
	*ControllerCommon
}

func NewControllerImage

func NewControllerImage(common *ControllerCommon) *ControllerImage

func (ControllerImage) Add

func (c ControllerImage) Add(ctx *gin.Context)

swagger:operation POST /image imageAdd --- parameters:

  • description: image params in: body name: image required: true schema: $ref: '#/definitions/NewImage' type: object

summary: add new image description: security: - ApiKeyAuth: [] tags: - image responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Image'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerImage) Delete

func (c ControllerImage) Delete(ctx *gin.Context)

swagger:operation DELETE /image/{id} imageDeleteById --- parameters:

  • description: Image ID in: path name: id required: true type: integer

summary: delete image by id description: security: - ApiKeyAuth: [] tags: - image responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerImage) GetById

func (c ControllerImage) GetById(ctx *gin.Context)

swagger:operation GET /image/{id} imageGetById --- parameters:

  • description: Image ID in: path name: id required: true type: integer

summary: get image by id description: security: - ApiKeyAuth: [] tags: - image responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Image'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerImage) GetList

func (c ControllerImage) GetList(ctx *gin.Context)

swagger:operation GET /images imageList --- summary: get image list description: security: - ApiKeyAuth: [] tags: - image 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/ImageList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerImage) Update

func (c ControllerImage) Update(ctx *gin.Context)

swagger:operation PUT /image/{id} imageUpdateById --- parameters:

  • description: Image ID in: path name: id required: true type: integer
  • description: Update image params in: body name: image required: true schema: $ref: '#/definitions/UpdateImage' type: object

summary: update image by id description: security: - ApiKeyAuth: [] tags: - image responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Image'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (*ControllerImage) Upload

func (c *ControllerImage) Upload(ctx *gin.Context)

swagger:operation POST /image/upload imageUpload --- consumes:

  • multipart/form-data

parameters:

  • in: formData name: file type: array required: true description: "image file" items: type: file

summary: upload image files description: security: - ApiKeyAuth: [] tags: - image responses:

  "200":
	   $ref: '#/responses/NewObjectSuccess'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

type ControllerIndex

type ControllerIndex struct {
	*ControllerCommon
}

func NewControllerIndex

func NewControllerIndex(common *ControllerCommon) *ControllerIndex

func (ControllerIndex) Index

func (i ControllerIndex) Index(c *gin.Context)

swagger:operation GET / index --- summary: index page description: consumes: - text/plain produces: - text/plain tags: - index responses:

  "200":
	   description: Success response

type ControllerLog

type ControllerLog struct {
	*ControllerCommon
}

func NewControllerLog

func NewControllerLog(common *ControllerCommon) *ControllerLog

func (ControllerLog) Add

func (c ControllerLog) Add(ctx *gin.Context)

swagger:operation POST /log logAdd --- parameters:

  • description: log params in: body name: log required: true schema: $ref: '#/definitions/NewLog' type: object

summary: add new log description: security: - ApiKeyAuth: [] tags: - log responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Log'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerLog) Delete

func (c ControllerLog) Delete(ctx *gin.Context)

swagger:operation DELETE /log/{id} logDeleteById --- parameters:

  • description: Log ID in: path name: id required: true type: integer

summary: delete log by id description: security: - ApiKeyAuth: [] tags: - log responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerLog) GetById

func (c ControllerLog) GetById(ctx *gin.Context)

swagger:operation GET /log/{id} logGetById --- parameters:

  • description: Log ID in: path name: id required: true type: integer

summary: get log by id description: security: - ApiKeyAuth: [] tags: - log responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Log'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerLog) GetList

func (c ControllerLog) GetList(ctx *gin.Context)

swagger:operation GET /logs logList --- summary: get log list description: security: - ApiKeyAuth: [] tags: - log 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
  • default: id description: query in: query name: query type: string

responses:

  "200":
	   $ref: '#/responses/LogList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerLog) Search

func (c ControllerLog) Search(ctx *gin.Context)

swagger:operation GET /logs/search logSearch --- summary: search log description: security: - ApiKeyAuth: [] tags: - log parameters:

  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/LogSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

type ControllerMap

type ControllerMap struct {
	*ControllerCommon
}

func NewControllerMap

func NewControllerMap(common *ControllerCommon) *ControllerMap

func (ControllerMap) Add

func (c ControllerMap) Add(ctx *gin.Context)

swagger:operation POST /map mapAdd --- parameters:

  • description: map params in: body name: map required: true schema: $ref: '#/definitions/NewMap' type: object

summary: add new map description: security: - ApiKeyAuth: [] tags: - map responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Map'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerMap) Delete

func (c ControllerMap) Delete(ctx *gin.Context)

swagger:operation DELETE /map/{id} mapDeleteById --- parameters:

  • description: Map ID in: path name: id required: true type: integer

summary: delete map by id description: security: - ApiKeyAuth: [] tags: - map responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMap) GetById

func (c ControllerMap) GetById(ctx *gin.Context)

swagger:operation GET /map/{id} mapGetById --- parameters:

  • description: Map ID in: path name: id required: true type: integer

summary: get map by id description: security: - ApiKeyAuth: [] tags: - map responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Map'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMap) GetFullMap

func (c ControllerMap) GetFullMap(ctx *gin.Context)

swagger:operation GET /map/{id}/full mapFullGetById --- parameters:

  • description: Map ID in: path name: id required: true type: integer

summary: get map full by id description: security: - ApiKeyAuth: [] tags: - map responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/MapFull'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMap) GetList

func (c ControllerMap) GetList(ctx *gin.Context)

swagger:operation GET /maps mapList --- summary: get map list 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":
	   $ref: '#/responses/MapList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerMap) Search

func (c ControllerMap) Search(ctx *gin.Context)

swagger:operation GET /maps/search mapSearch --- summary: search map description: security: - ApiKeyAuth: [] tags: - map parameters:

  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/MapSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerMap) Update

func (c ControllerMap) Update(ctx *gin.Context)

swagger:operation PUT /map/{id} mapUpdateById --- parameters:

  • description: Map ID in: path name: id required: true type: integer
  • description: Update map params in: body name: map required: true schema: $ref: '#/definitions/UpdateMap' type: object

summary: update map by id description: security: - ApiKeyAuth: [] tags: - map responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Map'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerMapElement

type ControllerMapElement struct {
	*ControllerCommon
}

func NewControllerMapElement

func NewControllerMapElement(common *ControllerCommon) *ControllerMapElement

func (ControllerMapElement) Add

func (c ControllerMapElement) Add(ctx *gin.Context)

swagger:operation POST /map_element mapElementAdd --- parameters:

  • description: element params in: body name: map_element required: true schema: $ref: '#/definitions/NewMapElement' type: object

summary: add new map element description: security: - ApiKeyAuth: [] tags: - map_element responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/MapElement'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapElement) Delete

func (c ControllerMapElement) Delete(ctx *gin.Context)

swagger:operation DELETE /map_element/{id} mapElementDeleteById --- parameters:

  • description: MapElement ID in: path name: id required: true type: integer

summary: delete map element by id description: security: - ApiKeyAuth: [] tags: - map_element responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapElement) GetById

func (c ControllerMapElement) GetById(ctx *gin.Context)

swagger:operation GET /map_element/{id} mapElementGetById --- parameters:

  • description: MapElement ID in: path name: id required: true type: integer

summary: get map element by id description: security: - ApiKeyAuth: [] tags: - map_element responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/MapElement'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapElement) GetList

func (c ControllerMapElement) GetList(ctx *gin.Context)

swagger:operation GET /map_elements mapElementList --- summary: get map element list description: security: - ApiKeyAuth: [] tags: - map_element 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: '#/definitions/MapElement'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapElement) Sort

func (c ControllerMapElement) Sort(ctx *gin.Context)

swagger:operation PUT /map_element/sort mapElementUpdateById --- parameters:

  • description: sort params in: body name: sort_params required: true schema: $ref: '#/definitions/SortMapElement' type: object

summary: sort map elements description: security: - ApiKeyAuth: [] tags: - map_element responses:

  "200":
    $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapElement) UpdateElement

func (c ControllerMapElement) UpdateElement(ctx *gin.Context)

swagger:operation PUT /map_element/{id}/element_only mapElementUpdateById --- parameters:

  • description: MapElement ID in: path name: id required: true type: integer
  • description: Update map element params in: body name: map_element required: true schema: $ref: '#/definitions/UpdateMapElement' type: object

summary: update map element only by id description: security: - ApiKeyAuth: [] tags: - map_element responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/MapElement'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapElement) UpdateFull

func (c ControllerMapElement) UpdateFull(ctx *gin.Context)

swagger:operation PUT /map_element/{id} mapElementUpdateById --- parameters:

  • description: MapElement ID in: path name: id required: true type: integer
  • description: Update map element params in: body name: map_element required: true schema: $ref: '#/definitions/UpdateMapElement' type: object

summary: full update map element by id description: security: - ApiKeyAuth: [] tags: - map_element responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/MapElement'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerMapLayer

type ControllerMapLayer struct {
	*ControllerCommon
}

func NewControllerMapLayer

func NewControllerMapLayer(common *ControllerCommon) *ControllerMapLayer

func (ControllerMapLayer) Add

func (c ControllerMapLayer) Add(ctx *gin.Context)

swagger:operation POST /map_layer mapLayerAdd --- parameters:

  • description: layer params in: body name: map_layer required: true schema: $ref: '#/definitions/NewMapLayer' type: object

summary: add new map layer description: security: - ApiKeyAuth: [] tags: - map_layer responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/MapLayer'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapLayer) Delete

func (c ControllerMapLayer) Delete(ctx *gin.Context)

swagger:operation DELETE /map_layer/{id} mapLayerDeleteById --- parameters:

  • description: MapLayer ID in: path name: id required: true type: integer

summary: delete map layer by id description: security: - ApiKeyAuth: [] tags: - map_layer responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapLayer) GetById

func (c ControllerMapLayer) GetById(ctx *gin.Context)

swagger:operation GET /map_layer/{id} mapLayerGetById --- parameters:

  • description: MapLayer ID in: path name: id required: true type: integer

summary: get map layer by id description: security: - ApiKeyAuth: [] tags: - map_layer responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/MapLayer'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapLayer) GetList

func (c ControllerMapLayer) GetList(ctx *gin.Context)

swagger:operation GET /map_layers mapLayerList --- summary: get map layer list description: security: - ApiKeyAuth: [] tags: - map_layer 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/MapLayerList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapLayer) Sort

func (c ControllerMapLayer) Sort(ctx *gin.Context)

swagger:operation PUT /map_layer/sort mapLayerUpdateById --- parameters:

  • description: sort params in: body name: sort_params required: true schema: $ref: '#/definitions/SortMapLayer' type: object

summary: sort map layers description: security: - ApiKeyAuth: [] tags: - map_layer responses:

  "200":
    $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerMapLayer) Update

func (c ControllerMapLayer) Update(ctx *gin.Context)

swagger:operation PUT /map_layer/{id} mapLayerUpdateById --- parameters:

  • description: MapLayer ID in: path name: id required: true type: integer
  • description: layer params in: body name: map_layer required: true schema: $ref: '#/definitions/UpdateMapLayer' type: object

summary: update map layer description: security: - ApiKeyAuth: [] tags: - map_layer responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/MapLayer'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerNode

type ControllerNode struct {
	*ControllerCommon
}

func NewControllerNode

func NewControllerNode(common *ControllerCommon) *ControllerNode

func (ControllerNode) Add

func (c ControllerNode) Add(ctx *gin.Context)

swagger:operation POST /node nodeAdd --- parameters:

  • description: node params in: body name: node required: true schema: $ref: '#/definitions/NewNode' type: object

summary: add new node description: security: - ApiKeyAuth: [] tags: - node responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Node'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerNode) Delete

func (c ControllerNode) Delete(ctx *gin.Context)

swagger:operation DELETE /node/{id} nodeDeleteById --- parameters:

  • description: Node ID in: path name: id required: true type: integer

summary: delete node by id description: security: - ApiKeyAuth: [] tags: - node responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerNode) GetById

func (c ControllerNode) GetById(ctx *gin.Context)

swagger:operation GET /node/{id} nodeGetById --- parameters:

  • description: Node ID in: path name: id required: true type: integer

summary: get node by id description: security: - ApiKeyAuth: [] tags: - node responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Node'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerNode) GetList

func (c ControllerNode) GetList(ctx *gin.Context)

swagger:operation GET /nodes nodeList --- summary: get node list description: security: - ApiKeyAuth: [] tags: - node 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/NodeList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerNode) Search

func (c ControllerNode) Search(ctx *gin.Context)

swagger:operation GET /nodes/search nodeSearch --- summary: search node description: security: - ApiKeyAuth: [] tags: - node parameters:

  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/NodeSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerNode) Update

func (c ControllerNode) Update(ctx *gin.Context)

swagger:operation PUT /node/{id} nodeUpdateById --- parameters:

  • description: Node ID in: path name: id required: true type: integer
  • description: Update node params in: body name: node required: true schema: $ref: '#/definitions/UpdateNode' type: object

summary: update node by id description: security: - ApiKeyAuth: [] tags: - node responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Node'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerRole

type ControllerRole struct {
	*ControllerCommon
}

func NewControllerRole

func NewControllerRole(common *ControllerCommon) *ControllerRole

func (ControllerRole) Add

func (c ControllerRole) Add(ctx *gin.Context)

swagger:operation POST /role roleAdd --- parameters:

  • description: role params in: body name: role required: true schema: $ref: '#/definitions/NewRole' type: object

summary: add new role description: security: - ApiKeyAuth: [] tags: - role responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Role'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerRole) Delete

func (c ControllerRole) Delete(ctx *gin.Context)

swagger:operation DELETE /role/{name} roleDeleteById --- parameters:

  • description: Role ID in: path name: name required: true type: string

summary: delete role by name description: security: - ApiKeyAuth: [] tags: - role responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerRole) GetAccessList

func (c ControllerRole) GetAccessList(ctx *gin.Context)

swagger:operation GET /role/{name}/access_list roleGetById --- parameters:

  • description: Role name in: path name: name required: true type: string

summary: get access list by role name description: security: - ApiKeyAuth: [] tags: - role responses:

  "200":
    description: OK
    schema:
      type: object
      properties:
        access_list:
          $ref: '#/definitions/AccessList'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerRole) GetByName

func (c ControllerRole) GetByName(ctx *gin.Context)

swagger:operation GET /role/{name} roleGetById --- parameters:

  • description: Role name in: path name: name required: true type: string

summary: get role by name description: security: - ApiKeyAuth: [] tags: - role responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Role'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerRole) GetList

func (c ControllerRole) GetList(ctx *gin.Context)

swagger:operation GET /roles roleList --- summary: get role list description: security: - ApiKeyAuth: [] tags: - role 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/RoleList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerRole) Search

func (c ControllerRole) Search(ctx *gin.Context)

swagger:operation GET /roles/search roleSearch --- summary: search role description: security: - ApiKeyAuth: [] tags: - role parameters:

  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/RoleSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerRole) Update

func (c ControllerRole) Update(ctx *gin.Context)

swagger:operation PUT /role/{name} roleUpdateById --- parameters:

  • description: Role ID in: path name: name required: true type: string
  • description: Update role params in: body name: role required: true schema: $ref: '#/definitions/UpdateRole'

summary: update role by name description: security: - ApiKeyAuth: [] tags: - role responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Role'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerRole) UpdateAccessList

func (c ControllerRole) UpdateAccessList(ctx *gin.Context)

swagger:operation PUT /role/{name}/access_list roleUpdateById --- parameters:

  • description: Role name in: path name: name required: true type: string
  • description: Update access list params in: body name: access_list_diff required: true schema: $ref: '#/definitions/AccessListDiff'

summary: update role access list description: security: - ApiKeyAuth: [] tags: - role responses:

  "200":
    $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerScript

type ControllerScript struct {
	*ControllerCommon
	// contains filtered or unexported fields
}

func NewControllerScript

func NewControllerScript(common *ControllerCommon,
	scriptService *scripts.ScriptService) *ControllerScript

func (ControllerScript) Add

func (c ControllerScript) Add(ctx *gin.Context)

swagger:operation POST /script scriptAdd --- parameters:

  • description: script params in: body name: script required: true schema: $ref: '#/definitions/NewScript' type: object

summary: add new script description: security: - ApiKeyAuth: [] tags: - script responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Script'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerScript) Delete

func (c ControllerScript) Delete(ctx *gin.Context)

swagger:operation DELETE /script/{id} scriptDeleteById --- parameters:

  • description: Script ID in: path name: id required: true type: integer

summary: delete script by id description: security: - ApiKeyAuth: [] tags: - script responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerScript) Exec

func (c ControllerScript) Exec(ctx *gin.Context)

swagger:operation POST /script/{id}/exec scriptExecById --- parameters:

  • description: Script ID in: path name: id required: true type: integer

summary: Execute script by id description: security: - ApiKeyAuth: [] tags: - script responses:

  "200":
	   $ref: '#/responses/ScriptExec'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerScript) ExecSrc

func (c ControllerScript) ExecSrc(ctx *gin.Context)

swagger:operation POST /script/{id}/exec_src scriptExecSrc --- parameters:

  • description: source script in: body name: script required: true schema: $ref: '#/definitions/ExecScript' type: object

summary: Exec script from request params description: security: - ApiKeyAuth: [] tags: - script responses:

  "200":
	   $ref: '#/responses/ScriptExec'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerScript) GetById

func (c ControllerScript) GetById(ctx *gin.Context)

swagger:operation GET /script/{id} scriptGetById --- parameters:

  • description: Script ID in: path name: id required: true type: integer

summary: get script by id description: security: - ApiKeyAuth: [] tags: - script responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Script'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerScript) GetList

func (c ControllerScript) GetList(ctx *gin.Context)

swagger:operation GET /scripts scriptList --- summary: get script list description: security: - ApiKeyAuth: [] tags: - script 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/ScriptList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerScript) Search

func (c ControllerScript) Search(ctx *gin.Context)

swagger:operation GET /scripts/search scriptSearch --- summary: search script description: security: - ApiKeyAuth: [] tags: - script parameters:

  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/ScriptSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerScript) Update

func (c ControllerScript) Update(ctx *gin.Context)

swagger:operation PUT /script/{id} scriptUpdateById --- parameters:

  • description: Script ID in: path name: id required: true type: integer
  • description: Update script params in: body name: script required: true schema: $ref: '#/definitions/UpdateScript' type: object

summary: update script by id description: security: - ApiKeyAuth: [] tags: - script responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Script'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerSwagger

type ControllerSwagger struct {
	*ControllerCommon
}

func NewControllerSwagger

func NewControllerSwagger(common *ControllerCommon) *ControllerSwagger

func (ControllerSwagger) WrapHandler

func (c ControllerSwagger) WrapHandler(h *webdav.Handler) gin.HandlerFunc

type ControllerUser

type ControllerUser struct {
	*ControllerCommon
}

func NewControllerUser

func NewControllerUser(common *ControllerCommon) *ControllerUser

func (ControllerUser) Add

func (c ControllerUser) Add(ctx *gin.Context)

swagger:operation POST /user userAdd --- parameters:

  • description: user params in: body name: user required: true schema: $ref: '#/definitions/NewUser'

summary: add new user description: security: - ApiKeyAuth: [] tags: - user responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/UserFull'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerUser) Delete

func (c ControllerUser) Delete(ctx *gin.Context)

swagger:operation DELETE /user/{id} userDeleteById --- parameters:

  • description: User ID in: path name: id required: true type: integer

summary: delete user by id description: security: - ApiKeyAuth: [] tags: - user responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerUser) GetById

func (c ControllerUser) GetById(ctx *gin.Context)

swagger:operation GET /user/{id} userGetById --- parameters:

  • description: User ID in: path name: id required: true type: integer

summary: get user by id description: security: - ApiKeyAuth: [] tags: - user responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/UserFull'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerUser) GetList

func (c ControllerUser) GetList(ctx *gin.Context)

swagger:operation GET /users userList --- summary: get user list description: security: - ApiKeyAuth: [] tags: - user 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/UserList'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerUser) Update

func (c ControllerUser) Update(ctx *gin.Context)

swagger:operation PUT /user/{id} userUpdateById --- parameters:

  • description: User ID in: path name: id required: true type: integer
  • description: Update user params in: body name: user required: true schema: $ref: '#/definitions/UpdateUser' type: object

summary: update user by id description: security: - ApiKeyAuth: [] tags: - user responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/UserFull'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerUser) UpdateStatus

func (c ControllerUser) UpdateStatus(ctx *gin.Context)

swagger:operation PUT /user/{id}/update_status userUpdateStatus --- parameters:

  • description: User ID in: path name: id required: true type: integer
  • description: status params in: body name: user_status required: true schema: $ref: '#/definitions/UserUpdateStatusRequest'

summary: update user status description: security: - ApiKeyAuth: [] tags: - user responses:

  "200":
    $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllerWorkflow

type ControllerWorkflow struct {
	*ControllerCommon
}

func NewControllerWorkflow

func NewControllerWorkflow(common *ControllerCommon) *ControllerWorkflow

func (ControllerWorkflow) Add

func (c ControllerWorkflow) Add(ctx *gin.Context)

swagger:operation POST /workflow workflowAdd --- parameters:

  • description: workflow params in: body name: workflow required: true schema: $ref: '#/definitions/NewWorkflow' type: object

summary: add new workflow description: security: - ApiKeyAuth: [] tags: - workflow responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/Workflow'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerWorkflow) Delete

func (c ControllerWorkflow) Delete(ctx *gin.Context)

swagger:operation DELETE /workflow/{id} workflowDeleteById --- parameters:

  • description: Workflow ID in: path name: id required: true type: integer

summary: delete workflow by id 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'

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) Search

func (c ControllerWorkflow) Search(ctx *gin.Context)

swagger:operation GET /workflows/search workflowSearch --- summary: search workflow description: security: - ApiKeyAuth: [] tags: - workflow parameters:

  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/WorkflowSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerWorkflow) Update

func (c ControllerWorkflow) Update(ctx *gin.Context)

Workflow godoc swagger:operation PUT /workflow/{id} workflowUpdateById --- parameters:

  • description: Workflow ID in: path name: id required: true type: integer
  • description: Update workflow params in: body name: workflow required: true schema: $ref: '#/definitions/UpdateWorkflow' type: object

summary: update 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) UpdateScenario

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 ControllerWorkflowScenario

type ControllerWorkflowScenario struct {
	*ControllerCommon
}

func NewControllerWorkflowScenario

func NewControllerWorkflowScenario(common *ControllerCommon) *ControllerWorkflowScenario

func (ControllerWorkflowScenario) Add

swagger:operation POST /workflow/{id}/scenario workflowScenarioAdd --- parameters:

  • description: Workflow ID in: path name: id required: true type: integer
  • description: workflow scenario params in: body name: workflow_scenario required: true schema: $ref: '#/definitions/NewWorkflowScenario'

summary: add new workflow scenario description: security: - ApiKeyAuth: [] tags: - workflow_scenario responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/WorkflowScenario'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerWorkflowScenario) Delete

func (c ControllerWorkflowScenario) Delete(ctx *gin.Context)

swagger:operation DELETE /workflow/{id}/scenario/{scenario_id} workflowScenarioDeleteById --- parameters:

  • description: Workflow ID in: path name: id required: true type: integer
  • description: Workflow scenario ID in: path name: scenario_id required: true type: integer

summary: delete workflow scenario by id description: security: - ApiKeyAuth: [] tags: - workflow_scenario responses:

  "200":
	   $ref: '#/responses/Success'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerWorkflowScenario) GetById

func (c ControllerWorkflowScenario) GetById(ctx *gin.Context)

swagger:operation GET /workflow/{id}/scenario/{scenario_id} workflowScenarioGetById --- parameters:

  • description: Workflow ID in: path name: id required: true type: integer
  • description: WorkflowScenario ID in: path name: scenario_id required: true type: integer

summary: get workflow scenario by id description: security: - ApiKeyAuth: [] tags: - workflow_scenario responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/WorkflowScenario'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

func (ControllerWorkflowScenario) GetList

func (c ControllerWorkflowScenario) GetList(ctx *gin.Context)

swagger:operation GET /workflow/{id}/scenarios workflowScenarioList --- summary: get workflow scenario list description: security: - ApiKeyAuth: [] tags: - workflow_scenario parameters:

  • description: Workflow ID in: path name: id required: true type: integer

responses:

  "200":
	   $ref: '#/responses/WorkflowScenarios'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerWorkflowScenario) Search

func (c ControllerWorkflowScenario) Search(ctx *gin.Context)

swagger:operation GET /workflow/{id}/scenarios/search workflowScenarioSearch --- summary: search workflow scenario description: security: - ApiKeyAuth: [] tags: - workflow_scenario parameters:

  • description: Workflow ID in: path name: id required: true type: integer
  • description: query in: query name: query type: string
  • default: 10 description: limit in: query name: limit required: true type: integer
  • default: 0 description: offset in: query name: offset required: true type: integer

responses:

  "200":
	   $ref: '#/responses/WorkflowScenarioSearch'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "500":
	   $ref: '#/responses/Error'

func (ControllerWorkflowScenario) Update

func (c ControllerWorkflowScenario) Update(ctx *gin.Context)

swagger:operation PUT /workflow/{id}/scenario/{scenario_id} workflowScenarioUpdateById --- parameters:

  • description: Workflow ID in: path name: id required: true type: integer
  • description: WorkflowScenario ID in: path name: scenario_id required: true type: integer
  • description: Update workflow scenario params in: body name: workflowScenario required: true schema: $ref: '#/definitions/UpdateWorkflowScenario' type: object

summary: update workflow scenario by id description: security: - ApiKeyAuth: [] tags: - workflow_scenario responses:

  "200":
    description: OK
    schema:
      $ref: '#/definitions/WorkflowScenario'
  "400":
	   $ref: '#/responses/Error'
  "401":
    description: "Unauthorized"
  "403":
    description: "Forbidden"
  "404":
	   $ref: '#/responses/Error'
  "500":
	   $ref: '#/responses/Error'

type ControllersV1

type ControllersV1 struct {
	Index            *ControllerIndex
	Node             *ControllerNode
	Swagger          *ControllerSwagger
	Script           *ControllerScript
	Workflow         *ControllerWorkflow
	Device           *ControllerDevice
	Role             *ControllerRole
	User             *ControllerUser
	Auth             *ControllerAuth
	DeviceAction     *ControllerDeviceAction
	DeviceState      *ControllerDeviceState
	Map              *ControllerMap
	MapLayer         *ControllerMapLayer
	MapElement       *ControllerMapElement
	Image            *ControllerImage
	WorkflowScenario *ControllerWorkflowScenario
	Flow             *ControllerFlow
	Log              *ControllerLog
	Gate             *ControllerGate
}

func NewControllersV1

func NewControllersV1(adaptors *adaptors.Adaptors,
	core *core.Core,
	scriptService *scripts.ScriptService,
	accessList *access_list.AccessListService,
	command *endpoint.Endpoint) *ControllersV1

type Error

type Error struct {
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

func NewError

func NewError(code int, msg ...interface{}) *Error

NewPostAuthTokenDefault creates Error with default headers values

func (*Error) AddField

func (o *Error) AddField(code, message, field string) *Error

func (*Error) AddFieldf

func (o *Error) AddFieldf(name, code string, N ...int) *Error

func (*Error) CheckNum

func (o *Error) CheckNum(num interface{}, name string, min, max float64) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Errors

func (o *Error) Errors() bool

func (*Error) Fields

func (o *Error) Fields() []*models.ErrorErrorsItems

func (*Error) Send

func (e *Error) Send(ctx *gin.Context)

func (*Error) SetMessage

func (o *Error) SetMessage(err error) *Error

func (*Error) ValidationToErrors

func (e *Error) ValidationToErrors(errs []*validation.Error) *Error

type Response

type Response struct {
	StatusCode int
	Payload    interface{}
}

simple response

func NewSuccess

func NewSuccess() *Response

func (*Response) Item

func (r *Response) Item(name string, item interface{}) *Response

func (*Response) Page

func (r *Response) Page(limit, offset int, total int64, items interface{}) *Response

func (*Response) Send

func (r *Response) Send(ctx *gin.Context)

func (*Response) SetData

func (r *Response) SetData(data interface{}) *Response

func (*Response) Success

func (r *Response) Success() *Response

Jump to

Keyboard shortcuts

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