guard

package
v0.0.68 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func With

func With(ctx context.Context, g Guard) context.Context

Types

type BasicGuard

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

func New

func New(o *v1.Config, tenants *tenant.Tenants) *BasicGuard

func (*BasicGuard) Accept

func (b *BasicGuard) Accept(domain string) bool

func (*BasicGuard) Allow

func (b *BasicGuard) Allow() (ok bool)

type Guard

type Guard interface {
	Allow() bool
	Accept(domain string) bool
}

func Get

func Get(ctx context.Context) Guard

Jump to

Keyboard shortcuts

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