models

package
v0.0.0-...-5745a54 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Alerts = table.New(table.Metadata{
		Name: "alerts",
		Columns: []string{
			"alert_status",
			"alert_type",
			"alert_value",
			"criticity",
			"device_id",
			"id",
		},
		PartKey: []string{
			"id",
		},
		SortKey: []string{},
	})

	Devices = table.New(table.Metadata{
		Name: "devices",
		Columns: []string{
			"id",
			"name",
			"url",
		},
		PartKey: []string{
			"id",
		},
		SortKey: []string{},
	})

	Keys = table.New(table.Metadata{
		Name: "keys",
		Columns: []string{
			"id",
			"private_key",
			"public_key",
		},
		PartKey: []string{
			"id",
		},
		SortKey: []string{},
	})

	Migrations = table.New(table.Metadata{
		Name: "migrations",
		Columns: []string{
			"content",
			"id",
			"time",
		},
		PartKey: []string{
			"id",
		},
		SortKey: []string{},
	})

	SensorReadings = table.New(table.Metadata{
		Name: "sensor_readings",
		Columns: []string{
			"iot_id",
			"time",
			"value",
		},
		PartKey: []string{
			"iot_id",
		},
		SortKey: []string{
			"time",
		},
	})

	Users = table.New(table.Metadata{
		Name: "users",
		Columns: []string{
			"email",
			"id",
			"name",
			"password",
			"permissions",
		},
		PartKey: []string{
			"id",
		},
		SortKey: []string{
			"email",
		},
	})

	UsersEmailIdxIndex = table.New(table.Metadata{
		Name: "users_email_idx_index",
		Columns: []string{
			"email",
			"id",
			"idx_token",
		},
		PartKey: []string{
			"email",
		},
		SortKey: []string{
			"idx_token",
			"id",
		},
	})

	WebpushSubscriptions = table.New(table.Metadata{
		Name: "webpush_subscriptions",
		Columns: []string{
			"subscription",
			"user_id",
		},
		PartKey: []string{
			"user_id",
		},
		SortKey: []string{},
	})
)

Table models.

Functions

This section is empty.

Types

type AlertsStruct

type AlertsStruct struct {
	AlertStatus string
	AlertType   string
	AlertValue  string
	Criticity   string
	DeviceId    string
	Id          string
}

type DevicesStruct

type DevicesStruct struct {
	Id   string
	Name string
	Url  string
}

type KeysStruct

type KeysStruct struct {
	Id         string
	PrivateKey []byte
	PublicKey  []byte
}

type MigrationsStruct

type MigrationsStruct struct {
	Content string
	Id      int32
	Time    [16]byte
}

type SensorReadingsStruct

type SensorReadingsStruct struct {
	IotId string
	Time  time.Time
	Value []byte
}

type UsersEmailIdxIndexStruct

type UsersEmailIdxIndexStruct struct {
	Email    string
	Id       string
	IdxToken int64
}

type UsersStruct

type UsersStruct struct {
	Email       string
	Id          string
	Name        string
	Password    string
	Permissions []string
}

type WebpushSubscriptionsStruct

type WebpushSubscriptionsStruct struct {
	Subscription [][]byte
	UserId       string
}

Jump to

Keyboard shortcuts

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