memstore

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTypeAssertionFailed = errors.New("type assertion failed: could not convert interface{} to *storage.Policy")

Functions

This section is empty.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

func New

func New() *State

func (*State) AddPolicyMembers

func (s *State) AddPolicyMembers(
	_ context.Context, policyID string, members []storage.Member) ([]storage.Member, error)

func (*State) ApplyV2DataMigrations

func (s *State) ApplyV2DataMigrations(context.Context) error

func (*State) Close

func (s *State) Close() error

func (*State) CreatePolicy

func (s *State) CreatePolicy(_ context.Context, inputPol *storage.Policy) (*storage.Policy, error)

func (*State) CreateProject

func (s *State) CreateProject(_ context.Context, project *storage.Project) (*storage.Project, error)

func (*State) CreateRole

func (s *State) CreateRole(_ context.Context, role *storage.Role) (*storage.Role, error)

func (*State) DeletePolicy

func (s *State) DeletePolicy(ctx context.Context, policyID string) error

func (*State) DeleteProject

func (s *State) DeleteProject(ctx context.Context, id string) error

func (*State) DeleteRole

func (s *State) DeleteRole(ctx context.Context, roleID string) error

func (*State) Failure

func (s *State) Failure(context.Context) error

func (*State) GetPolicy

func (s *State) GetPolicy(_ context.Context, policyID string) (pol *storage.Policy, err error)

func (*State) GetPolicyChangeID

func (s *State) GetPolicyChangeID(_ context.Context) (string, error)

func (*State) GetPolicyChangeNotifier

func (s *State) GetPolicyChangeNotifier(ctx context.Context) (v2.PolicyChangeNotifier, error)

func (*State) GetProject

func (s *State) GetProject(_ context.Context, id string) (*storage.Project, error)

func (*State) GetRole

func (s *State) GetRole(_ context.Context, roleID string) (role *storage.Role, err error)

func (*State) InProgress

func (s *State) InProgress(context.Context) error

func (*State) ListPolicies

func (s *State) ListPolicies(context.Context) ([]*storage.Policy, error)

func (*State) ListPolicyMembers

func (s *State) ListPolicyMembers(_ context.Context, policyID string) ([]storage.Member, error)

func (*State) ListProjects

func (s *State) ListProjects(context.Context) ([]*storage.Project, error)

func (*State) ListRoles

func (s *State) ListRoles(context.Context) ([]*storage.Role, error)

func (*State) MigrationStatus

func (s *State) MigrationStatus(context.Context) (storage.MigrationStatus, error)

func (*State) PoliciesCache

func (s *State) PoliciesCache() *cache.Cache

PoliciesCache is used in testing

func (*State) Pristine

func (s *State) Pristine(context.Context) error

func (*State) ProjectsCache

func (s *State) ProjectsCache() *cache.Cache

ProjectsCache is used in testing

func (*State) PurgeSubjectFromPolicies

func (s *State) PurgeSubjectFromPolicies(_ context.Context, sub string) ([]string, error)

func (*State) RemovePolicyMembers

func (s *State) RemovePolicyMembers(ctx context.Context,
	policyID string, membersToRemove []storage.Member) ([]storage.Member, error)

func (*State) ReplacePolicyMembers

func (s *State) ReplacePolicyMembers(
	ctx context.Context, policyID string, members []storage.Member) ([]storage.Member, error)

func (*State) Reset

func (s *State) Reset(ctx context.Context) error

func (*State) RolesCache

func (s *State) RolesCache() *cache.Cache

RolesCache is used in testing

func (*State) Success

func (s *State) Success(context.Context) error

func (*State) SuccessBeta1

func (s *State) SuccessBeta1(context.Context) error

func (*State) UpdatePolicy

func (s *State) UpdatePolicy(_ context.Context, p *storage.Policy) (*storage.Policy, error)

func (*State) UpdateProject

func (s *State) UpdateProject(_ context.Context, project *storage.Project) (*storage.Project, error)

func (*State) UpdateRole

func (s *State) UpdateRole(_ context.Context, r *storage.Role) (*storage.Role, error)

Jump to

Keyboard shortcuts

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