storage

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AccessdTableBlobstore is the table where blobstore stores accessd records.
	AccessdTableBlobstore = "access_control_blobstore"

	// AccessdDefaultType is the default type blobstore uses for accessd protos.
	AccessdDefaultType = "access_control"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessdStorage

type AccessdStorage interface {
	// ListAllIdentity returns all identities tracked as part of an ACL.
	ListAllIdentity() ([]*protos.Identity, error)

	// GetACL returns the ACL for the passed identity.
	// If not found, returns wrapped codes.NotFound.
	GetACL(id *protos.Identity) (*accessprotos.AccessControl_List, error)

	// GetManyACL returns a list of ACLs for the passed identities.
	GetManyACL(id []*protos.Identity) ([]*accessprotos.AccessControl_List, error)

	// PutACL associates an ACL with an identity, overwriting any previous ACL.
	PutACL(id *protos.Identity, acl *accessprotos.AccessControl_List) error

	// UpdateACLWithEntities updates the ID's ACL with additional entities.
	UpdateACLWithEntities(id *protos.Identity, entities []*accessprotos.AccessControl_Entity) error

	// DeleteACL removes the ACL associated with the passed identity.
	DeleteACL(id *protos.Identity) error
}

AccessdStorage provides storage functionality for mapping identities to ACLs. Methods return errors with relevant grpc/codes/Code codes embedded in the error string, including guards against nil arguments.

func NewAccessdBlobstore

func NewAccessdBlobstore(factory blobstore.BlobStorageFactory) AccessdStorage

NewAccessdBlobstore returns an initialized instance of accessdBlobstore as AccessdStorage.

Jump to

Keyboard shortcuts

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