Documentation ¶
Index ¶
- Variables
- type State
- func (s *State) AddPolicyMembers(_ context.Context, policyID string, members []storage.Member) ([]storage.Member, error)
- func (*State) ApplyStagedRules(context.Context) error
- func (s *State) Close() error
- func (s *State) CreatePolicy(_ context.Context, inputPol *storage.Policy, ...) (*storage.Policy, error)
- func (s *State) CreateProject(_ context.Context, project *storage.Project, addPolicies bool) (*storage.Project, error)
- func (s *State) CreateRole(_ context.Context, role *storage.Role, ...) (*storage.Role, error)
- func (s *State) CreateRule(_ context.Context, rule *storage.Rule) (*storage.Rule, error)
- func (s *State) DeletePolicy(ctx context.Context, policyID string) error
- func (s *State) DeleteProject(ctx context.Context, id string) error
- func (s *State) DeleteRole(ctx context.Context, roleID string) error
- func (s *State) DeleteRule(ctx context.Context, projectID, ruleID string) error
- func (*State) EnsureNoProjectsMissing(ctx context.Context, projectIDs []string) error
- func (*State) FetchAppliedRulesByProjectIDs(ctx context.Context) (map[string][]*storage.Rule, error)
- func (s *State) GetPolicy(_ context.Context, policyID string) (pol *storage.Policy, err error)
- func (s *State) GetPolicyChangeID(_ context.Context) (string, error)
- func (s *State) GetPolicyChangeNotifier(ctx context.Context) (storage.PolicyChangeNotifier, error)
- func (s *State) GetProject(_ context.Context, id string) (*storage.Project, error)
- func (s *State) GetRole(_ context.Context, roleID string) (role *storage.Role, err error)
- func (s *State) GetStagedOrAppliedRule(_ context.Context, projectID, ruleID string) (*storage.Rule, error)
- func (s *State) ListPolicies(context.Context) ([]*storage.Policy, error)
- func (s *State) ListPolicyMembers(_ context.Context, policyID string) ([]storage.Member, error)
- func (s *State) ListProjects(context.Context) ([]*storage.Project, error)
- func (s *State) ListRoles(context.Context) ([]*storage.Role, error)
- func (s *State) ListRules(_ context.Context) ([]*storage.Rule, error)
- func (s *State) ListRulesForProject(_ context.Context, projectID string) ([]*storage.Rule, storage.ProjectRulesStatus, error)
- func (s *State) ListStagedAndAppliedRules(_ context.Context) ([]*storage.Rule, error)
- func (s *State) PoliciesCache() *cache.Cache
- func (s *State) ProjectsCache() *cache.Cache
- func (s *State) PurgeSubjectFromPolicies(_ context.Context, sub string) ([]string, error)
- func (s *State) RemovePolicyMembers(ctx context.Context, policyID string, membersToRemove []storage.Member) ([]storage.Member, error)
- func (s *State) RemoveProjectFromGraveyard(context.Context, string) error
- func (s *State) ReplacePolicyMembers(ctx context.Context, policyID string, members []storage.Member) ([]storage.Member, error)
- func (s *State) Reset(ctx context.Context) error
- func (s *State) RolesCache() *cache.Cache
- func (s *State) RulesCache() *cache.Cache
- func (s *State) UpdatePolicy(_ context.Context, p *storage.Policy) (*storage.Policy, error)
- func (s *State) UpdateProject(_ context.Context, project *storage.Project) (*storage.Project, error)
- func (s *State) UpdateRole(_ context.Context, r *storage.Role) (*storage.Role, error)
- func (s *State) UpdateRule(_ context.Context, rule *storage.Rule) (*storage.Rule, error)
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 NewWithProjectLimit ¶
func (*State) AddPolicyMembers ¶
func (*State) CreatePolicy ¶
func (*State) CreateProject ¶
func (*State) CreateRole ¶
func (*State) CreateRule ¶
func (*State) DeletePolicy ¶
func (*State) DeleteRule ¶
func (*State) EnsureNoProjectsMissing ¶
func (*State) FetchAppliedRulesByProjectIDs ¶
func (*State) GetPolicyChangeID ¶
func (*State) GetPolicyChangeNotifier ¶
func (*State) GetProject ¶
func (*State) GetStagedOrAppliedRule ¶
func (*State) ListPolicies ¶
func (*State) ListPolicyMembers ¶
func (*State) ListProjects ¶
func (*State) ListRulesForProject ¶
func (*State) ListStagedAndAppliedRules ¶
func (*State) PoliciesCache ¶
PoliciesCache is used in testing
func (*State) ProjectsCache ¶
ProjectsCache is used in testing
func (*State) PurgeSubjectFromPolicies ¶
func (*State) RemovePolicyMembers ¶
func (*State) RemoveProjectFromGraveyard ¶
func (*State) ReplacePolicyMembers ¶
func (*State) UpdatePolicy ¶
func (*State) UpdateProject ¶
func (*State) UpdateRole ¶
Click to show internal directories.
Click to hide internal directories.