manager

package
v0.65.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractClusterFromFreeDomain

func ExtractClusterFromFreeDomain(domain string, availableClusters []string) (string, bool)

ExtractClusterFromFreeDomain extracts the cluster address from a free domain. Free domains have the format: <name>.<nonce>.<cluster> (e.g., myapp.abc123.eu.proxy.netbird.io) It matches the domain suffix against available clusters and returns the matching cluster.

func RegisterEndpoints

func RegisterEndpoints(router *mux.Router, manager Manager)

Types

type Manager

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

func NewManager

func NewManager(store store, proxyURLProvider proxyURLProvider, permissionsManager permissions.Manager) Manager

func (Manager) CreateDomain

func (m Manager) CreateDomain(ctx context.Context, accountID, userID, domainName, targetCluster string) (*domain.Domain, error)

func (Manager) DeleteDomain

func (m Manager) DeleteDomain(ctx context.Context, accountID, userID, domainID string) error

func (Manager) DeriveClusterFromDomain

func (m Manager) DeriveClusterFromDomain(ctx context.Context, accountID, domain string) (string, error)

DeriveClusterFromDomain determines the proxy cluster for a given domain. For free domains (those ending with a known cluster suffix), the cluster is extracted from the domain. For custom domains, the cluster is determined by checking the registered custom domain's target cluster.

func (Manager) GetDomains

func (m Manager) GetDomains(ctx context.Context, accountID, userID string) ([]*domain.Domain, error)

func (Manager) ValidateDomain

func (m Manager) ValidateDomain(ctx context.Context, accountID, userID, domainID string)

Jump to

Keyboard shortcuts

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