luci: Index | Files

package projectidentity

import ""


Package Files



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

type ProjectIdentity Uses

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

ProjectIdentity defines a scoped identity in the storage.

type Storage Uses

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 Uses

func ProjectIdentities(_ context.Context) Storage

ProjectIdentities returns the global scoped identity storage.

Package projectidentity imports 5 packages (graph) and is imported by 4 packages. Updated 2021-01-21. Refresh now. Tools for package owners.