views

package
v0.0.0-...-b9360c4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StationFullMap is a map of attribute names in result type StationFull
	// indexed by view name.
	StationFullMap = map[string][]string{
		"default": []string{
			"id",
			"name",
			"model",
			"owner",
			"deviceId",
			"interestingness",
			"attributes",
			"uploads",
			"photos",
			"readOnly",
			"hidden",
			"description",
			"status",
			"battery",
			"recordingStartedAt",
			"memoryUsed",
			"memoryAvailable",
			"firmwareNumber",
			"firmwareTime",
			"configurations",
			"updatedAt",
			"lastReadingAt",
			"location",
			"locationName",
			"placeNameOther",
			"placeNameNative",
			"syncedAt",
			"ingestionAt",
			"data",
		},
	}
	// StationsFullMap is a map of attribute names in result type StationsFull
	// indexed by view name.
	StationsFullMap = map[string][]string{
		"default": []string{
			"stations",
		},
	}
	// AssociatedStationsMap is a map of attribute names in result type
	// AssociatedStations indexed by view name.
	AssociatedStationsMap = map[string][]string{
		"default": []string{
			"stations",
		},
	}
	// DownloadedPhotoMap is a map of attribute names in result type
	// DownloadedPhoto indexed by view name.
	DownloadedPhotoMap = map[string][]string{
		"default": []string{
			"length",
			"body",
			"contentType",
			"etag",
		},
	}
	// PageOfStationsMap is a map of attribute names in result type PageOfStations
	// indexed by view name.
	PageOfStationsMap = map[string][]string{
		"default": []string{
			"stations",
			"total",
		},
	}
	// StationProgressMap is a map of attribute names in result type
	// StationProgress indexed by view name.
	StationProgressMap = map[string][]string{
		"default": []string{
			"jobs",
		},
	}
	// StationLocationMap is a map of attribute names in result type
	// StationLocation indexed by view name.
	StationLocationMap = map[string][]string{
		"default": []string{
			"precise",
			"regions",
			"url",
		},
	}
	// StationFullCollectionMap is a map of attribute names in result type
	// StationFullCollection indexed by view name.
	StationFullCollectionMap = map[string][]string{
		"default": []string{
			"id",
			"name",
			"model",
			"owner",
			"deviceId",
			"interestingness",
			"attributes",
			"uploads",
			"photos",
			"readOnly",
			"hidden",
			"description",
			"status",
			"battery",
			"recordingStartedAt",
			"memoryUsed",
			"memoryAvailable",
			"firmwareNumber",
			"firmwareTime",
			"configurations",
			"updatedAt",
			"lastReadingAt",
			"location",
			"locationName",
			"placeNameOther",
			"placeNameNative",
			"syncedAt",
			"ingestionAt",
			"data",
		},
	}
	// AssociatedStationCollectionMap is a map of attribute names in result type
	// AssociatedStationCollection indexed by view name.
	AssociatedStationCollectionMap = map[string][]string{
		"default": []string{
			"station",
			"project",
			"location",
			"manual",
			"hidden",
		},
	}
	// AssociatedStationMap is a map of attribute names in result type
	// AssociatedStation indexed by view name.
	AssociatedStationMap = map[string][]string{
		"default": []string{
			"station",
			"project",
			"location",
			"manual",
			"hidden",
		},
	}
	// StationJobMap is a map of attribute names in result type StationJob indexed
	// by view name.
	StationJobMap = map[string][]string{
		"default": []string{
			"startedAt",
			"completedAt",
			"progress",
			"title",
		},
	}
)

Functions

func ValidateAssociatedStationCollectionView

func ValidateAssociatedStationCollectionView(result AssociatedStationCollectionView) (err error)

ValidateAssociatedStationCollectionView runs the validations defined on AssociatedStationCollectionView using the "default" view.

func ValidateAssociatedStationView

