sensorData

package
v0.0.0-...-4c45443 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllRequestParamsDTO

type AllRequestParamsDTO struct {
	paging.PagingRequest
	NodeID       *uint64
	TimestampMin *time.Time
	TimestampMax *time.Time
}

func NewAllRequestParamsDTO

func NewAllRequestParamsDTO(ctx echo.Context) AllRequestParamsDTO

func (AllRequestParamsDTO) ToAllResponseParamsDTO

func (arp AllRequestParamsDTO) ToAllResponseParamsDTO() AllResponseParamsDTO

func (AllRequestParamsDTO) WhereQuery

func (arp AllRequestParamsDTO) WhereQuery(orm *gorm.DB) *gorm.DB

type AllResponseParamsDTO

type AllResponseParamsDTO struct {
	paging.PagingRequest
	Timestamp *TimestampResponseParamDTO `json:"timestamp,omitempty"`
	NodeID    *uint64                    `json:"node_id,omitempty"`
}

type CreateDTO

type CreateDTO struct {
	NodeID     uint64
	NodeLabel  string
	Code       string
	Category   string
	Value      float64
	Unit       string
	GroupLabel string
	GroupTh    uint32
	Timestamp  time.Time
	CreatedBy  string
}

func (CreateDTO) ToResponseDTO

func (c CreateDTO) ToResponseDTO() ResponseDTO

type GetAllResponseDTO

type GetAllResponseDTO struct {
	Next   bool                 `json:"next"`
	Count  int                  `json:"count"`
	Params AllResponseParamsDTO `json:"params"`
	Items  []ResponseDTO        `json:"items"`
}

func NewGetAllResponseDTO

func NewGetAllResponseDTO(params AllRequestParamsDTO, items []ResponseDTO, next bool) GetAllResponseDTO

type PostFromNodeRequestDTO

type PostFromNodeRequestDTO struct {
	Token     string          `validate:"required"`
	Data      map[int]float64 `validate:"required"`
	Timestamp time.Time       `validate:"required"`
}

type PostFromNodeResponseDTO

type PostFromNodeResponseDTO struct {
	Node nodeDTO.ResponseDTO `json:"node"`
	Data []ResponseDTO       `json:"data"`
}

type ResponseDTO

type ResponseDTO struct {
	ID         uint64    `json:"id,omitempty"`
	NodeID     uint64    `json:"node_id"`
	NodeLabel  string    `json:"node_label"`
	Code       string    `json:"code"`
	Category   string    `json:"category"`
	Value      float64   `json:"value"`
	Unit       string    `json:"unit"`
	GroupLabel string    `json:"group_label"`
	GroupTh    uint32    `json:"group_th"`
	Timestamp  time.Time `json:"timestamp"`
}

type TimestampResponseParamDTO

type TimestampResponseParamDTO struct {
	Min *time.Time `json:"min,omitempty"`
	Max *time.Time `json:"max,omitempty"`
}

Jump to

Keyboard shortcuts

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