briabby

package
v0.0.0-...-9042134 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2015 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAdminItem

func HandleAdminItem(w http.ResponseWriter, r *http.Request)

func HandleAdminLogin

func HandleAdminLogin(w http.ResponseWriter, r *http.Request)

func HandleAdminUpload

func HandleAdminUpload(w http.ResponseWriter, r *http.Request)

func HandleHat

func HandleHat(w http.ResponseWriter, r *http.Request)

func HandleIndex

func HandleIndex(w http.ResponseWriter, r *http.Request)

func InitAdmin

func InitAdmin(prefix string)

func InitBriabby

func InitBriabby(prefix string)

Types

type FileInfo

type FileInfo struct {
	Key          string `json:"-"`
	Url          string `json:"url,omitempty"`
	ThumbnailUrl string `json:"thumbnail_url,omitempty"`
	Name         string `json:"name"`
	Type         string `json:"type"`
	Size         int64  `json:"size"`
	Error        string `json:"error,omitempty"`
	DeleteUrl    string `json:"delete_url,omitempty"`
	DeleteType   string `json:"delete_type,omitempty"`
}

FileInfo describes a file that has been uploaded.

type FileSave

type FileSave struct {
	// contains filtered or unexported fields
}

func NewFileSave

func NewFileSave(r *multipart.Reader) *FileSave

func (*FileSave) Save

func (fs *FileSave) Save() *FileInfo

type HatDataSet

type HatDataSet struct {
	CurrentPage int
	MaxPage     int
	ItemList    []ProtoItem
}

type IndexDataSet

type IndexDataSet struct {
}

type ProtoItem

type ProtoItem struct {
	ID         string   `bson:"_id"`
	Name       string   `bson:"name"`
	Promotion  int      `bson:"promotion"`
	ImageSmall string   `bson:"smallimage"`
	ImageBig   string   `bson:"bigimage"`
	Desc       string   `bson:"desc"`
	Price      []string `bson:"price"`
	PaypalBtn  string   `bson:"paypalbtn"`
	Category   string   `bson:"category"`
}

ProtoItem indicate an item that saved in db

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(url string) (*Store, error)

func (*Store) All

func (s *Store) All() ([]ProtoItem, error)

func (*Store) DelItem

func (s *Store) DelItem(id string) error

func (*Store) FindItem

func (s *Store) FindItem(id string) (*ProtoItem, error)

func (*Store) FindItemByCat

func (s *Store) FindItemByCat(cat string) ([]ProtoItem, error)

func (*Store) SaveItem

func (s *Store) SaveItem(item *ProtoItem) error

Jump to

Keyboard shortcuts

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