enforce

package
v0.0.0-...-3d71f35 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package enforce is a central engine to Allstar that contains various enforcement logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnforceJob

func EnforceJob(ctx context.Context, ghc *ghclients.GHClients, d time.Duration, specificPolicyArg string, specificRepoArg string) error

EnforceJob is a reconciliation job that enforces policies on all repos every d duration. It runs forever until the context is done.

Types

type EnforceAllResults

type EnforceAllResults = map[string]map[string]int

func EnforceAll

func EnforceAll(ctx context.Context, ghc ghclients.GhClientsInterface, specificPolicyArg string, specificRepoArg string) (EnforceAllResults, error)

EnforceAll iterates through all available installations and repos Allstar has access to and runs policies on those repos. It is meant to be a reconciliation job to check repos which a webhook event may have been lost.

TBD: determine if this should remain exported, or if it will only be called from EnforceJob.

type EnforceRepoResults

type EnforceRepoResults = map[string]bool

Jump to

Keyboard shortcuts

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