dstu2

package
v0.85.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package dstu2 contains helper methods to construct AuditEvent resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DateTime

func DateTime(at time.Time) *dstu2dt.Instant

DateTime returns DateTime

func NewAuditEvent

func NewAuditEvent(productKey, tenant string, options ...OptionFunc) (*dstu2pb.AuditEvent, error)

NewAuditEvent creates a new audit event. It takes productKey and tenant as arguments as these are required for publishing to to Host Auditing service

Types

type OptionFunc

type OptionFunc func(sub *dstu2pb.AuditEvent) error

func AddObject

func AddObject(object *dstu2pb.AuditEvent_Object) OptionFunc

AddObject adds the passed object to the AuditEvent

func AddParticipant

func AddParticipant(participant *dstu2pb.AuditEvent_Participant) OptionFunc

AddParticipant adds the participant

func AddSourceExtensionUriValue

func AddSourceExtensionUriValue(extensionUri, extensionValue string) OptionFunc

AddSourceExtensionUriValue sets extension Uri/Value tuples, some of which are mandatory for successfully posting to HSDP Audit

func WithEvent

func WithEvent(e *dstu2pb.AuditEvent_Event) OptionFunc

WithEvent sets the event

func WithSourceIdentifier

func WithSourceIdentifier(identifier *dstu2dt.Identifier) OptionFunc

WithSourceIdentifier sets the source identifier

Jump to

Keyboard shortcuts

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