upload

package
v1.29.0-mobile.10 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: BSD-2-Clause Imports: 7 Imported by: 8

Documentation

Index

Constants

View Source
const (
	Type = "upload"

	ComputerTimeFormat                   = "2006-01-02T15:04:05"
	DataSetTypeContinuous                = "continuous"
	DataSetTypeNormal                    = "normal"
	DeviceTagBGM                         = "bgm"
	DeviceTagCGM                         = "cgm"
	DeviceTagInsulinPump                 = "insulin-pump"
	StateClosed                          = "closed"
	StateOpen                            = "open"
	TimeProcessingAcrossTheBoardTimeZone = "across-the-board-timezone" // TODO: Rename to across-the-board-time-zone or alternative
	TimeProcessingNone                   = "none"
	TimeProcessingUTCBootstrapping       = "utc-bootstrapping" // TODO: Rename to utc-bootstrap or alternative
	VersionLengthMinimum                 = 5
)

Variables

This section is empty.

Functions

func DataSetTypes added in v1.24.0

func DataSetTypes() []string

func DeviceTags added in v1.24.0

func DeviceTags() []string

func NewDatum

func NewDatum() data.Datum

func States added in v1.24.0

func States() []string

func TimeProcessings added in v1.24.0

func TimeProcessings() []string

Types

type Client added in v1.20.0

type Client struct {
	Name    *string    `json:"name,omitempty" bson:"name,omitempty"`
	Version *string    `json:"version,omitempty" bson:"version,omitempty"`
	Private *data.Blob `json:"private,omitempty" bson:"private,omitempty"`
}

func NewClient added in v1.20.0

func NewClient() *Client

func ParseClient added in v1.20.0

func ParseClient(parser data.ObjectParser) *Client

func (*Client) Normalize added in v1.20.0

func (c *Client) Normalize(normalizer data.Normalizer)

func (*Client) Parse added in v1.20.0

func (c *Client) Parse(parser data.ObjectParser)

func (*Client) Validate added in v1.20.0

func (c *Client) Validate(validator structure.Validator)

type Upload

type Upload struct {
	types.Base `bson:",inline"`

	ByUser              *string   `json:"byUser,omitempty" bson:"byUser,omitempty"` // TODO: Deprecate in favor of CreatedUserID
	Client              *Client   `json:"client,omitempty" bson:"client,omitempty"`
	ComputerTime        *string   `json:"computerTime,omitempty" bson:"computerTime,omitempty"` // TODO: Do we really need this? CreatedTime should suffice.
	DataSetType         *string   `json:"dataSetType,omitempty" bson:"dataSetType,omitempty"`   // TODO: Migrate to "type" after migration to DataSet (not based on Base)
	DataState           *string   `json:"-" bson:"_dataState,omitempty"`                        // TODO: Deprecated! (remove after data migration)
	DeviceManufacturers *[]string `json:"deviceManufacturers,omitempty" bson:"deviceManufacturers,omitempty"`
	DeviceModel         *string   `json:"deviceModel,omitempty" bson:"deviceModel,omitempty"`
	DeviceSerialNumber  *string   `json:"deviceSerialNumber,omitempty" bson:"deviceSerialNumber,omitempty"`
	DeviceTags          *[]string `json:"deviceTags,omitempty" bson:"deviceTags,omitempty"`
	State               *string   `json:"-" bson:"_state,omitempty"` // TODO: Should this be returned in JSON? I think so.
	TimeProcessing      *string   `json:"timeProcessing,omitempty" bson:"timeProcessing,omitempty"`
	Version             *string   `json:"version,omitempty" bson:"version,omitempty"` // TODO: Deprecate in favor of Client.Version
}

func New

func New() *Upload

func NewUpload added in v1.26.0

func NewUpload(parser data.ObjectParser) *Upload

func ParseUpload added in v1.26.0

func ParseUpload(parser data.ObjectParser) *Upload

func (*Upload) HasDataSetTypeContinuous added in v1.29.0

func (u *Upload) HasDataSetTypeContinuous() bool

func (*Upload) HasDataSetTypeNormal added in v1.29.0

func (u *Upload) HasDataSetTypeNormal() bool

func (*Upload) HasDeduplicatorName added in v1.29.0

func (u *Upload) HasDeduplicatorName() bool

func (*Upload) HasDeduplicatorNameMatch added in v1.29.0

func (u *Upload) HasDeduplicatorNameMatch(name string) bool

func (*Upload) Normalize

func (u *Upload) Normalize(normalizer data.Normalizer)

func (*Upload) Parse

func (u *Upload) Parse(parser data.ObjectParser) error

func (*Upload) Validate

func (u *Upload) Validate(validator structure.Validator)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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