resources

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: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVPhoto

type CSVPhoto struct {
	Name        string `csv:"name"`
	ImageURL    string `csv:"image_url"`
	Width       string `csv:"width"`
	Height      string `csv:"height"`
	Info        string `csv:"info"`
	Date        string `csv:"date"`
	Style       string `csv:"style"`
	Location    string `csv:"location"`
	Dimensions  string `csv:"dimensions"`
	Media       string `csv:"media"`
	AuthorId    string `csv:"author_id"`
	AuthorName  string `csv:"author_name"`
	Born        string `csv:"born"`
	Died        string `csv:"died"`
	Nationality string `csv:"nationality"`
	Wikipedia   string `csv:"wikipedia"`
}

func ReadCSVFile

func ReadCSVFile(name string) ([]*CSVPhoto, error)

type Resource

type Resource struct {
	Config     constant.Config
	PostgreSQL *pop.Connection
}

func Init

func Init(config constant.Config) (*Resource, error)

func (*Resource) Close

func (r *Resource) Close()

func (*Resource) CreateAuthorByWikiart

func (r *Resource) CreateAuthorByWikiart(param models.AuthorParam) (*models.Author, error)

func (*Resource) CreatePhotoAuthorFromWikiart

func (r *Resource) CreatePhotoAuthorFromWikiart(param models.WikiartParam) (*models.Photo, error)

func (*Resource) CreatePhotoByWikiart

func (r *Resource) CreatePhotoByWikiart(param models.PhotoParam, author models.Author) (*models.Photo, error)

func (*Resource) GenerateSampleFeaturePhoto

func (r *Resource) GenerateSampleFeaturePhoto() (*models.Dashboard, error)

func (*Resource) GetFeatureOnDashboard

func (r *Resource) GetFeatureOnDashboard() (*models.Dashboard, error)

func (*Resource) GetLatestAppVersion

func (r *Resource) GetLatestAppVersion() (*models.Version, error)

func (*Resource) GetLatestFeatureOnDashboard

func (r *Resource) GetLatestFeatureOnDashboard() (*models.Dashboard, error)

func (*Resource) GetLatestFeaturePhoto

func (r *Resource) GetLatestFeaturePhoto() (*models.Photo, error)

func (*Resource) GetRandomPhoto

func (r *Resource) GetRandomPhoto() (*models.Photo, error)

func (*Resource) GetUpdateAppVersion

func (r *Resource) GetUpdateAppVersion(buildVersion string) (*models.Version, error)

Jump to

Keyboard shortcuts

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