models

package
v0.0.0-...-77dd0f1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore struct {
	DB     *mongo.Database
	Client *mongo.Client
}

func NewDatastore

func NewDatastore() *Datastore

type GeoJson

type GeoJson struct {
	Type        string    `json:"-"`
	Coordinates []float64 `json:"coordinates"`
}

type User

type User struct {
	ID   primitive.ObjectID `bson:"_ID"`
	User string             `bson:"user"`

	// Visible to other users
	// ================================================================
	Age    uint   `bson:"age"`
	AdText string `bson:"adText"`

	Image string `bson:"image"`

	// This may seem complex, but I want to give users full control of this.
	Gender       []string `bson:"gender"`
	TargetGender []string `bson:"targetGender"`
	Sexuality    []string `bson:"sexuality"`

	Dealbreakers []string `bson:"dealbreakers"` // Things the person doesn't want.
	Dealmakers   []string `bson:"dealmakers"`   // Things the person does want.

	Interests []string `bson:"interests"`

	ActiveTime time.Time `bson:"activeTime"` // The last active time of the user.
	Location   GeoJson   `bson:"location"`   // The user's  location.
}

Jump to

Keyboard shortcuts

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