models

package
v0.0.0-...-c941272 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2014 License: MIT Imports: 5 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,omitempty" bson:"_id,omitempty"`
	EventId   bson.ObjectId `json:"event_id" bson:"event_id"`
	Comment   string        `json:"comment" bson:"comment"`
	CreatedBy bson.ObjectId `json:"created_by" bson:"created_by"`
	CreatedAt time.Time     `json:"created_at" bson:"created_at"`
}

func (Comment) Validate

func (comment Comment) Validate(errors *binding.Errors, req *http.Request)

This method implements binding.Validator and is executed by the binding.Validate middleware Should only be called when creating a new comment via a POST request

type Event

type Event struct {
	Id          bson.ObjectId `json:"id,omitempty" bson:"_id,omitempty"`
	Title       string        `json:"title" bson:"title"`
	Description string        `json:"description" bson:"description"`
	Category    string        `json:"category" bson:"category"`
	Coordinates []float64     `json:"coordinates" bson:"coordinates"`
	CreatedBy   bson.ObjectId `json:"created_by" bson:"created_by"`
	CreatedAt   time.Time     `json:"created_at" bson:"created_at"`
	StartTime   time.Time     `json:"start_time" bson:"start_time"`
	EndTime     time.Time     `json:"end_time" bson:"end_time"`
}

func (Event) Validate

func (event Event) Validate(errors *binding.Errors, req *http.Request)

This method implements binding.Validator and is executed by the binding.Validate middleware Should only be called when creating a new event via a POST request

Jump to

Keyboard shortcuts

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