models

package
v0.0.0-...-c93c29d Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 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 DataObj

type DataObj struct {
	ShortUrl string `json:"shortUrl,omitempty"`
	Message  string `json:"message,omitempty"`
}

type ErrorObj

type ErrorObj struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type JSONTime

type JSONTime time.Time

func (JSONTime) MarshalJSON

func (t JSONTime) MarshalJSON() ([]byte, error)

type Response

type Response struct {
	Status bool     `json:"status"`
	Error  ErrorObj `json:"error,omitempty"`
	Data   DataObj  `json:"data,omitempty"`
}

type UrlInfo

type UrlInfo struct {
	// MongoDB _id
	Id bson.ObjectId `json:"id,omitempty" bson:"_id"`
	// Sort URL of the created for the provided long url by the client
	LongUrl string `json:"longUrl,omitempty"`
	// Sort URL of the created for the provided long url by the client
	ShortUrl string `json:"shortUrl,omitempty"`
	// RequestTimeStamp is the time at which collection created
	RequestTimeStamp time.Time `json:"requestTimeStamp,omitempty"`
}

UrlInfo holds options for mongodb collection tblShortURL

Jump to

Keyboard shortcuts

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