device

package
v0.0.0-...-8ad73b1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *mongo.Client, id string) error

func GetDevice

func GetDevice(client *mongo.Client, platform int16, userID string) (string, error)

GetDevice retrieve a single device associated with the user for a given platform.

func UpdateDevice

func UpdateDevice(client *mongo.Client, b *bytes.Buffer) (string, error)

CreateUserAccount add a user to the user table.

Types

type Device

type Device struct {
	ID         *primitive.ObjectID `json:"id" bson:"_id,omitempty"`
	UserID     string              `json:"userid"`
	Platform   int16               `json:"platform"`
	Active     bool                `json:"active"`
	Identifier string              `json:"identifier"`
}

func GetDevices

func GetDevices(client *mongo.Client, userID string) ([]Device, error)

GetDevices retrieve a list of devices for a given user.

Jump to

Keyboard shortcuts

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