func ValidateAssociatedStationView(result *AssociatedStationView) (err error)

ValidateAssociatedStationView runs the validations defined on AssociatedStationView using the "default" view.

func ValidateAssociatedStations

func ValidateAssociatedStations(result *AssociatedStations) (err error)

ValidateAssociatedStations runs the validations defined on the viewed result type AssociatedStations.

func ValidateAssociatedStationsView

func ValidateAssociatedStationsView(result *AssociatedStationsView) (err error)

ValidateAssociatedStationsView runs the validations defined on AssociatedStationsView using the "default" view.

func ValidateAssociatedViaLocationView

func ValidateAssociatedViaLocationView(result *AssociatedViaLocationView) (err error)

ValidateAssociatedViaLocationView runs the validations defined on AssociatedViaLocationView.

func ValidateAssociatedViaManualView

func ValidateAssociatedViaManualView(result *AssociatedViaManualView) (err error)

ValidateAssociatedViaManualView runs the validations defined on AssociatedViaManualView.

func ValidateAssociatedViaProjectView

func ValidateAssociatedViaProjectView(result *AssociatedViaProjectView) (err error)

ValidateAssociatedViaProjectView runs the validations defined on AssociatedViaProjectView.

func ValidateDownloadedPhoto

func ValidateDownloadedPhoto(result *DownloadedPhoto) (err error)

ValidateDownloadedPhoto runs the validations defined on the viewed result type DownloadedPhoto.

func ValidateDownloadedPhotoView

func ValidateDownloadedPhotoView(result *DownloadedPhotoView) (err error)

ValidateDownloadedPhotoView runs the validations defined on DownloadedPhotoView using the "default" view.

func ValidateEssentialStationView

func ValidateEssentialStationView(result *EssentialStationView) (err error)

ValidateEssentialStationView runs the validations defined on EssentialStationView.

func ValidatePageOfStations

func ValidatePageOfStations(result *PageOfStations) (err error)

ValidatePageOfStations runs the validations defined on the viewed result type PageOfStations.

func ValidatePageOfStationsView

func ValidatePageOfStationsView(result *PageOfStationsView) (err error)

ValidatePageOfStationsView runs the validations defined on PageOfStationsView using the "default" view.

func ValidateSensorRangeView

func ValidateSensorRangeView(result *SensorRangeView) (err error)

ValidateSensorRangeView runs the validations defined on SensorRangeView.

func ValidateSensorReadingView

func ValidateSensorReadingView(result *SensorReadingView) (err error)

ValidateSensorReadingView runs the validations defined on SensorReadingView.

func ValidateStationConfigurationView

func ValidateStationConfigurationView(result *StationConfigurationView) (err error)

ValidateStationConfigurationView runs the validations defined on StationConfigurationView.

func ValidateStationConfigurationsView

func ValidateStationConfigurationsView(result *StationConfigurationsView) (err error)

ValidateStationConfigurationsView runs the validations defined on StationConfigurationsView.

func ValidateStationDataSummaryView

func ValidateStationDataSummaryView(result *StationDataSummaryView) (err error)

ValidateStationDataSummaryView runs the validations defined on StationDataSummaryView.

func ValidateStationFull

func ValidateStationFull(result *StationFull) (err error)

ValidateStationFull runs the validations defined on the viewed result type StationFull.

func ValidateStationFullCollectionView

func ValidateStationFullCollectionView(result StationFullCollectionView) (err error)

ValidateStationFullCollectionView runs the validations defined on StationFullCollectionView using the "default" view.

func ValidateStationFullModelView

func ValidateStationFullModelView(result *StationFullModelView) (err error)

ValidateStationFullModelView runs the validations defined on StationFullModelView.

func ValidateStationFullView

func ValidateStationFullView(result *StationFullView) (err error)

ValidateStationFullView runs the validations defined on StationFullView using the "default" view.

func ValidateStationInterestingnessView

