img

package
v0.0.0-...-cbaa3f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetSize

func SetSize(s string, x, y int) string

Types

type Api

type Api struct {
	Db       *gorp.DbMap
	WebpAddr string
	// contains filtered or unexported fields
}

func NewApi

func NewApi(db *gorp.DbMap, path string, net uint8, dbname,
	defaultloc string, sthost string, ssl bool) *Api

func (*Api) Create

func (a *Api) Create(data []byte, name, descr, imgtype string, lon, lat float64) (Img, error)

func (*Api) ExistName

func (a *Api) ExistName(name string) (bool, error)

func (*Api) GetName

func (api *Api) GetName(a int64, args ...interface{}) string

func (*Api) RealLoc

func (api *Api) RealLoc(a int64) string

func (*Api) Resize

func (api *Api) Resize(imgloc string, xsize, ysize int, resizeType string) bool

func (*Api) WebPCopy

func (api *Api) WebPCopy(imgloc string) bool

type Img

type Img struct {
	Id          int64
	Name        string
	Slug        string
	Description string

	Hash int64

	Type string

	//size
	Width  int
	Height int

	//coords
	Lon float64
	Lat float64

	//user Id
	Owner int64

	//photograph user Id
	Author int64

	Created int64
	Updated int64
	Deleted int64
	Version int64
}

Jump to

Keyboard shortcuts

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