types

package
v1.29.0-mobile.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: BSD-2-Clause Imports: 11 Imported by: 12

Documentation

Index

Constants

View Source
const (
	ArchivedTimeFormat      = time.RFC3339
	ClockDriftOffsetMaximum = 24 * 60 * 60 * 1000  // TODO: Fix! Limit to reasonable values
	ClockDriftOffsetMinimum = -24 * 60 * 60 * 1000 // TODO: Fix! Limit to reasonable values
	CreatedTimeFormat       = time.RFC3339
	DeletedTimeFormat       = time.RFC3339
	DeviceTimeFormat        = "2006-01-02T15:04:05"
	ModifiedTimeFormat      = time.RFC3339
	NoteLengthMaximum       = 1000
	NotesLengthMaximum      = 100
	SchemaVersionCurrent    = SchemaVersionMaximum
	SchemaVersionMaximum    = 3
	SchemaVersionMinimum    = 1
	TagLengthMaximum        = 100
	TagsLengthMaximum       = 100
	TimeFormat              = time.RFC3339
	TimeZoneOffsetMaximum   = 7 * 24 * 60  // TODO: Fix! Limit to reasonable values
	TimeZoneOffsetMinimum   = -7 * 24 * 60 // TODO: Fix! Limit to reasonable values
	VersionMinimum          = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Active            bool                                         `json:"-" bson:"_active"`
	Annotations       *data.BlobArray                              `json:"annotations,omitempty" bson:"annotations,omitempty"`
	ArchivedDataSetID *string                                      `json:"archivedDatasetId,omitempty" bson:"archivedDatasetId,omitempty"`
	ArchivedTime      *string                                      `json:"archivedTime,omitempty" bson:"archivedTime,omitempty"`
	Associations      *dataTypesCommonAssociation.AssociationArray `json:"associations,omitempty" bson:"associations,omitempty"`
	ClockDriftOffset  *int                                         `json:"clockDriftOffset,omitempty" bson:"clockDriftOffset,omitempty"`
	ConversionOffset  *int                                         `json:"conversionOffset,omitempty" bson:"conversionOffset,omitempty"`
	CreatedTime       *string                                      `json:"createdTime,omitempty" bson:"createdTime,omitempty"`
	CreatedUserID     *string                                      `json:"createdUserId,omitempty" bson:"createdUserId,omitempty"`
	Deduplicator      *data.DeduplicatorDescriptor                 `json:"deduplicator,omitempty" bson:"_deduplicator,omitempty"`
	DeletedTime       *string                                      `json:"deletedTime,omitempty" bson:"deletedTime,omitempty"`
	DeletedUserID     *string                                      `json:"deletedUserId,omitempty" bson:"deletedUserId,omitempty"`
	DeviceID          *string                                      `json:"deviceId,omitempty" bson:"deviceId,omitempty"`
	DeviceTime        *string                                      `json:"deviceTime,omitempty" bson:"deviceTime,omitempty"`
	GUID              *string                                      `json:"guid,omitempty" bson:"guid,omitempty"`
	ID                *string                                      `json:"id,omitempty" bson:"id,omitempty"`
	Location          *dataTypesCommonLocation.Location            `json:"location,omitempty" bson:"location,omitempty"`
	ModifiedTime      *string                                      `json:"modifiedTime,omitempty" bson:"modifiedTime,omitempty"`
	ModifiedUserID    *string                                      `json:"modifiedUserId,omitempty" bson:"modifiedUserId,omitempty"`
	Notes             *[]string                                    `json:"notes,omitempty" bson:"notes,omitempty"`
	Origin            *dataTypesCommonOrigin.Origin                `json:"origin,omitempty" bson:"origin,omitempty"`
	Payload           *data.Blob                                   `json:"payload,omitempty" bson:"payload,omitempty"`
	SchemaVersion     int                                          `json:"-" bson:"_schemaVersion,omitempty"`
	Source            *string                                      `json:"source,omitempty" bson:"source,omitempty"`
	Tags              *[]string                                    `json:"tags,omitempty" bson:"tags,omitempty"`
	Time              *string                                      `json:"time,omitempty" bson:"time,omitempty"`
	TimeZoneName      *string                                      `json:"timezone,omitempty" bson:"timezone,omitempty"`             // TODO: Rename to timeZoneName
	TimeZoneOffset    *int                                         `json:"timezoneOffset,omitempty" bson:"timezoneOffset,omitempty"` // TODO: Rename to timeZoneOffset
	Type              string                                       `json:"type,omitempty" bson:"type,omitempty"`
	UploadID          *string                                      `json:"uploadId,omitempty" bson:"uploadId,omitempty"`
	UserID            *string                                      `json:"-" bson:"_userId,omitempty"`
	Version           int                                          `json:"-" bson:"_version,omitempty"`
}

func New added in v1.26.0

func New(typ string) Base

func (*Base) DeduplicatorDescriptor

func (b *Base) DeduplicatorDescriptor() *data.DeduplicatorDescriptor

func (*Base) GetPayload added in v1.20.0

func (b *Base) GetPayload() *data.Blob

func (*Base) IdentityFields

func (b *Base) IdentityFields() ([]string, error)

func (*Base) Meta

func (b *Base) Meta() interface{}

func (*Base) Normalize

func (b *Base) Normalize(normalizer data.Normalizer)

func (*Base) Parse

func (b *Base) Parse(parser data.ObjectParser) error

func (*Base) SetActive

func (b *Base) SetActive(active bool)

func (*Base) SetCreatedTime

func (b *Base) SetCreatedTime(createdTime *string)

func (*Base) SetCreatedUserID

func (b *Base) SetCreatedUserID(createdUserID *string)

func (*Base) SetDataSetID added in v1.28.0

func (b *Base) SetDataSetID(dataSetID *string)

func (*Base) SetDeduplicatorDescriptor

func (b *Base) SetDeduplicatorDescriptor(deduplicatorDescriptor *data.DeduplicatorDescriptor)

func (*Base) SetDeletedTime

func (b *Base) SetDeletedTime(deletedTime *string)

func (*Base) SetDeletedUserID

func (b *Base) SetDeletedUserID(deletedUserID *string)

func (*Base) SetDeviceID added in v1.20.0

func (b *Base) SetDeviceID(deviceID *string)

func (*Base) SetModifiedTime

func (b *Base) SetModifiedTime(modifiedTime *string)

func (*Base) SetModifiedUserID

func (b *Base) SetModifiedUserID(modifiedUserID *string)

func (*Base) SetUserID

func (b *Base) SetUserID(userID *string)

func (*Base) Validate

func (b *Base) Validate(validator structure.Validator)

type Meta

type Meta struct {
	Type string `json:"type,omitempty"`
}

Jump to

Keyboard shortcuts

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