Categorygithub.com/bogdanp/anom
modulepackage
0.0.0-20160717113802-e8c38e2db347
Repository: https://github.com/bogdanp/anom.git
Documentation: pkg.go.dev

# README

anom

GoDoc Build Status codebeat badge

go get github.com/Bogdanp/anom

Package anom is a simple "object mapper" for appengine datastore that provides some convenience functions for dealing with datastore entities.

Check out the example directory for usage examples.

# Packages

No description provided by the author

# Functions

Delete soft deletes a Model from datastore.
Get retrieves a Model from datastore by its id.
Put stores a Model to datastore.
Query returns a new datastore query for the given kind that will ignore deleted entities.
WithIntID is an Option for assigning a datastore Key with the given int64 id to a Model's Meta.
WithKey is an Option for assigning a datastore Key to a Model's Meta.
WithParent is an Option for assigning a datastore Key to a Model's Meta as that Model's parent.
WithStringID is an Option for assigning a datastore Key with the given string id to a Model's Meta.

# Constants

StateActive is the state of Model instances that have been persisted.
StateDeleted is the state of Model instances that have been deleted.

# Variables

ErrMissingKey is the error that is returned when a Model lacks a key.

# Structs

Meta is the struct that all Model structs must embed.

# Interfaces

Model is the interface that all Model structs automatically implement when they embed Meta.

# Type aliases

Option is the type of functional Model options.