models

package
v0.0.0-...-12e9062 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID       primitive.ObjectID   `json:"_id,omitempty" bson:"_id,omitempty"`
	Name     string               `json:"name,omitempty" bson:"name,omitempty"`
	Users    []primitive.ObjectID `json:"users,omitempty" bson:"users,omitempty"`
	Messages []primitive.ObjectID `json:"messages,omitempty" bson:"messages,omitempty"`
}

Channel struct

type Message

type Message struct {
	ID     primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Sender string             `json:"sender,omitempty" bson:"sender,omitempty"`
	Text   string             `json:"text,omitempty" bson:"text,omitempty"`
	Date   string             `json:"date,omitempty" bson:"date,omitempty"`
}

Message struct

type Token

type Token struct {
	Username string `json:"username,omitempty" bson:"username,omitempty"`
	jwt.StandardClaims
}

Token ...

type User

type User struct {
	ID       primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	UserName string             `json:"username,omitempty" bson:"username,omitempty" validate:"required"`
	Salt     string             `bson:"salt,omitempty"`
	Password string             `json:"password,omitempty" bson:"password,omitempty" validate:"required"`

	Conn *websocket.Conn
}

User model structure

Jump to

Keyboard shortcuts

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