checker

package
v0.0.0-...-4a47344 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rego

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

Rego is an api.TokenChecker that evaluates a Rego policy.

func NewRego

func NewRego(ctx context.Context, log *slog.Logger, policy string) (*Rego, error)

func (Rego) Check

func (r Rego) Check(ctx context.Context, claims api.Claims, req *api.TokenRequest) (bool, error)

type RepoRego

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

func NewRepoRego

func NewRepoRego(log *slog.Logger, github *github.Clients, ownerRepo string, everyRepo bool) *RepoRego

func (RepoRego) Check

func (r RepoRego) Check(ctx context.Context, claims api.Claims, req *api.TokenRequest) (bool, error)

Jump to

Keyboard shortcuts

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