models

package
v0.0.0-...-930ef9c Latest Latest
Warning

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

Go to latest
Published: May 4, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Order_Date = "Date Desc"

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID       int    `json:"id" db:"CategoryId"`
	Name     string `json:"name" db:"Name"`
	ParentId int    `json:"parentId" db:"ParentId"`
}

EntryType é o tipo de publicação de um registro

type CategoryEntry

type CategoryEntry struct {
	EntryID    int    `json:"entryId"`
	CategoryID string `json:"categoryId"`
}

EntryType é o tipo de publicação de um registro

type Entry

type Entry struct {
	EntryId     int        `json:"id" db:"EntryId"`
	Title       string     `json:"title" db:"Title"`
	Abstract    string     `json:"abstract" db:"Abstract"`
	Content     string     `json:"content" db:"Content"`
	PublishDate time.Time  `json:"publishDate" db:"PublishDate"`
	Author      string     `json:"author" db:"Author"`
	Journal     string     `json:"journal" db:"Journal"`
	EntryType   EntryType  `json:"entryType"`
	EntryTypeId int        `db:"EntryTypeId"`
	Categories  []Category `json:"categories" db:"Categories"`
	MedlineId   string     `json:"medlineId" db:"MedlineId"`
}

EntryType é o tipo de publicação de um registro

type EntryType

type EntryType struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

EntryType é o tipo de publicação de um registro

type Facet

type Facet struct {
	Id         string        `json:"id"`
	Name       string        `json:"name"`
	IsSelected bool          `json:"isSelected"`
	Options    []FacetOption `json:"options"`
}

type FacetOption

type FacetOption struct {
	Id         int           `json:"id"`
	Name       string        `json:"name"`
	IsSelected bool          `json:"isSelected"`
	Count      int           `json:"count"`
	Options    []FacetOption `json:"options"`
}
type Navigation struct {
	Order      string `json:"order"`
	CurentPage int    `json:"currentPage"`
	PageSize   int    `json:"pageSize"`
	PageStart  int    `json:"pageStart"`
	PageEnd    int    `json:"pageEnd"`
	TotalPages int    `json:"totalPages"`
	TotalCount int    `json:"totalCount"`
}

type NullTime

type NullTime struct {
	time.Time
	Valid bool // Valid is true if Time is not NULL
}

func (*NullTime) Scan

func (nt *NullTime) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTime) Value

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type SearchFilter

type SearchFilter struct {
	Name   string   `json:"name"`
	Values []string `json:"values"`
}

type SearchQuery

type SearchQuery struct {
	Query    string              `json:"query"`
	Filters  map[string][]string `json:"filters"`
	PageSize int                 `json:"pageSize"`
	Page     int                 `json:"page"`
	Order    string              `json:"order"`
}

type SearchResults

type SearchResults struct {
	Query      SearchQuery `json:"query"`
	Results    []Entry     `json:"results"`
	Navigation Navigation  `json:"navigation"`
	Facets     []Facet     `json:"facets"`
}

type Session

type Session struct {
	ID         string    `json:"id" db:"SessionId"`
	Login      string    `json:"login" db:"Login"`
	Expiration time.Time `json:"expiration" db:"Expiration"`
}

type Token

type Token struct {
	ID         string    `json:"id" db:"SessionId"`
	Expiration time.Time `json:"expiration" db:"Expiration"`
	IsValid    bool      `json:"isValid"`
	User
}

EntryType é o tipo de publicação de um registro

type User

type User struct {
	Login       string `json:"login" db:"Login"`
	Permissions string `json:"permissions" db:"Permissions"`
	Name        string `json:"name" db:"Name"`
}

EntryType é o tipo de publicação de um registro

Jump to

Keyboard shortcuts

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