SeanDolphin / fakegaekey

Creates a Fake Google App Engine datastore.Key. This can be used for outside scripts that need to be able to encode keys and store them.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fakegaekey GoDoc wercker status GoCover

Creates a Fake Google App Engine datastore.Key. This can be used for outside scripts that need to be able to encode keys and store them.

Usage

// main.go
package main

import (
	"github.com/SeanDolphin/faekgaekey"
)


func main() {
  	context := fakegaekey.Context{AppID: "myappid", Namespace: "test"}
  	createdKey := fakegaekey.NewKey(context, "doc", "someID", 0, nil)

  	// Do something with your key


  	decodedKey, err := fakegaekey.DecodeKey("randomencodekeystring")
  	//Do something with your.
}

About

Creates a Fake Google App Engine datastore.Key. This can be used for outside scripts that need to be able to encode keys and store them.

License:Apache License 2.0


Languages

Language:Go 100.0%