gonuts

package
v0.0.0-...-3b0f2d1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2013 License: BSD-2-Clause, BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToSearchIndex

func AddToSearchIndex(c appengine.Context, nut *Nut) (err error)

func LogError

func LogError(c appengine.Context, err error)

func NutKey

func NutKey(c appengine.Context, vendor, nut string) *datastore.Key

func PanicIfErr

func PanicIfErr(err error)

func RemoveFromSearchIndex

func RemoveFromSearchIndex(c appengine.Context, nut *Nut) (err error)

func SearchIndex

func SearchIndex(c appengine.Context, q string) (pairs [][]string, err error)

func UserKey

func UserKey(c appengine.Context, u *user.User) *datastore.Key

func VendorKey

func VendorKey(c appengine.Context, vendor string) *datastore.Key

func VersionKey

func VersionKey(c appengine.Context, vendor, nut, version string) *datastore.Key

Types

type Nut

type Nut struct {
	// StringID (entity name, key name) is "Vendor/Name"
	Vendor string
	Name   string
	Doc    string // Doc of latest published version

}

type User

type User struct {
	// StringID (entity name, key name) is appengine/user.User.ID
	Id                string // same as StringID
	Email             string
	FederatedIdentity string
	Token             string
	Debug             bool
	Vendors           []string
}

func (*User) AddVendor

func (user *User) AddVendor(vendor *Vendor)

func (*User) GenerateToken

func (user *User) GenerateToken() (err error)

func (*User) Identifier

func (user *User) Identifier() (id string)

type Vendor

type Vendor struct {
	// StringID (entity name, key name) is "Vendor"
	Vendor       string
	UserStringID []string // slice of User.StringID
}

type Version

type Version struct {
	// StringID (entity name, key name) is "Vendor/Name-Version"
	Vendor     string
	Name       string
	Version    string
	VersionNum int // for sorting
	Doc        string
	Homepage   string
	BlobKey    appengine.BlobKey
	CreatedAt  time.Time
	Downloads  int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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