query

package
v0.0.0-...-8914535 Latest Latest
Warning

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

Go to latest
Published: May 7, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NANOSECONDS_IN_DAY int64 = 86400000000000
	CQL_DIR                  = "service/query/cql/"
)

Variables

This section is empty.

Functions

func NewUUID

func NewUUID() string

func Now

func Now() time.Time

Types

type Query

type Query struct {
	Db *neoism.Database
	Vd *types.RicettaValidator
	Qs QueryStrings
}

func NewQuery

func NewQuery(uri string, config *goconfig.ConfigFile) *Query

func (Query) ConstantInit

func (q Query) ConstantInit()

Initializes constants needed for query layer

func (Query) CreatePublicCurator

func (q Query) CreatePublicCurator() *neoism.Node

func (Query) CreateRecipe

func (q Query) CreateRecipe(handle string, recipe types.Recipe) (res types.Recipe, ok bool)

func (Query) CreateUser

func (q Query) CreateUser(handle, email, passwordHash string) bool

func (Query) DatabaseInit

func (q Query) DatabaseInit()

Initializes the Neo4j Database

func (Query) DeriveHandleFromAuthToken

func (q Query) DeriveHandleFromAuthToken(token string) (handle string, ok bool)

func (Query) DestroyAuthToken

func (q Query) DestroyAuthToken(token string) bool

func (Query) EmailUnique

func (q Query) EmailUnique(email string) bool

func (Query) FindAuthToken

func (q Query) FindAuthToken(token string) bool

func (Query) GetCuratedRecipeById

func (q Query) GetCuratedRecipeById(id string) (r types.Recipe, ok bool)

func (Query) GetCuratedRecipes

func (q Query) GetCuratedRecipes() (res types.Recipes, ok bool)

func (Query) GetHashedPassword

func (q Query) GetHashedPassword(handle string) (hashedPassword []byte, ok bool)

func (Query) GetOwnRecipes

func (q Query) GetOwnRecipes(handle string) (res types.Recipes, ok bool)

func (Query) GetVisibleRecipeById

func (q Query) GetVisibleRecipeById(handle string, id string) (r types.Recipe, ok bool)

func (Query) HandleUnique

func (q Query) HandleUnique(handle string) bool

func (Query) SetGetNewAuthTokenForUser

func (q Query) SetGetNewAuthTokenForUser(handle string) (string, bool)

func (Query) UserExistsByEmail

func (q Query) UserExistsByEmail(email string) bool

func (Query) UserExistsByHandle

func (q Query) UserExistsByHandle(handle string) bool

type QueryStrings

type QueryStrings struct {
	FindToken         string
	CreateRecipe      string
	ReturnRecipe      string
	FindCurator       string
	AddCuratorRel     string
	CreateIngredient  string
	CreateStep        string
	GetOwnRecipes     string
	GetIngredients    string
	GetSteps          string
	GetTags           string
	GetCuratedRecipes string
	GetOwnRecipe      string
	GetVisibleRecipe  string
	RecipeAuthor      string
	TagExists         string
	CreateNewTag      string
	AddRelationToTag  string
}

func QueryStringInit

func QueryStringInit() QueryStrings

Jump to

Keyboard shortcuts

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