Back to

Package projectidentity

Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module:



var (
	// ErrNotFound indicates that the entity which was queried does not exist in the storage.
	ErrNotFound = errors.New("not found")

type ProjectIdentity

type ProjectIdentity struct {
	Project string `gae:"$id"`
	Email   string
	// contains filtered or unexported fields

ProjectIdentity defines a scoped identity in the storage.

type Storage

type Storage interface {

	// Create an identity or update if it already exists.
	Create(c context.Context, identity *ProjectIdentity) (*ProjectIdentity, error)

	// Update an identity in the storage.
	Update(c context.Context, identity *ProjectIdentity) (*ProjectIdentity, error)

	// Delete an identity from the storage.
	Delete(c context.Context, identity *ProjectIdentity) error

	// LookupByProject performs a lookup by project name.
	LookupByProject(c context.Context, project string) (*ProjectIdentity, error)

Storage interface declares methods for the scoped identity storage.

func ProjectIdentities

func ProjectIdentities(_ context.Context) Storage

ProjectIdentities returns the global scoped identity storage.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier