projectidentity

package
v0.0.0-...-51f9457 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

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.

Jump to

Keyboard shortcuts

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