handlers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoiseCapabilityVersion = 28
)

Variables

This section is empty.

Functions

func HttpRedirectHandler

func HttpRedirectHandler(tls config.Tls) echo.HandlerFunc

func HttpsRedirect

func HttpsRedirect(c config.Tls) echo.MiddlewareFunc

func IndexHandler

func IndexHandler(code int) echo.HandlerFunc

func KeyHandler

func KeyHandler(keys *config.ServerKeys) echo.HandlerFunc

func Version

func Version(c echo.Context) error

Types

type AuthFormData

type AuthFormData struct {
	ProviderAvailable bool
	Csrf              string
}

type AuthenticationHandlers

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

func NewAuthenticationHandlers

func NewAuthenticationHandlers(
	config *config.Config,
	authProvider provider.AuthProvider,
	systemIAMPolicy *domain.IAMPolicy,
	repository domain.Repository) *AuthenticationHandlers

func (*AuthenticationHandlers) Callback

func (h *AuthenticationHandlers) Callback(c echo.Context) error

func (*AuthenticationHandlers) EndOAuth

func (h *AuthenticationHandlers) EndOAuth(c echo.Context) error

func (*AuthenticationHandlers) Error

func (h *AuthenticationHandlers) Error(c echo.Context) error

func (*AuthenticationHandlers) ProcessAuth

func (h *AuthenticationHandlers) ProcessAuth(c echo.Context) error

func (*AuthenticationHandlers) StartAuth

func (h *AuthenticationHandlers) StartAuth(c echo.Context) error

func (*AuthenticationHandlers) StartCliAuth

func (h *AuthenticationHandlers) StartCliAuth(c echo.Context) error

func (*AuthenticationHandlers) Success

func (h *AuthenticationHandlers) Success(c echo.Context) error

type CreatePeerHandler

type CreatePeerHandler func(p key.MachinePublic) http.Handler

type NoiseHandlers

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

func NewNoiseHandlers

func NewNoiseHandlers(controlKey key.MachinePrivate, createPeerHandler CreatePeerHandler) *NoiseHandlers

func (*NoiseHandlers) Upgrade

func (h *NoiseHandlers) Upgrade(c echo.Context) error

type OfflineTimers

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

func NewOfflineTimers

func NewOfflineTimers(repository domain.Repository, pubsub broker.Pubsub) *OfflineTimers

func (*OfflineTimers) Start

func (o *OfflineTimers) Start()

type PollNetMapHandler

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

func NewPollNetMapHandler

func NewPollNetMapHandler(
	createBinder bind.Factory,
	brokers broker.Pubsub,
	repository domain.Repository,
	offlineTimers *OfflineTimers) *PollNetMapHandler

func (*PollNetMapHandler) PollNetMap

func (h *PollNetMapHandler) PollNetMap(c echo.Context) error

type Reaper

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

func NewReaper

func NewReaper(brokers broker.Pubsub, repository domain.Repository) *Reaper

func (*Reaper) Start

func (r *Reaper) Start()

type RegistrationHandlers

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

func NewRegistrationHandlers

func NewRegistrationHandlers(
	createBinder bind.Factory,
	config *config.Config,
	brokers broker.Pubsub,
	repository domain.Repository) *RegistrationHandlers

func (*RegistrationHandlers) Register

func (h *RegistrationHandlers) Register(c echo.Context) error

type Selector

type Selector func(ctx context.Context, ip string) (int64, error)

type TailnetSelectionData

type TailnetSelectionData struct {
	AccountID   uint64
	Tailnets    []domain.Tailnet
	SystemAdmin bool
	Csrf        string
}

type TailnetSelectionForm

type TailnetSelectionForm struct {
	AccountID     uint64 `form:"aid"`
	TailnetID     uint64 `form:"tid"`
	AsSystemAdmin bool   `form:"sad"`
	AuthKey       string `form:"ak"`
}

Jump to

Keyboard shortcuts

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