Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeBinaryString(s string) ([]byte, error)
- func Logger(ctx context.Context) *zap.Logger
- func Name(name string) string
- func ParseBlocks(s string) ([]int64, error)
- func PostNotificationToMap(n *Notification, p *DiscussionPost, u *User) map[string]interface{}
- func QueryAsObject(ctx context.Context, db *sqlxcache.DB, query string) ([]map[string]interface{}, error)
- func ScanProjectUpdateWM(rows *sqlx.Rows) (interface{}, error)
- func ScanStationIngestionWM(rows *sqlx.Rows) (interface{}, error)
- func SelectContextCustom(ctx context.Context, db *sqlxcache.DB, destination interface{}, mapFn MapFunc, ...) error
- type AggregatedReading
- type AuthorOrUploaderWM
- type Bookmark
- type BookmarkSensor
- type BookmarkViz
- type DataEvent
- type DataEvents
- type DataExport
- type DataRecord
- type DescribeLocations
- type DiscussionPost
- type Envelope
- type EssentialStation
- type FieldNoteMedia
- type Firmware
- type FollowersSummary
- type GroupBookmark
- type IncomingReading
- type IngestedWM
- type Ingestion
- type Int64Range
- type Interestingness
- type InterestingnessFunction
- type Location
- func (l *Location) Coordinates() []float64
- func (l *Location) Distance(o *Location) float64
- func (l *Location) IsZero() bool
- func (l *Location) Latitude() float64
- func (l *Location) Longitude() float64
- func (l *Location) MarshalJSON() ([]byte, error)
- func (l *Location) Scan(data interface{}) error
- func (l *Location) String() string
- func (l *Location) UnmarshalJSON(data []byte) error
- func (l *Location) Valid() bool
- func (l *Location) Value() (driver.Value, error)
- type LocationDescription
- type MapFunc
- type MaximumInterestingessFunction
- type MetaRecord
- type ModuleSensor
- type MultiPolygon
- type NativeLandInfo
- type NativeLandProperties
- type NativeLandResponse
- type Note
- type NoteMediaLink
- type Notification
- type NotificationPost
- type NotificationUser
- type NotificationUserPhoto
- type NowFunc
- type NumericWireTime
- type OtherLandFeature
- type OtherLandResponse
- type PageOfDiscussion
- type PrivacyType
- type Project
- type ProjectActivity
- type ProjectAttribute
- type ProjectInvite
- type ProjectStation
- type ProjectStationActivity
- type ProjectUpdate
- type ProjectUpdateWM
- type ProjectUser
- type ProjectUserAndProject
- type ProjectUserAndUser
- type Provision
- type QueJob
- type Querier
- type QueryingSpec
- type QueuedIngestion
- type RecordRangeFlagEnum
- type RecordRangeMeta
- type RecoveryToken
- type RefreshToken
- type Role
- type Sensor
- type SensorQueryingSpec
- type Station
- type StationActivity
- type StationArea
- type StationAttributeSlot
- type StationConfiguration
- type StationDeployed
- type StationDeployedWM
- type StationFull
- type StationIngestion
- type StationIngestionWM
- type StationInterestingness
- type StationJob
- type StationModel
- type StationModule
- type StationNote
- type StationNotesWithUsers
- type StationProjectAttribute
- type StationProjectNamedAttribute
- type TemporalPath
- type Token
- type TwitterAccount
- type TwitterOAuth
- type User
- type UserProjectRelationship
- type ValidationToken
- type VisibleConfiguration
- type VisibleStationConfiguration
- type VizBookmark
- type Window
Constants ¶
View Source
const ( MetaTypeName = "meta" DataTypeName = "data" )
View Source
const ( MentionNotification = "mention" ReplyNotification = "reply" )
View Source
const ( MembershipAccepted = "Accepted" MembershipPending = "Pending" MembershipRejected = "Rejected" )
View Source
const ( AverageFunctionName = "avg" MaximumFunctionName = "max" )
View Source
const (
FieldKitModelID = int32(1)
)
Variables ¶
View Source
var ( MemberRole = &Role{ ID: 0, Name: "Member", readOnlyProject: true, } AdministratorRole = &Role{ ID: 1, Name: "Administrator", readOnlyProject: false, } PublicRole = &Role{ Name: "Public", readOnlyProject: true, } AvailableRoles = []*Role{ MemberRole, AdministratorRole, } Roles = []*Role{ MemberRole, AdministratorRole, PublicRole, } )
View Source
var ( ErrIncorrectPassword = errors.New("incorrect password") ErrUnverifiedUser = errors.New("unverified user error") )
View Source
var ( RefreshTokenTtl = 365 * 24 * time.Hour LoginTokenTtl = 24 * time.Hour RecoveryTokenTtl = 1 * time.Hour ValidationTokenTtl = 72 * time.Hour TransmissionTokenTtl = 2 * 24 * 365 * time.Hour )
View Source
var (
WindowNow = defaultNow
)
Functions ¶
func DecodeBinaryString ¶
func ParseBlocks ¶
func PostNotificationToMap ¶
func PostNotificationToMap(n *Notification, p *DiscussionPost, u *User) map[string]interface{}
func QueryAsObject ¶
func ScanProjectUpdateWM ¶
func ScanStationIngestionWM ¶
Types ¶
type AggregatedReading ¶
type AggregatedReading struct { ID int64 `db:"id" json:"id"` StationID int32 `db:"station_id" json:"stationId"` SensorID int64 `db:"sensor_id" json:"sensorId"` ModuleID int64 `db:"module_id" json:"moduleId"` Time NumericWireTime `db:"time" json:"time"` Location *Location `db:"location" json:"location"` Value float64 `db:"value" json:"value"` NumberSamples int32 `db:"nsamples" json:"nsamples"` }
type AuthorOrUploaderWM ¶
type Bookmark ¶
type Bookmark struct { Version int32 `json:"v"` Groups []GroupBookmark `json:"g"` Stations []int32 `json:"s"` }
{"v":1,"g":[ [[ [[159],[2],[-8640000000000000,8640000000000000],[],0,0] ]]],"s":[]}
func ParseBookmark ¶
func (*Bookmark) StationIDs ¶
func (*Bookmark) Vizes ¶
func (b *Bookmark) Vizes() ([]*BookmarkViz, error)
type BookmarkSensor ¶
type BookmarkViz ¶
type DataEvent ¶
type DataEvent struct { ID int64 `db:"id"` UserID int32 `db:"user_id"` ProjectIDs pq.Int64Array `db:"project_ids"` StationIDs pq.Int64Array `db:"station_ids"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` Start time.Time `db:"start_time"` End time.Time `db:"end_time"` Title string `db:"title"` Description string `db:"description"` Context *types.JSONText `db:"context"` }
func (*DataEvent) GetContext ¶
func (*DataEvent) SetContext ¶
func (*DataEvent) StringBookmark ¶
type DataEvents ¶
type DataExport ¶
type DataExport struct { ID int64 `db:"id"` Token []byte `db:"token"` UserID int32 `db:"user_id"` Format string `db:"format"` CreatedAt time.Time `db:"created_at"` CompletedAt *time.Time `db:"completed_at"` DownloadURL *string `db:"download_url"` Size *int32 `db:"size"` Progress float64 `db:"progress"` Message *string `db:"message"` Args types.JSONText `db:"args"` }
type DataRecord ¶
type DataRecord struct { ProvisionID int64 `db:"provision_id" json:"provision_id"` Time time.Time `db:"time" json:"time"` Number int64 `db:"number" json:"number"` MetaRecordID int64 `db:"meta_record_id" json:"meta_record_id"` Location *Location `db:"location" json:"location"` Data types.JSONText `db:"raw" json:"raw"` PB []byte `db:"pb" json:"pb"` }
func SanitizeDataRecord ¶
func SanitizeDataRecord(r *DataRecord) *DataRecord
func (*DataRecord) GetData ¶
func (d *DataRecord) GetData() (fields map[string]interface{}, err error)
func (*DataRecord) SetData ¶
func (d *DataRecord) SetData(data interface{}) error
func (*DataRecord) Unmarshal ¶
func (d *DataRecord) Unmarshal(r *pb.DataRecord) error
type DescribeLocations ¶
type DescribeLocations struct { MapboxToken string // contains filtered or unexported fields }
func NewDescribeLocations ¶
func NewDescribeLocations(mapboxToken string, metrics *logging.Metrics) (ls *DescribeLocations)
func (*DescribeLocations) Describe ¶
func (ls *DescribeLocations) Describe(ctx context.Context, l *Location) (ld *LocationDescription, err error)
func (*DescribeLocations) IsEnabled ¶
func (ls *DescribeLocations) IsEnabled() bool
type DiscussionPost ¶
type DiscussionPost struct { ID int64 `db:"id"` UserID int32 `db:"user_id"` ThreadID *int64 `db:"thread_id"` ProjectID *int32 `db:"project_id"` StationIDs pq.Int64Array `db:"station_ids"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` Body string `db:"body"` Context *types.JSONText `db:"context"` }
func (*DiscussionPost) GetContext ¶
func (d *DiscussionPost) GetContext() (fields map[string]interface{}, err error)
func (*DiscussionPost) SetContext ¶
func (d *DiscussionPost) SetContext(data interface{}) error
func (*DiscussionPost) StringBookmark ¶
func (d *DiscussionPost) StringBookmark() *string
type Envelope ¶
type Envelope struct {
// contains filtered or unexported fields
}
func (*Envelope) Coordinates ¶
type EssentialStation ¶
type EssentialStation struct { ID int64 `db:"id"` Name string `db:"name"` DeviceID []byte `db:"device_id"` ModelID int32 `db:"model_id"` OwnerID int32 `db:"owner_id"` OwnerName string `db:"owner_name"` OwnerEmail string `db:"owner_email"` CreatedAt time.Time `db:"created_at,omitempty"` UpdatedAt time.Time `db:"updated_at,omitempty"` RecordingStartedAt *time.Time `db:"recording_started_at"` MemoryUsed *int32 `db:"memory_used"` MemoryAvailable *int32 `db:"memory_available"` FirmwareNumber *int32 `db:"firmware_number"` FirmwareTime *int64 `db:"firmware_time"` Location *Location `db:"location"` LastIngestionAt *time.Time `db:"last_ingestion_at,omitempty"` }
type FieldNoteMedia ¶
type Firmware ¶
type Firmware struct { ID int32 `db:"id"` Time time.Time `db:"time"` Module string `db:"module"` Profile string `db:"profile"` Version *string `db:"version"` URL string `db:"url"` ETag string `db:"etag"` Meta types.JSONText `db:"meta"` LogicalAddress *int64 `db:"logical_address"` Timestamp *int64 `db:"timestamp"` Available bool `db:"available"` Hidden bool `db:"hidden"` }
type FollowersSummary ¶
type GroupBookmark ¶
type GroupBookmark = [][]VizBookmark
type IncomingReading ¶
type IngestedWM ¶
type Ingestion ¶
type Ingestion struct { ID int64 `db:"id"` Time time.Time `db:"time"` UploadID string `db:"upload_id"` UserID int32 `db:"user_id"` DeviceID []byte `db:"device_id"` GenerationID []byte `db:"generation"` Size int64 `db:"size"` URL string `db:"url"` Type string `db:"type"` Blocks Int64Range `db:"blocks"` Flags pq.Int64Array `db:"flags"` }
type Int64Range ¶
type Int64Range []int64
func (*Int64Range) Scan ¶
func (a *Int64Range) Scan(src interface{}) error
Scan implements the sql.Scanner interface.
func (*Int64Range) ToInt64Array ¶
func (a *Int64Range) ToInt64Array() []int64
func (*Int64Range) ToIntArray ¶
func (a *Int64Range) ToIntArray() []int
type Interestingness ¶
type Interestingness float64
type InterestingnessFunction ¶
type InterestingnessFunction interface { Calculate(value float64) Interestingness MoreThan(a, b Interestingness) bool }
func NewMaximumInterestingessFunction ¶
func NewMaximumInterestingessFunction() (fn InterestingnessFunction)
type Location ¶
type Location struct {
// contains filtered or unexported fields
}
func NewLocation ¶
func (*Location) Coordinates ¶
func (*Location) MarshalJSON ¶
func (*Location) UnmarshalJSON ¶
type LocationDescription ¶
type MaximumInterestingessFunction ¶
type MaximumInterestingessFunction struct { }
func (*MaximumInterestingessFunction) Calculate ¶
func (fn *MaximumInterestingessFunction) Calculate(value float64) Interestingness
func (*MaximumInterestingessFunction) MoreThan ¶
func (fn *MaximumInterestingessFunction) MoreThan(a, b Interestingness) bool
type MetaRecord ¶
type MetaRecord struct { ID int64 `db:"id" json:"id"` ProvisionID int64 `db:"provision_id" json:"provision_id"` Time time.Time `db:"time" json:"time"` Number int64 `db:"number" json:"number"` Data types.JSONText `db:"raw" json:"raw"` PB []byte `db:"pb" json:"pb"` }
func SanitizeMetaRecord ¶
func SanitizeMetaRecord(r *MetaRecord) *MetaRecord
func (*MetaRecord) GetData ¶
func (d *MetaRecord) GetData() (fields map[string]interface{}, err error)
func (*MetaRecord) SetData ¶
func (d *MetaRecord) SetData(data interface{}) error
func (*MetaRecord) Unmarshal ¶
func (d *MetaRecord) Unmarshal(r *pb.DataRecord) error
type ModuleSensor ¶
type ModuleSensor struct { ID int64 `db:"id" json:"id"` ModuleID int64 `db:"module_id" json:"module_id"` ConfigurationID int64 `db:"configuration_id" json:"configuration_id"` Index uint32 `db:"sensor_index" json:"sensor_index"` UnitOfMeasure string `db:"unit_of_measure" json:"unit_of_measure"` Name string `db:"name" json:"name"` ReadingValue *float64 `db:"reading_last" json:"reading_last"` ReadingTime *time.Time `db:"reading_time" json:"reading_time"` }
type MultiPolygon ¶
type MultiPolygon struct {
// contains filtered or unexported fields
}
func (*MultiPolygon) Coordinates ¶
func (l *MultiPolygon) Coordinates() [][][]float64
func (*MultiPolygon) Scan ¶
func (l *MultiPolygon) Scan(data interface{}) error
type NativeLandInfo ¶
type NativeLandInfo struct {
Properties *NativeLandProperties `json:"properties"`
}
type NativeLandProperties ¶
type NativeLandResponse ¶
type NativeLandResponse = []*NativeLandInfo
type NoteMediaLink ¶
type Notification ¶
type Notification struct { ID int64 `db:"id" json:"id"` CreatedAt time.Time `db:"created_at" json:"createdAt"` UserID int32 `db:"user_id" json:"userId"` PostID *int64 `db:"post_id" json:"postId"` Key string `db:"key" json:"key"` Kind string `db:"kind" json:"kind"` Body string `db:"body" json:"body"` // ICU Seen bool `db:"seen" json:"seen"` // ICU }
func NewMentionNotification ¶
func NewMentionNotification(userID int32, postID int64) *Notification
func NewReplyNotification ¶
func NewReplyNotification(userID int32, postID int64) *Notification
type NotificationPost ¶
type NotificationPost struct { Notification ThreadID *int64 `db:"thread_id"` ProjectID *int32 `db:"project_id"` Context *types.JSONText `db:"context"` AuthorID *int32 `db:"author_id"` Name string `db:"name"` Username string `db:"username"` MediaURL *string `db:"media_url"` }
func (*NotificationPost) NotificationUserInfo ¶
func (n *NotificationPost) NotificationUserInfo() *NotificationUser
func (*NotificationPost) StringBookmark ¶
func (n *NotificationPost) StringBookmark() *string
func (*NotificationPost) ToMap ¶
func (n *NotificationPost) ToMap() map[string]interface{}
type NotificationUser ¶
type NotificationUser struct { ID int32 `json:"id"` Name string `json:"name"` Photo *NotificationUserPhoto `json:"photo"` }
func UserInfo ¶
func UserInfo(user *User) *NotificationUser
type NotificationUserPhoto ¶
type NotificationUserPhoto struct {
URL *string `json:"url"`
}
type NumericWireTime ¶
func NumericWireTimePtr ¶
func NumericWireTimePtr(t *time.Time) *NumericWireTime
func (*NumericWireTime) MarshalJSON ¶
func (nw *NumericWireTime) MarshalJSON() ([]byte, error)
func (*NumericWireTime) Scan ¶
func (nw *NumericWireTime) Scan(src interface{}) error
func (*NumericWireTime) Time ¶
func (nw *NumericWireTime) Time() time.Time
type OtherLandFeature ¶
type OtherLandResponse ¶
type OtherLandResponse struct {
Features []*OtherLandFeature `json:"features"`
}
type PageOfDiscussion ¶
type PageOfDiscussion struct { Posts []*DiscussionPost PostsByID map[int64]*DiscussionPost UsersByID map[int32]*User }
type PrivacyType ¶
type PrivacyType int32
const ( Private PrivacyType = 0 Public PrivacyType = 1 Obscured PrivacyType = 2 )
type Project ¶
type Project struct { ID int32 `db:"id,omitempty"` Name string `db:"name"` Description string `db:"description"` Goal string `db:"goal"` Location string `db:"location"` Tags string `db:"tags"` StartTime *time.Time `db:"start_time"` EndTime *time.Time `db:"end_time"` Privacy PrivacyType `db:"privacy"` MediaURL *string `db:"media_url"` MediaContentType *string `db:"media_content_type"` Bounds *types.JSONText `db:"bounds"` ShowStations bool `db:"show_stations"` CommunityRanking int32 `db:"community_ranking"` }
type ProjectActivity ¶
type ProjectAttribute ¶
type ProjectInvite ¶
type ProjectInvite struct { ID int32 `db:"id,omitempty"` UserID int32 `db:"user_id"` ProjectID int32 `db:"project_id"` RoleID int32 `db:"role_id"` InvitedEmail string `db:"invited_email"` InvitedTime time.Time `db:"invited_time"` AcceptedTime *time.Time `db:"accepted_time"` RejectedTime *time.Time `db:"rejected_time"` Token Token `db:"token" json:"token"` }
func (*ProjectInvite) LookupRole ¶
func (u *ProjectInvite) LookupRole() *Role
type ProjectStation ¶
type ProjectStationActivity ¶
type ProjectStationActivity struct { ProjectActivity StationActivityID int64 `db:"station_activity_id" json:"-"` }
type ProjectUpdate ¶
type ProjectUpdate struct { ProjectActivity AuthorID int32 `db:"author_id" json:"-"` Body string `db:"body" json:"body"` }
type ProjectUpdateWM ¶
type ProjectUpdateWM struct { ProjectActivity Author AuthorOrUploaderWM `json:"author"` Body string `db:"body" json:"body"` }
type ProjectUser ¶
type ProjectUser struct { UserID int32 `db:"user_id"` ProjectID int32 `db:"project_id"` Role int32 `db:"role"` }
func (*ProjectUser) LookupRole ¶
func (u *ProjectUser) LookupRole() *Role
func (*ProjectUser) RoleName ¶
func (u *ProjectUser) RoleName() string
type ProjectUserAndProject ¶
type ProjectUserAndProject struct { ProjectUser Project }
type ProjectUserAndUser ¶
type ProjectUserAndUser struct { ProjectUser User }
type QueryingSpec ¶
type QueryingSpec struct {
Sensors map[int64]*SensorQueryingSpec `json:"sensors"`
}
type QueuedIngestion ¶
type QueuedIngestion struct { ID int64 `db:"id"` IngestionID int64 `db:"ingestion_id"` Queued time.Time `db:"queued"` Attempted *time.Time `db:"attempted"` Completed *time.Time `db:"completed"` TotalRecords *int64 `db:"total_records"` OtherErrors *int64 `db:"other_errors"` MetaErrors *int64 `db:"meta_errors"` DataErrors *int64 `db:"data_errors"` }
type RecordRangeFlagEnum ¶
type RecordRangeFlagEnum int
const ( NoneRecordRangeFlag RecordRangeFlagEnum = 0 HiddenRecordRangeFlag RecordRangeFlagEnum = 1 )
type RecordRangeMeta ¶
type RecoveryToken ¶
type RecoveryToken struct { Token Token `db:"token" json:"token"` UserID int32 `db:"user_id" json:"user_id"` Expires time.Time `db:"expires" json:"expires"` }
func NewRecoveryToken ¶
type RefreshToken ¶
type RefreshToken struct { Token Token `db:"token" json:"token"` UserID int32 `db:"user_id" json:"user_id"` Expires time.Time `db:"expires" json:"expires"` }
func NewRefreshToken ¶
type Role ¶
func LookupRole ¶
func (*Role) IsProjectAdministrator ¶
func (*Role) IsProjectReadOnly ¶
type SensorQueryingSpec ¶
type Station ¶
type Station struct { ID int32 `db:"id,omitempty"` Name string `db:"name"` DeviceID []byte `db:"device_id"` OwnerID int32 `db:"owner_id,omitempty"` ModelID int32 `db:"model_id"` CreatedAt time.Time `db:"created_at,omitempty"` UpdatedAt time.Time `db:"updated_at,omitempty"` SyncedAt *time.Time `db:"synced_at"` IngestionAt *time.Time `db:"ingestion_at"` Battery *float32 `db:"battery"` Location *Location `db:"location"` LocationName *string `db:"location_name"` RecordingStartedAt *time.Time `db:"recording_started_at"` MemoryUsed *int32 `db:"memory_used"` MemoryAvailable *int32 `db:"memory_available"` FirmwareNumber *int32 `db:"firmware_number"` FirmwareTime *int64 `db:"firmware_time"` PlaceOther *string `db:"place_other"` PlaceNative *string `db:"place_native"` PhotoID *int32 `db:"photo_id"` Hidden *bool `db:"hidden"` Description *string `db:"description"` Status *string `db:"status"` }
func (*Station) DeviceIDHex ¶
func (*Station) ParseHttpReply ¶
type StationActivity ¶
type StationArea ¶
type StationArea struct { ID int32 `db:"id,omitempty"` Name string `db:"name"` Geometry MultiPolygon `db:"geometry"` }
type StationAttributeSlot ¶
type StationConfiguration ¶
type StationDeployed ¶
type StationDeployed struct { StationActivity DeployedAt time.Time `db:"deployed_at"` Location *Location `db:"location"` }
type StationDeployedWM ¶
type StationDeployedWM struct { StationActivity DeployedAt time.Time `db:"deployed_at" json:"deployed_at"` Location Location `db:"location" json:"location"` }
type StationFull ¶
type StationFull struct { Station *Station Model *StationModel Owner *User Interestingness []*StationInterestingness Attributes []*StationProjectNamedAttribute Areas []*StationArea Ingestions []*Ingestion Configurations []*StationConfiguration Modules []*StationModule Sensors []*ModuleSensor HasImages bool ProjectIDs []int32 }
type StationIngestion ¶
type StationIngestion struct { StationActivity UploaderID int32 `db:"uploader_id"` DataIngestionID int64 `db:"data_ingestion_id"` DataRecords int64 `db:"data_records"` Errors bool `db:"errors"` }
type StationIngestionWM ¶
type StationIngestionWM struct { StationActivity Uploader AuthorOrUploaderWM `json:"uploader"` Data IngestedWM `json:"data"` Errors bool `json:"errors" db:"errors"` }
type StationInterestingness ¶
type StationInterestingness struct { ID int64 `db:"id"` StationID int32 `db:"station_id"` WindowSeconds int32 `db:"window_seconds"` Interestingness Interestingness `db:"interestingness"` ReadingSensorID int64 `db:"reading_sensor_id"` ReadingModuleID int64 `db:"reading_module_id"` ReadingValue float64 `db:"reading_value"` ReadingTime time.Time `db:"reading_time"` }
func (*StationInterestingness) IsLive ¶
func (si *StationInterestingness) IsLive() bool
type StationJob ¶
type StationJob struct {
Job *QueJob
}
type StationModel ¶
type StationModule ¶
type StationModule struct { ID int64 `db:"id" json:"id"` ConfigurationID int64 `db:"configuration_id" json:"configuration_id"` HardwareID []byte `db:"hardware_id" json:"hardware_id"` Index uint32 `db:"module_index" json:"module_index"` Position uint32 `db:"position" json:"position"` Name string `db:"name" json:"name"` Manufacturer uint32 `db:"manufacturer" json:"manufacturer"` Kind uint32 `db:"kind" json:"kind"` Version uint32 `db:"version" json:"version"` Flags uint32 `db:"flags" json:"flags"` Label *string `db:"label" json:"label"` }
type StationNote ¶
type StationNotesWithUsers ¶
type StationNotesWithUsers struct { Notes []*StationNote UsersByID map[int32]*User }
type StationProjectAttribute ¶
type TemporalPath ¶
type TemporalPath struct {
// contains filtered or unexported fields
}
func (*TemporalPath) Coordinates ¶
func (l *TemporalPath) Coordinates() [][]float64
func (*TemporalPath) Scan ¶
func (l *TemporalPath) Scan(data interface{}) error
type Token ¶
type Token []byte
func (Token) MarshalText ¶
MarshalText returns a base64-encoded slice of bytes.
func (*Token) UnmarshalBinary ¶
UnmarshalBinary sets the value of the Token based on a slice of bytes.
func (*Token) UnmarshalText ¶
UnmarshalText sets the value of the Token based on a base64-encoded slice of bytes.
type TwitterAccount ¶
type TwitterOAuth ¶
type User ¶
type User struct { ID int32 `db:"id,omitempty"` Name string `db:"name"` Username string `db:"username"` Email string `db:"email"` Password []byte `db:"password"` Valid bool `db:"valid"` Bio string `db:"bio"` MediaURL *string `db:"media_url"` MediaContentType *string `db:"media_content_type"` Admin bool `db:"admin"` FirmwareTester bool `db:"firmware_tester"` FirmwarePattern *string `db:"firmware_pattern"` Taggable bool `db:"taggable"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` TncDate time.Time `db:"tnc_date"` }
func (*User) CheckPassword ¶
func (*User) SetPassword ¶
type UserProjectRelationship ¶
type UserProjectRelationship struct { ProjectID int32 `db:"project_id"` Following bool `db:"following"` MemberRole int32 `db:"member_role"` }
func (*UserProjectRelationship) CanModify ¶
func (r *UserProjectRelationship) CanModify() bool
func (*UserProjectRelationship) LookupRole ¶
func (r *UserProjectRelationship) LookupRole() *Role
type ValidationToken ¶
type ValidationToken struct { Token Token `db:"token" json:"token"` UserID int32 `db:"user_id" json:"user_id"` Expires time.Time `db:"expires" json:"expires"` }
func NewValidationToken ¶
type VisibleConfiguration ¶
type VisibleStationConfiguration ¶
type VisibleStationConfiguration struct { VisibleConfiguration StationConfiguration }
type VizBookmark ¶
type VizBookmark = []interface{} // [Stations, Sensors, [number, number], [[number, number], [number, number]] | [], ChartType, FastTime] | [];
Source Files ¶
- activity.go
- attributes.go
- bookmark.go
- describe_location.go
- discussion.go
- event.go
- export.go
- firmware.go
- geometry.go
- ingestion.go
- interestingness.go
- jobs.go
- location.go
- logging.go
- name.go
- notes.go
- notifications.go
- privacy.go
- project.go
- querying.go
- roles.go
- sensors.go
- station.go
- station_note.go
- token.go
- twitter.go
- user.go
Click to show internal directories.
Click to hide internal directories.