domain

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLevel

type AccessLevel string
const (
	AccessLevelUse    AccessLevel = "USE"
	AccessLevelManage AccessLevel = "MANAGE"
)

type DomainError

type DomainError struct {
	Code    ErrorCode
	Message string
}

func ValidateInboundBindingConflict

func ValidateInboundBindingConflict(existing []InboundBinding, candidate InboundBinding) *DomainError

func (*DomainError) Error

func (err *DomainError) Error() string

type ErrorCode

type ErrorCode string
const (
	ErrValidationFailed ErrorCode = "VALIDATION_FAILED"
	ErrRulePortConflict ErrorCode = "RULE_PORT_CONFLICT"
	ErrRuleDuplicateSNI ErrorCode = "RULE_DUPLICATE_SNI"
	ErrUnauthenticated  ErrorCode = "UNAUTHENTICATED"
	ErrForbidden        ErrorCode = "FORBIDDEN"
	ErrNotFound         ErrorCode = "NOT_FOUND"
	ErrConflict         ErrorCode = "CONFLICT"
)

type ForwardingType

type ForwardingType string
const (
	ForwardingTypeDirect ForwardingType = "DIRECT"
	ForwardingTypeTunnel ForwardingType = "TUNNEL"
)

type InboundBinding

type InboundBinding struct {
	NodeID          string
	ListenIP        string
	Protocol        Protocol
	Port            int
	MatchType       MatchType
	SNI             string
	ProxyProtocolIn string
	ForwardRule     string
}

type MatchType

type MatchType string
const (
	MatchTypeAnyInbound MatchType = "ANY_INBOUND"
	MatchTypeTLSSNI     MatchType = "TLS_SNI"
	MatchTypeFeature    MatchType = "FEATURE"
)

type OverLimitAction

type OverLimitAction string
const (
	OverLimitActionDisableRule OverLimitAction = "DISABLE_RULE"
	OverLimitActionWarnOnly    OverLimitAction = "WARN_ONLY"
)

type Permission

type Permission string
const (
	PermissionOrganizationRead   Permission = "organization.read"
	PermissionOrganizationUpdate Permission = "organization.update"
	PermissionQuotasManage       Permission = "quotas.manage"
	PermissionNodesRead          Permission = "nodes.read"
	PermissionNodesManage        Permission = "nodes.manage"
	PermissionMonitorsRead       Permission = "monitors.read"
	PermissionMonitorsManage     Permission = "monitors.manage"
	PermissionTargetsRead        Permission = "targets.read"
	PermissionTargetsManage      Permission = "targets.manage"
	PermissionRulesReadOwn       Permission = "rules.read_own"
	PermissionRulesManageOwn     Permission = "rules.manage_own"
	PermissionRulesReadAll       Permission = "rules.read_all"
	PermissionRulesManageAll     Permission = "rules.manage_all"
	PermissionTrafficReadOwn     Permission = "traffic.read_own"
	PermissionTrafficReadAll     Permission = "traffic.read_all"
	PermissionAuditLogsRead      Permission = "audit_logs.read"
)

type Protocol

type Protocol string
const (
	ProtocolTCP    Protocol = "TCP"
	ProtocolUDP    Protocol = "UDP"
	ProtocolTCPUDP Protocol = "TCP_UDP"
)

type Quota

type Quota struct {
	TrafficLimitBytes int64
	TrafficLimitMode  TrafficLimitMode
	OverLimitAction   OverLimitAction
}

func (Quota) Evaluate

func (quota Quota) Evaluate(usage TrafficUsage) QuotaDecision

type QuotaDecision

type QuotaDecision struct {
	Exceeded     bool
	DisableRules bool
	CountedBytes int64
}

type ResourceType

type ResourceType string
const (
	ResourceTypeNodeGroup ResourceType = "NODE_GROUP"
)

type TargetGroup

type TargetGroup struct {
	ID      string
	Members []TargetGroupMember
}

func (TargetGroup) Select

func (group TargetGroup) Select(sourceIP string, ruleID string, protocol Protocol) (TargetGroupMember, bool)

type TargetGroupMember

type TargetGroupMember struct {
	TargetID string
	Priority int
	Enabled  bool
	Healthy  bool
}

type TrafficLimitMode

type TrafficLimitMode string
const (
	TrafficLimitModeTotal        TrafficLimitMode = "TOTAL"
	TrafficLimitModeUploadOnly   TrafficLimitMode = "UPLOAD_ONLY"
	TrafficLimitModeDownloadOnly TrafficLimitMode = "DOWNLOAD_ONLY"
	TrafficLimitModeMaxOfUpDown  TrafficLimitMode = "MAX_OF_UP_DOWN"
)

type TrafficUsage

type TrafficUsage struct {
	UploadBytes   int64
	DownloadBytes int64
}

func (TrafficUsage) CountedBytes

func (usage TrafficUsage) CountedBytes(mode TrafficLimitMode) int64

Jump to

Keyboard shortcuts

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