Documentation
¶
Index ¶
- func ExtractClusterFromFreeDomain(domain string, availableClusters []string) (string, bool)
- func RegisterEndpoints(router *mux.Router, manager Manager)
- type Manager
- func (m Manager) CreateDomain(ctx context.Context, accountID, userID, domainName, targetCluster string) (*domain.Domain, error)
- func (m Manager) DeleteDomain(ctx context.Context, accountID, userID, domainID string) error
- func (m Manager) DeriveClusterFromDomain(ctx context.Context, accountID, domain string) (string, error)
- func (m Manager) GetDomains(ctx context.Context, accountID, userID string) ([]*domain.Domain, error)
- func (m Manager) ValidateDomain(ctx context.Context, accountID, userID, domainID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractClusterFromFreeDomain ¶
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 ¶
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 (Manager) DeleteDomain ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.