upload

package
v0.0.0-...-ebd6d4f Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Upload

type Upload struct {
	ID           uint                      `json:"id"`
	DeviceID     uint                      `json:"device_id"`
	ServerTime   twomes.Time               `json:"server_time"`
	DeviceTime   twomes.Time               `json:"device_time"`
	Size         int                       `json:"size"`
	Measurements []measurement.Measurement `json:"measurements,omitempty"`
}

An Upload is a collection of measurements, with additional information.

func MakeUpload

func MakeUpload(deviceID uint, deviceTime twomes.Time, measurements []measurement.Measurement) Upload

Create a new Upload.

type UploadRepository

type UploadRepository interface {
	Find(Upload Upload) (Upload, error)
	GetAll() ([]Upload, error)
	Create(Upload) (Upload, error)
	Delete(Upload) error
	GetLatestUploadForDeviceWithID(id uint) (Upload, error)
}

An UploadRepository can load, store and delete uploads.

Jump to

Keyboard shortcuts

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