Documentation
¶
Overview ¶
Package dstu2 contains helper methods to construct AuditEvent resources
Index ¶
- func DateTime(at time.Time) *dstu2dt.Instant
- func NewAuditEvent(productKey, tenant string, options ...OptionFunc) (*dstu2pb.AuditEvent, error)
- type OptionFunc
- func AddObject(object *dstu2pb.AuditEvent_Object) OptionFunc
- func AddParticipant(participant *dstu2pb.AuditEvent_Participant) OptionFunc
- func AddSourceExtensionUriValue(extensionUri, extensionValue string) OptionFunc
- func WithEvent(e *dstu2pb.AuditEvent_Event) OptionFunc
- func WithSourceIdentifier(identifier *dstu2dt.Identifier) OptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 WithSourceIdentifier ¶
func WithSourceIdentifier(identifier *dstu2dt.Identifier) OptionFunc
WithSourceIdentifier sets the source identifier
Click to show internal directories.
Click to hide internal directories.