metadata

package
v1.0.0-beta.145 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EntityEntitlement = "entitlement"
	EntitySubjectKey  = "subjectKey"
	EntityGrant       = "grant"
)

Entitlements

View Source
const (
	EntityEvent = "event"
)

Ingestion/Events

Variables

This section is empty.

Functions

func ComposeResourcePath

func ComposeResourcePath(namespace string, items ...string) string

func ComposeResourcePathRaw

func ComposeResourcePathRaw(items ...string) string

func GetEventName

func GetEventName(spec EventType) string

Types

type EventMetadata

type EventMetadata struct {
	// ID of the event
	ID string

	// Time specifies when the event occurred
	Time time.Time

	// Subject meta
	// Examples for source and subject pairs
	//  grant:
	//      source: //openmeter.io/namespace/<id>/entitlement/<id>/grant/<id>
	//      subject: //openmeter.io/namespace/<id>/subject/<subjectID>
	//
	//  entitlement:
	//      source: //openmeter.io/namespace/<id>/entitlement/<id>
	//      subject: //openmeter.io/namespace/<id>/subject/<subjectID>
	//
	//  ingest:
	//      source: //openmeter.io/namespace/<id>/event
	//      subject: //openmeter.io/namespace/<id>/subject/<subjectID>
	Subject string
	Source  string
}

type EventName

type EventName string

type EventSubsystem

type EventSubsystem string

type EventType

type EventType struct {
	// Subsystem defines which connector/component is responsible for the event (e.g. ingest, entitlements, etc)
	Subsystem EventSubsystem

	// Type is the actual event type (e.g. ingestion, flush, etc)
	Name EventName

	// Version is the version of the event (e.g. v1, v2, etc)
	Version EventVersion
}

func (*EventType) EventName

func (s *EventType) EventName() string

func (*EventType) VersionSubsystem

func (s *EventType) VersionSubsystem() string

type EventVersion

type EventVersion string

Jump to

Keyboard shortcuts

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