domain

package
v0.0.0-...-40fc3ee Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	// ID     bson.ObjectId `json:"id" bson:"_id"`
	UserID bson.ObjectId `json:"userid" bson:"userid,omitempty"`
	Text   string        `json:"text" bson:"text,omitempty"`
}

Comment ...

type File

type File struct {
	ID     bson.ObjectId `json:"id" bson:"_id,omitempty"`
	Name   string        `json:"name" bson:"name,omitempty"`
	Type   string        `json:"type" bson:"type,omitempty"`
	Size   int64         `json:"size" bson:"size,omitempty"`
	Width  int           `json:"width" bson:"width,omitempty"`
	Height int           `json:"height" bson:"height,omitempty"`
}

File ...

type Image

type Image struct {
	ID     bson.ObjectId `json:"id" bson:"_id,omitempty"`
	Name   string        `json:"name" bson:"name,omitempty"`
	Type   string        `json:"type" bson:"type,omitempty"`
	Size   int64         `json:"size" bson:"size,omitempty"`
	Width  int           `json:"width" bson:"width,omitempty"`
	Height int           `json:"height" bson:"height,omitempty"`
}

Image ...

type Post

type Post struct {
	ID           bson.ObjectId   `json:"id" bson:"_id,omitempty"`
	Author       bson.ObjectId   `json:"author" bson:"author,omitempty"`
	Anonymous    bool            `json:"anonymous" bson:"anonymous,omitempty"`
	Topic        string          `json:"topic" bson:"topic,omitempty"`
	Category     string          `json:"category" bson:"category,omitempty"`
	ContentText  string          `json:"contentText" bson:"content_text,omitempty"`
	Type         string          `json:"type" bson:"type,omitempty"`
	Latitude     float64         `json:"latitude" bson:"latitude,omitempty"`
	Longitude    float64         `json:"longitude" bson:"longitude,omitempty"`
	Date         time.Time       `json:"timestamp" bson:"timestamp,omitempty"`
	ContentPhoto Image           `json:"contentPhoto" bson:"content_photo,omitempty"`
	ContentFile  File            `json:"contentFile" bson:"content_file,omitempty"`
	Likes        []bson.ObjectId `json:"likes" bson:"likes,omitempty"`
	Agreements   []bson.ObjectId `json:"agreements" bson:"agreements,omitempty"`
	Followers    []bson.ObjectId `json:"followers" bson:"followers,omitempty"`
	Comments     []Comment       `json:"comments" bson:"comments,omitempty"`
	Shares       []Share         `json:"shares" bson:"shares,omitempty"`
}

Post ...

func NewPost

func NewPost(author, topic, category, text string) *Post

NewPost creates a new User!

type Share

type Share struct {
	Party string `json:"party" bson:"text"`
}

Share ...

Jump to

Keyboard shortcuts

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