Help us shape the future of Go! Take the 2026 Go Developer Survey

access

package
v0.4.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CookieName = "flatrun_access"

Variables

This section is empty.

Functions

func Allows

func Allows(policy *models.DomainAccessConfig, email string) bool

func Hostname

func Hostname(value string) string

func Resolve

func Resolve(deployments []models.Deployment, host, requestPath string) (*models.DomainAccessConfig, bool)

func SafeReturn

func SafeReturn(value string) string

func ValidAllowlistEntry

func ValidAllowlistEntry(value string) bool

ValidAllowlistEntry accepts a complete email address or an exact domain prefixed with @. YAML producers must quote domain entries because @ is a reserved leading indicator.

func ValidEmail

func ValidEmail(value string) bool

Types

type Service

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

func New

func New(basePath string) (*Service, error)

func (*Service) AllowEmailRequest

func (s *Service) AllowEmailRequest(host, email string) bool
func (s *Service) MagicLink(email, host, returnPath string) (string, error)

func (*Service) Session

func (s *Service) Session(email, host string, hours int) (string, error)

func (*Service) ValidateSession

func (s *Service) ValidateSession(value, host string, policy *models.DomainAccessConfig) bool
func (s *Service) VerifyMagicLink(value string) (string, string, string, error)

Jump to

Keyboard shortcuts

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