org

package
v1.1.68-test Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertEmail

type AlertEmail string

AlertEmail is an email-constrained leaf (ValidationRule -> String().Email()).

func (AlertEmail) ValidationRule

func (AlertEmail) ValidationRule() *validate.Rule

ValidationRule ports the AlertEmail leaf: Joi.string().email().

type AuthConfig

type AuthConfig struct {
	DomainAutoMembers DomainNameList `json:"domainAutoMembers,omitzero"`
	SamlOnly          *bool          `json:"samlOnly,omitzero"`
}

type DomainName

type DomainName string

DomainName is a domain-constrained leaf (ValidationRule -> String().Domain()).

func (DomainName) ValidationRule

func (DomainName) ValidationRule() *validate.Rule

ValidationRule ports the DomainName leaf: Joi.string().domain().

type DomainNameList

type DomainNameList []DomainName

DomainNameList ports AuthConfig.domainAutoMembers `sort,custom=dedupeEmpty`: an array of domain leaves, sorted ascending, with duplicates removed in place.

func (DomainNameList) ValidationRule

func (DomainNameList) ValidationRule() *validate.Rule

type ObservabilityConfig

type ObservabilityConfig struct {
	LogsRetentionDays    *float64     `json:"logsRetentionDays,omitzero" validate:"integer,min=0,max=3650,default=30"`
	MetricsRetentionDays *float64     `json:"metricsRetentionDays,omitzero" validate:"integer,min=0,max=3650,default=30"`
	TracesRetentionDays  *float64     `json:"tracesRetentionDays,omitzero" validate:"integer,min=0,max=3650,default=30"`
	DefaultAlertEmails   []AlertEmail `json:"defaultAlertEmails,omitzero" validate:"default=[]"`
}

ObservabilityConfig ports org.ts:46. The retention fields default to 30; the whole-object default (org.ts:88) is injected by orgSpecRefine when absent.

type Org

type Org struct {
	Id           string     `json:"id,omitzero" validate:"uuid,readOnly"`
	Kind         base.Kind  `json:"kind,omitzero"`
	Version      *float64   `json:"version,omitzero" validate:"positive,integer,readOnly"`
	Description  string     `json:"description,omitzero" validate:"trim,max=250,allow="`
	Tags         OrgTags    `json:"tags,omitzero" validate:"default={}"`
	Created      string     `json:"created,omitzero" validate:"date,readOnly"`
	LastModified string     `json:"lastModified,omitzero" validate:"date,readOnly"`
	Links        base.Links `json:"links,omitzero" validate:"readOnly"`
	Name         OrgName    `json:"name,omitzero"`
	Spec         *OrgSpec   `json:"spec,omitzero"`
	Status       *OrgStatus `json:"status,omitzero"`
}

Org ports org.ts:100 Org = Base.keys({name, spec, status}). name carries the xserve-/index guard (OrgName nominal type). Joi's .keys() APPENDS, so a key Base already declares is re-declared at the END — which is why `name` sits between `links` and `spec` here and not where Base puts it. The order is load-bearing: abortEarly reports the first failing key in declaration order.

func (Org) ValidationRule

func (Org) ValidationRule() *validate.Rule

ValidationRule reflects Org. This is the schema the "org" kind validates against.

type OrgAccountLink string

OrgAccountLink is the OrgStatus.accountLink leaf — the strongly-typed replacement for the `pattern=orgAccountLink` tag.

func (OrgAccountLink) ValidationRule

func (OrgAccountLink) ValidationRule() *validate.Rule

type OrgConfig

type OrgConfig struct {
	AwsPrivateLinks    StringDedupeList  `json:"awsPrivateLinks,omitzero"`
	GcpServiceConnects StringDedupeList  `json:"gcpServiceConnects,omitzero"`
	QuotaOverrides     QuotaOverrideList `json:"quotaOverrides,omitzero"`
}

type OrgName

type OrgName string

OrgName is the org name leaf: base Name (regex/max-64/unmodifiable) plus the xserve-/index guard — the strongly-typed replacement for the `custom=orgName` tag on Org.name.

func (OrgName) ValidationRule

func (OrgName) ValidationRule() *validate.Rule

type OrgSpec

type OrgSpec struct {
	Logging               *OrgSpecLogging       `json:"logging,omitzero"`
	ExtraLogging          []OrgSpecExtraLogging `json:"extraLogging,omitzero" validate:"max=3,unique"`
	Tracing               *tracing.Tracing      `json:"tracing,omitzero"`
	SessionTimeoutSeconds *float64              `json:"sessionTimeoutSeconds,omitzero" validate:"min=900"`
	AuthConfig            *AuthConfig           `json:"authConfig,omitzero"`
	Observability         *OrgSpecObservability `json:"observability,omitzero"`
	Security              *OrgSpecSecurity      `json:"security,omitzero"`
}

OrgSpec ports org.ts:79. The observability whole-object default and the extraLogging .when('logging') guard live in orgSpecRefine.

func (OrgSpec) ValidationRule

func (OrgSpec) ValidationRule() *validate.Rule

ValidationRule reflects OrgSpec and layers the two object-level rules a field tag cannot carry: the extraLogging .when('logging') guard and the observability whole-object default (orgSpecRefine).

type OrgSpecExtraLogging

type OrgSpecExtraLogging = OrgSpecLogging