func ValidateStationInterestingnessView(result *StationInterestingnessView) (err error)

ValidateStationInterestingnessView runs the validations defined on StationInterestingnessView.

func ValidateStationInterestingnessWindowView

func ValidateStationInterestingnessWindowView(result *StationInterestingnessWindowView) (err error)

ValidateStationInterestingnessWindowView runs the validations defined on StationInterestingnessWindowView.

func ValidateStationJobView

func ValidateStationJobView(result *StationJobView) (err error)

ValidateStationJobView runs the validations defined on StationJobView using the "default" view.

func ValidateStationLocationView

func ValidateStationLocationView(result *StationLocationView) (err error)

ValidateStationLocationView runs the validations defined on StationLocationView using the "default" view.

func ValidateStationModuleView

func ValidateStationModuleView(result *StationModuleView) (err error)

ValidateStationModuleView runs the validations defined on StationModuleView.

func ValidateStationOwnerView

func ValidateStationOwnerView(result *StationOwnerView) (err error)

ValidateStationOwnerView runs the validations defined on StationOwnerView.

func ValidateStationPhotosView

func ValidateStationPhotosView(result *StationPhotosView) (err error)

ValidateStationPhotosView runs the validations defined on StationPhotosView.

func ValidateStationProgress

func ValidateStationProgress(result *StationProgress) (err error)

ValidateStationProgress runs the validations defined on the viewed result type StationProgress.

func ValidateStationProgressView

func ValidateStationProgressView(result *StationProgressView) (err error)

ValidateStationProgressView runs the validations defined on StationProgressView using the "default" view.

func ValidateStationProjectAttributeView

func ValidateStationProjectAttributeView(result *StationProjectAttributeView) (err error)

ValidateStationProjectAttributeView runs the validations defined on StationProjectAttributeView.

func ValidateStationProjectAttributesView

func ValidateStationProjectAttributesView(result *StationProjectAttributesView) (err error)

ValidateStationProjectAttributesView runs the validations defined on StationProjectAttributesView.

func ValidateStationRegionView

func ValidateStationRegionView(result *StationRegionView) (err error)

ValidateStationRegionView runs the validations defined on StationRegionView.

func ValidateStationSensorView

func ValidateStationSensorView(result *StationSensorView) (err error)

ValidateStationSensorView runs the validations defined on StationSensorView.

func ValidateStationUploadView

func ValidateStationUploadView(result *StationUploadView) (err error)

ValidateStationUploadView runs the validations defined on StationUploadView.

func ValidateStationsFull

func ValidateStationsFull(result *StationsFull) (err error)

ValidateStationsFull runs the validations defined on the viewed result type StationsFull.

func ValidateStationsFullView

func ValidateStationsFullView(result *StationsFullView) (err error)

ValidateStationsFullView runs the validations defined on StationsFullView using the "default" view.

func ValidateUserPhotoView

func ValidateUserPhotoView(result *UserPhotoView) (err error)

ValidateUserPhotoView runs the validations defined on UserPhotoView.

Types

type AssociatedStationCollectionView

type AssociatedStationCollectionView []*AssociatedStationView

AssociatedStationCollectionView is a type that runs validations on a projected type.

type AssociatedStationView

type AssociatedStationView struct {
	Station  *StationFullView
	Project  []*AssociatedViaProjectView
	Location []*AssociatedViaLocationView
	Manual   []*AssociatedViaManualView
	Hidden   *bool
}

AssociatedStationView is a type that runs validations on a projected type.

type AssociatedStations

type AssociatedStations struct {
	// Type to project
	Projected *AssociatedStationsView
	// View to render
	View string
}

AssociatedStations is the viewed result type that is projected based on a view.

type AssociatedStationsView

type AssociatedStationsView struct {
	Stations AssociatedStationCollectionView
}

AssociatedStationsView is a type that runs validations on a projected type.

