discovery

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SignalKindIDPSSO      = "idp_sso"
	SignalKindOAuth       = "oauth_grant"
	ManagedStateManaged   = "managed"
	ManagedStateUnmanaged = "unmanaged"

	ManagedReasonActiveBindingFreshSync = "active_binding_fresh_sync"
	ManagedReasonNoBinding              = "no_binding"
	ManagedReasonConnectorDisabled      = "connector_disabled"
	ManagedReasonConnectorNotConfigured = "connector_not_configured"
	ManagedReasonStaleSync              = "stale_sync"
)

Variables

This section is empty.

Functions

func CanonicalKey

func CanonicalKey(input CanonicalInput) string

CanonicalKey returns a deterministic MVP key for SaaS app identity.

func NormalizeScopes

func NormalizeScopes(scopes []string) []string

func RefreshMetrics added in v0.4.9

func RefreshMetrics(ctx context.Context, q *gen.Queries, _ time.Time) error

func ScopesJSON

func ScopesJSON(scopes []string) []byte

func VendorLabelFromDomain added in v0.4.6

func VendorLabelFromDomain(raw string) string

VendorLabelFromDomain derives a human-readable vendor label from a domain-like input (URL/host/domain). It returns an empty string when no label can be derived.

func WriteRows added in v0.5.0

func WriteRows(ctx context.Context, q *gen.Queries, params WriteRowsParams) error

Types

type AppMetadata

type AppMetadata struct {
	CanonicalKey string
	DisplayName  string
	Domain       string
	VendorName   string
}

func BuildMetadata

func BuildMetadata(input CanonicalInput) AppMetadata

BuildMetadata returns canonical metadata for discovery rows.

type CanonicalInput

type CanonicalInput struct {
	SourceKind       string
	SourceName       string
	SourceAppID      string
	SourceAppName    string
	SourceDomain     string
	SourceVendorName string
	EntraAppID       string
}

type EventRow added in v0.5.0

type EventRow struct {
	CanonicalKey     string
	SignalKind       string
	EventExternalID  string
	SourceAppID      string
	SourceAppName    string
	SourceAppDomain  string
	SourceVendorName string
	ActorExternalID  string
	ActorEmail       string
	ActorDisplayName string
	ObservedAt       time.Time
	Scopes           []string
	RawJSON          []byte
}

type ProgressEvent added in v0.5.0

type ProgressEvent struct {
	Source  string
	Stage   string
	Current int64
	Total   int64
	Message string
}

type SourceRow added in v0.5.0

type SourceRow struct {
	CanonicalKey     string
	SourceAppID      string
	SourceAppName    string
	SourceAppDomain  string
	SourceVendorName string
	SeenAt           time.Time
}

type WriteRowsParams added in v0.5.0

type WriteRowsParams struct {
	SourceKind string
	SourceName string
	RunID      int64
	Sources    []SourceRow
	Events     []EventRow
	Report     func(ProgressEvent)
}

Jump to

Keyboard shortcuts

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