OrgSpecExtraLogging aliases OrgSpecLogging (extraLogging items share logCfg).

type OrgSpecLogging

type OrgSpecLogging struct {
	S3            *orgLogging.S3Logging            `json:"s3,omitzero"`
	Coralogix     *orgLogging.CoralogixLogging     `json:"coralogix,omitzero"`
	Datadog       *orgLogging.DatadogLogging       `json:"datadog,omitzero"`
	Logzio        *orgLogging.LogzioLogging        `json:"logzio,omitzero"`
	Elastic       *orgLogging.ElasticLogging       `json:"elastic,omitzero"`
	CloudWatch    *orgLogging.CloudWatchLogging    `json:"cloudWatch,omitzero"`
	Fluentd       *orgLogging.FluentdLogging       `json:"fluentd,omitzero"`
	Stackdriver   *orgLogging.StackdriverLogging   `json:"stackdriver,omitzero"`
	Syslog        *orgLogging.SyslogLogging        `json:"syslog,omitzero"`
	Opentelemetry *orgLogging.OpenTelemetryLogging `json:"opentelemetry,omitzero"`
	Loki          *orgLogging.LokiLogging          `json:"loki,omitzero"`
}

OrgSpecLogging ports the logCfg object (org.ts:32) — exactly one of the 11 providers (.xor registered on this type).

func (OrgSpecLogging) ValidationRule

func (OrgSpecLogging) ValidationRule() *validate.Rule

ValidationRule reflects OrgSpecLogging and layers the logCfg .xor: exactly one of the 11 log providers may be present.

type OrgSpecObservability

type OrgSpecObservability = ObservabilityConfig

OrgSpecObservability aliases ObservabilityConfig (org.ts uses one type).

type OrgSpecSecurity

type OrgSpecSecurity struct {
	ThreatDetection *ThreatDetection `json:"threatDetection,omitzero"`
}

type OrgStatus

type OrgStatus struct {
	AccountLink    OrgAccountLink `json:"accountLink,omitzero"`
	Active         *bool          `json:"active,omitzero"`
	EndpointPrefix string         `json:"endpointPrefix,omitzero"`
}

type OrgTags

type OrgTags = base.Tags

OrgTags aliases base.Tags so the reflection base-type registry resolves it to the shared TagsRule.

type QuotaOverride

type QuotaOverride struct {
	Name string  `json:"name" validate:"required"`
	Max  float64 `json:"max" validate:"required,positive"`
}

type QuotaOverrideList

type QuotaOverrideList []QuotaOverride

QuotaOverrideList ports OrgConfig.quotaOverrides `custom=dedupeEmpty,custom= sortByName`: dedupe (makeUnique with no key) then sort by the "name" field.

func (QuotaOverrideList) ValidationRule

func (QuotaOverrideList) ValidationRule() *validate.Rule

type StringDedupeList

type StringDedupeList []string

StringDedupeList ports the OrgConfig aws/gcp `custom=dedupeEmpty` string lists: an array of strings with duplicates removed in place.

func (StringDedupeList) ValidationRule

func (StringDedupeList) ValidationRule() *validate.Rule

type SyslogHostname

type SyslogHostname string

SyslogHostname is the ThreatDetectionSyslog.host leaf — the strongly-typed replacement for the `custom=syslogHostname` tag.

func (SyslogHostname) ValidationRule

func (SyslogHostname) ValidationRule() *validate.Rule

ValidationRule ports org.ts:71's syslog host pattern. It was a hand-rolled custom raising a bare string.pattern.base that quoted the VALUE and carried neither the regex nor the value in context; RegexAs gives Joi's message and context for free.

type ThreatDetection

type ThreatDetection struct {
	Enabled         bool                           `json:"enabled" validate:"required"`
	MinimumSeverity ThreatDetectionMinimumSeverity `json:"minimumSeverity,omitzero" validate:"optional,valid=warning|error|critical"`
	Syslog          *ThreatDetectionSyslog         `json:"syslog,omitzero"`
}

ThreatDetection ports org.ts:58. .xor('syslog') is registered on this type.

func (ThreatDetection) ValidationRule

func (ThreatDetection) ValidationRule() *validate.Rule

ValidationRule reflects ThreatDetection and layers .xor('syslog') (org.ts:58).

type ThreatDetectionMinimumSeverity

type ThreatDetectionMinimumSeverity string
const (
	ThreatDetectionMinimumSeverityWarning  ThreatDetectionMinimumSeverity = "warning"
	ThreatDetectionMinimumSeverityError    ThreatDetectionMinimumSeverity = "error"
	ThreatDetectionMinimumSeverityCritical ThreatDetectionMinimumSeverity = "critical"
)

type ThreatDetectionSyslog

type ThreatDetectionSyslog struct {
	Transport ThreatDetectionSyslogTransport `json:"transport,omitzero" validate:"valid=tcp|udp,default=tcp"`
	Host      SyslogHostname                 `json:"host" validate:"required"`
	Port      float64                        `json:"port" validate:"integer,min=1,max=100000,required"`
}

type ThreatDetectionSyslogTransport

type ThreatDetectionSyslogTransport string
const (
	ThreatDetectionSyslogTransportTcp ThreatDetectionSyslogTransport = "tcp"
	ThreatDetectionSyslogTransportUdp ThreatDetectionSyslogTransport = "udp"
)

Jump to

Keyboard shortcuts

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