spi

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// VerifierEventTopic verifier topic name.
	VerifierEventTopic = "vcs-verifier"
	// IssuerEventTopic issuer topic name.
	IssuerEventTopic = "vcs-issuer"
)
View Source
const (
	// VerifierOIDCInteractionInitiated verifier oidc event.
	VerifierOIDCInteractionInitiated = "oidc_interaction_initiated"
	// VerifierOIDCInteractionQRScanned verifier oidc event.
	VerifierOIDCInteractionQRScanned = "oidc_interaction_qr_scanned"
	// VerifierOIDCInteractionSucceeded verifier oidc event.
	VerifierOIDCInteractionSucceeded = "oidc_interaction_succeeded"
	// VerifierOIDCInteractionFailed verifier oidc event.
	VerifierOIDCInteractionFailed = "oidc_interaction_failed"

	// IssuerOIDCInteractionInitiated Issuer oidc event.
	IssuerOIDCInteractionInitiated = EventType("oidc_interaction_initiated")
	// IssuerOIDCInteractionQRScanned Issuer oidc event.
	IssuerOIDCInteractionQRScanned = EventType("oidc_interaction_qr_scanned")
	// IssuerOIDCInteractionSucceeded Issuer oidc event.
	IssuerOIDCInteractionSucceeded                    = EventType("oidc_interaction_succeeded")
	IssuerOIDCInteractionAuthorizationRequestPrepared = EventType("oidc_interaction_authorization_request_prepared") //nolint
	IssuerOIDCInteractionAuthorizationCodeStored      = EventType("oidc_interaction_authorization_code_stored")      //nolint
	IssuerOIDCInteractionAuthorizationCodeExchanged   = EventType("oidc_interaction_authorization_code_exchanged")   //nolint
	IssuerOIDCInteractionFailed                       = EventType("oidc_interaction_failed")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// SpecVersion is spec version(required).
	SpecVersion string `json:"specVersion"`

	// ID identifies the event(required).
	ID string `json:"id"`

	// Source is URI for producer(required).
	Source string `json:"source"`

	// Type defines event type(required).
	Type EventType `json:"type"`

	// Time defines time of occurrence(required).
	Time *util.TimeWrapper `json:"time"`

	// DataContentType is data content type(optional).
	DataContentType string `json:"dataContentType,omitempty"`

	// Data defines message(optional).
	Data []byte `json:"data,omitempty"`

	// TransactionID defines transaction ID(optional).
	TransactionID string `json:"txnId,omitempty"`

	// Subject defines subject(optional).
	Subject string `json:"subject,omitempty"`

	// Tracing defines tracing(optional).
	Tracing string `json:"tracing,omitempty"`
}

func NewEvent

func NewEvent(uuid string, source string, eventType EventType) *Event

NewEvent creates a new Event and sets all required fields.

func NewEventWithPayload

func NewEventWithPayload(uuid string, source string, eventType EventType, payload Payload) *Event

NewEventWithPayload creates a new Event with payload.

func (*Event) Copy

func (m *Event) Copy() *Event

Copy an event.

type EventType

type EventType string

EventType event type.

type Payload

type Payload []byte

Jump to

Keyboard shortcuts

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