models

package
v0.0.0-...-6109a7a Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2019 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	ID             uuid.UUID `json:"id" db:"id"`
	CreatedAt      time.Time `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time `json:"updated_at" db:"updated_at"`
	Name           string    `json:"name" db:"name"`
	Born           string    `json:"born" db:"born"`
	Died           string    `json:"died" db:"died"`
	Nationality    string    `json:"nationality" db:"nationality"`
	Wikipedia      string    `json:"wikipedia" db:"wikipedia"`
	Photos         Photos    `json:"photos" has_many:"books"`
	OriginalSource string    `json:"original_source" db:"original_source"`
}

func (Author) String

func (a Author) String() string

String is not required by pop and may be deleted

func (*Author) ValidateCreate

func (a *Author) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)

ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.

func (*Author) ValidateUpdate

func (a *Author) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)

ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.

type AuthorParam

type AuthorParam struct {
	Name           string `json:"name"`
	Born           string `json:"born"`
	Died           string `json:"died"`
	Nationality    string `json:"nationality"`
	ArtMovement    string `json:"art movement"`
	Wikipedia      string `json:"wikipedia"`
	OriginalSource string `json:"original_source"`
}

type Authors

type Authors []Author

Authors is not required by pop and may be deleted

func (Authors) String

func (a Authors) String() string

String is not required by pop and may be deleted

type Dashboard

type Dashboard struct {
	ID        uuid.UUID `json:"id" db:"id"`
	CreatedAt time.Time `json:"created_at" db:"created_at"`
	UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
	Type      string    `json:"type" db:"type"`
	Photo     Photo     `belongs_to:"photo"`
	PhotoID   uuid.UUID `json:"photo_id" db:"photo_id"`
}

func (Dashboard) String

func (d Dashboard) String() string

String is not required by pop and may be deleted

func (*Dashboard) ValidateCreate

func (d *Dashboard) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)

ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.

func (*Dashboard) ValidateUpdate

func (d *Dashboard) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)

ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.

type Dashboards

type Dashboards []Dashboard

Dashboards is not required by pop and may be deleted

func (Dashboards) String

func (d Dashboards) String() string

String is not required by pop and may be deleted

type Photo

type Photo struct {
	ID             uuid.UUID `json:"id" db:"id"`
	CreatedAt      time.Time `json:"created_at" db:"created_at"`
	UpdatedAt      time.Time `json:"updated_at" db:"updated_at"`
	Name           string    `json:"name" db:"name"`
	ImageUrl       string    `json:"image_url" db:"image_url"`
	Author         Author    `json:"author" belongs_to:"author"`
	AuthorID       uuid.UUID `json:"-" db:"author_id"`
	Width          uint      `json:"width" db:"width"`
	Height         uint      `json:"height" db:"height"`
	Info           string    `json:"info" db:"info"`
	Date           string    `json:"date" db:"date"`
	Style          string    `json:"style" db:"style"`
	Location       string    `json:"location" db:"location"`
	Dimensions     string    `json:"dimensions" db:"dimensions"`
	Media          string    `json:"media" db:"media"`
	OriginalSource string    `json:"original_source" db:"original_source"`
}

func (Photo) String

func (p Photo) String() string

String is not required by pop and may be deleted

func (*Photo) ValidateCreate

func (p *Photo) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)

ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.

func (*Photo) ValidateUpdate

func (p *Photo) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)

ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.

type PhotoParam

type PhotoParam struct {
	Name           string `json:"name"`
	Date           string `json:"date"`
	Style          string `json:"style"`
	Genre          string `json:"genre"`
	Media          string `json:"media"`
	Tag            string `json:"tag"`
	Location       string `json:"location"`
	Info           string `json:"info"`
	Url            string `json:"url"`
	Width          int    `json:"width"`
	Height         int    `json:"height"`
	OriginalSource string `json:"original_source"`
}

type Photos

type Photos []Photo

Photos is not required by pop and may be deleted

func (Photos) String

func (p Photos) String() string

String is not required by pop and may be deleted

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func NewErrorResponse

func NewErrorResponse(err error) Response

func NewSuccessReponse

func NewSuccessReponse(payload interface{}) Response

type SquirrelResponse

type SquirrelResponse struct {
	Url     string `json:"url"`
	Name    string `json:"name"`
	Notes   string `json:"notes"`
	PubDate string `json:"pub_date"`
}

func NewSuccessSquirrelReponse

func NewSuccessSquirrelReponse(version *Version) SquirrelResponse

type Version

type Version struct {
	ID           uuid.UUID `json:"id" db:"id"`
	CreatedAt    time.Time `json:"created_at" db:"created_at"`
	UpdatedAt    time.Time `json:"updated_at" db:"updated_at"`
	BuildVersion string    `json:"build_version" db:"build_version"`
	BuildNumber  uint      `json:"build_number" db:"build_number"`
	Url          string    `json:"url" db:"url"`
	Notes        string    `json:"notes" db:"notes"`
}

func (Version) String

func (v Version) String() string

String is not required by pop and may be deleted

func (*Version) ValidateCreate

func (v *Version) ValidateCreate(tx *pop.Connection) (*validate.Errors, error)

ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.

func (*Version) ValidateUpdate

func (v *Version) ValidateUpdate(tx *pop.Connection) (*validate.Errors, error)

ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.

type Versions

type Versions []Version

Versions is not required by pop and may be deleted

func (Versions) String

func (v Versions) String() string

String is not required by pop and may be deleted

type WikiartParam

type WikiartParam struct {
	Photo  PhotoParam  `json:"photo"`
	Author AuthorParam `json:"author"`
}

Jump to

Keyboard shortcuts

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