type AssociatedViaLocationView

type AssociatedViaLocationView struct {
	StationID *int32
	Distance  *float32
}

AssociatedViaLocationView is a type that runs validations on a projected type.

type AssociatedViaManualView

type AssociatedViaManualView struct {
	OtherStationID *int32
	Priority       *int32
}

AssociatedViaManualView is a type that runs validations on a projected type.

type AssociatedViaProjectView

type AssociatedViaProjectView struct {
	ID *int32
}

AssociatedViaProjectView is a type that runs validations on a projected type.

type DownloadedPhoto

type DownloadedPhoto struct {
	// Type to project
	Projected *DownloadedPhotoView
	// View to render
	View string
}

DownloadedPhoto is the viewed result type that is projected based on a view.

type DownloadedPhotoView

type DownloadedPhotoView struct {
	Length      *int64
	ContentType *string
	Etag        *string
	Body        []byte
}

DownloadedPhotoView is a type that runs validations on a projected type.

type EssentialStationView

type EssentialStationView struct {
	ID                 *int64
	DeviceID           *string
	Name               *string
	Owner              *StationOwnerView
	CreatedAt          *int64
	UpdatedAt          *int64
	RecordingStartedAt *int64
	MemoryUsed         *int32
	MemoryAvailable    *int32
	FirmwareNumber     *int32
	FirmwareTime       *int64
	Location           *StationLocationView
	LastIngestionAt    *int64
}

EssentialStationView is a type that runs validations on a projected type.

type PageOfStations

type PageOfStations struct {
	// Type to project
	Projected *PageOfStationsView
	// View to render
	View string
}

PageOfStations is the viewed result type that is projected based on a view.

type PageOfStationsView

type PageOfStationsView struct {
	Stations []*EssentialStationView
	Total    *int32
}

PageOfStationsView is a type that runs validations on a projected type.

type SensorRangeView

type SensorRangeView struct {
	Minimum *float32
	Maximum *float32
}

SensorRangeView is a type that runs validations on a projected type.

type SensorReadingView

type SensorReadingView struct {
	Last *float32
	Time *int64
}

SensorReadingView is a type that runs validations on a projected type.

type StationConfigurationView

type StationConfigurationView struct {
	ID           *int64
	Time         *int64
	ProvisionID  *int64
	MetaRecordID *int64
	SourceID     *int32
	Modules      []*StationModuleView
}

StationConfigurationView is a type that runs validations on a projected type.

type StationConfigurationsView

type StationConfigurationsView struct {
	All []*StationConfigurationView
}

StationConfigurationsView is a type that runs validations on a projected type.

type StationDataSummaryView

type StationDataSummaryView struct {
	Start           *int64
	End             *int64
	NumberOfSamples *int64
}

StationDataSummaryView is a type that runs validations on a projected type.

type StationFull

type StationFull struct {
	// Type to project
	Projected *StationFullView
	// View to render
	View string
}

StationFull is the viewed result type that is projected based on a view.

type StationFullCollectionView

type StationFullCollectionView []*StationFullView

StationFullCollectionView is a type that runs validations on a projected type.

type StationFullModelView

type StationFullModelView struct {
	Name                      *string
	OnlyVisibleViaAssociation *bool
}

StationFullModelView is a type that runs validations on a projected type.

type StationFullView

type StationFullView struct {
	ID                 *int32
	Name               *string
	Model              *StationFullModelView
	Owner              *StationOwnerView
	DeviceID           *string
	Interestingness    *StationInterestingnessView
	Attributes         *StationProjectAttributesView
	Uploads            []*StationUploadView
	Photos             *StationPhotosView
	ReadOnly           *bool
	Status             *string
	Hidden             *bool
	Description        *string
	Battery            *float32
	RecordingStartedAt *int64
	MemoryUsed         *int32
	MemoryAvailable    *int32
	FirmwareNumber     *int32
	FirmwareTime       *int64
	Configurations     *StationConfigurationsView
	UpdatedAt          *int64
	LastReadingAt      *int64
	LocationName       *string
	PlaceNameOther     *string
	PlaceNameNative    *string
	Location           *StationLocationView
	SyncedAt           *int64
	IngestionAt        *int64
	Data               *StationDataSummaryView
}

