admission

package
v0.0.0-...-8101a8f Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admissioner

type Admissioner interface {
	Review(
		ctx context.Context,
		sess session.Session,
	) (ReviewResult, error)
}

func NewTelegramChannelAdmission

func NewTelegramChannelAdmission(
	logger *zap.Logger,
	botSettings settings.BotSettings,
	authzSettings settings.AuthzSettings,
) (Admissioner, error)

func WithCache

func WithCache(
	admissioner Admissioner,
	cacheTTL time.Duration,
) (Admissioner, error)

func WithSingleFlight

func WithSingleFlight(
	admissioner Admissioner,
) (Admissioner, error)

type ReviewResult

type ReviewResult struct {
	Allowed bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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