event

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractEvent

type AbstractEvent struct {
	*event.ApplicationEvent
	RequestId         string `json:"request_id,omitempty"`
	UserId            string `json:"user_id,omitempty"`
	TechnicalUsername string `json:"technical_username,omitempty"`
}

func NewAbstractEvent

func NewAbstractEvent(ctx context.Context, name string, options ...event.AppEventOpt) *AbstractEvent

func (*AbstractEvent) GetAbstractEvent

func (a *AbstractEvent) GetAbstractEvent() *AbstractEvent

func (*AbstractEvent) String

func (a *AbstractEvent) String() string

type AbstractEventWrapper

type AbstractEventWrapper interface {
	GetAbstractEvent() *AbstractEvent
}

type Attributes

type Attributes struct {
	CorrelationId     string `json:"request_id,omitempty"`
	UserId            string `json:"jwt_subject,omitempty"`
	DeviceId          string `json:"device_id,omitempty"`
	DeviceSessionId   string `json:"device_session_id,omitempty"`
	TechnicalUsername string `json:"technical_username,omitempty"`
}

func GetAttributes

func GetAttributes(ctx context.Context) *Attributes

func MakeAttributes

func MakeAttributes(e *AbstractEvent) *Attributes

type RequestCompletedEvent

type RequestCompletedEvent struct {
	*AbstractEvent
}

func NewRequestCompletedEvent

func NewRequestCompletedEvent(ctx context.Context, payload *RequestCompletedMessage) *RequestCompletedEvent

func (RequestCompletedEvent) String

func (a RequestCompletedEvent) String() string

type RequestCompletedMessage

type RequestCompletedMessage struct {
	Status            int           `json:"status"`
	ExecutionTime     time.Duration `json:"duration_ms"`
	Uri               string        `json:"uri"`
	Query             string        `json:"query,omitempty"`
	Mapping           string        `json:"mapping,omitempty"`
	Url               string        `json:"url"`
	Method            string        `json:"method"`
	CorrelationId     string        `json:"correlation_id,omitempty"`
	CallerId          string        `json:"caller_id,omitempty"`
	ClientIpAddress   string        `json:"client_ip_address,omitempty"`
	Locale            string        `json:"locale,omitempty"`
	UserAgent         string        `json:"user_agent,omitempty"`
	UserId            string        `json:"user_id,omitempty"`
	DeviceId          string        `json:"device_id,omitempty"`
	DeviceSessionId   string        `json:"device_session_id,omitempty"`
	TechnicalUsername string        `json:"technical_username,omitempty"`
}

Jump to

Keyboard shortcuts

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