StationFullView is a type that runs validations on a projected type.

type StationInterestingnessView

type StationInterestingnessView struct {
	Windows []*StationInterestingnessWindowView
}

StationInterestingnessView is a type that runs validations on a projected type.

type StationInterestingnessWindowView

type StationInterestingnessWindowView struct {
	Seconds         *int32
	Interestingness *float64
	Value           *float64
	Time            *int64
}

StationInterestingnessWindowView is a type that runs validations on a projected type.

type StationJobView

type StationJobView struct {
	Title       *string
	StartedAt   *int64
	CompletedAt *int64
	Progress    *float32
}

StationJobView is a type that runs validations on a projected type.

type StationLocationView

type StationLocationView struct {
	Precise []float64
	Regions []*StationRegionView
	URL     *string
}

StationLocationView is a type that runs validations on a projected type.

type StationModuleView

type StationModuleView struct {
	ID               *int64
	HardwareID       *string
	HardwareIDBase64 *string
	MetaRecordID     *int64
	Name             *string
	Label            *string
	Position         *int32
	Flags            *int32
	Internal         *bool
	FullKey          *string
	Sensors          []*StationSensorView
	Meta             map[string]interface{}
}

StationModuleView is a type that runs validations on a projected type.

type StationOwnerView

type StationOwnerView struct {
	ID    *int32
	Name  *string
	Email *string
	Photo *UserPhotoView
}

StationOwnerView is a type that runs validations on a projected type.

type StationPhotosView

type StationPhotosView struct {
	Small *string
}

StationPhotosView is a type that runs validations on a projected type.

type StationProgress

type StationProgress struct {
	// Type to project
	Projected *StationProgressView
	// View to render
	View string
}

StationProgress is the viewed result type that is projected based on a view.

type StationProgressView

type StationProgressView struct {
	Jobs []*StationJobView
}

StationProgressView is a type that runs validations on a projected type.

type StationProjectAttributeView

type StationProjectAttributeView struct {
	ProjectID   *int32
	AttributeID *int64
	Name        *string
	StringValue *string
	Priority    *int32
}

StationProjectAttributeView is a type that runs validations on a projected type.

type StationProjectAttributesView

type StationProjectAttributesView struct {
	Attributes []*StationProjectAttributeView
}

StationProjectAttributesView is a type that runs validations on a projected type.

type StationRegionView

type StationRegionView struct {
	Name  *string
	Shape [][][]float64
}

StationRegionView is a type that runs validations on a projected type.

type StationSensorView

type StationSensorView struct {
	Name          *string
	UnitOfMeasure *string
	Reading       *SensorReadingView
	Key           *string
	FullKey       *string
	Ranges        []*SensorRangeView
	Meta          map[string]interface{}
}

StationSensorView is a type that runs validations on a projected type.

type StationUploadView

type StationUploadView struct {
	ID       *int64
	Time     *int64
	UploadID *string
	Size     *int64
	URL      *string
	Type     *string
	Blocks   []int64
}

StationUploadView is a type that runs validations on a projected type.

type StationsFull

type StationsFull struct {
	// Type to project
	Projected *StationsFullView
	// View to render
	View string
}

StationsFull is the viewed result type that is projected based on a view.

type StationsFullView

type StationsFullView struct {
	Stations StationFullCollectionView
}

StationsFullView is a type that runs validations on a projected type.

type UserPhotoView

type UserPhotoView struct {
	URL *string
}

UserPhotoView is a type that runs validations on a projected type.

Jump to

Keyboard shortcuts

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