Help us shape the future of Go! Take the 2026 Go Developer Survey

middleware

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogAudit

func LogAudit(client audit.Auditor, r *http.Request, resource string, resourceID *string, status string)

LogAudit logs an audit event for portal-backend operations by extracting request info and creating an audit log

func LogAuditEvent

func LogAuditEvent(r *http.Request, resource string, resourceID *string, status string)

LogAuditEvent - global function for easy access from handlers

Types

type ActorType added in v0.5.0

type ActorType string

ActorType represents different actor types for auditing

const (
	ActorTypeAdmin  ActorType = "ADMIN"
	ActorTypeMember ActorType = "MEMBER"
	ActorTypeSystem ActorType = "SYSTEM"
)

type AuditStatus added in v0.5.0

type AuditStatus string

AuditStatus represents the status of audit events

const (
	AuditStatusSuccess AuditStatus = "SUCCESS"
	AuditStatusFailure AuditStatus = "FAILURE"
)

type ResourceType added in v0.5.0

type ResourceType string

ResourceType represents different resource types for auditing

const (
	ResourceTypeMembers                ResourceType = "MEMBERS"
	ResourceTypeSchemas                ResourceType = "SCHEMAS"
	ResourceTypeSchemaSubmissions      ResourceType = "SCHEMA-SUBMISSIONS"
	ResourceTypeApplications           ResourceType = "APPLICATIONS"
	ResourceTypeApplicationSubmissions ResourceType = "APPLICATION-SUBMISSIONS"
)

type TargetType added in v0.5.0

type TargetType string

TargetType represents different target types for auditing

const (
	TargetTypeService  TargetType = "SERVICE"
	TargetTypeResource TargetType = "RESOURCE"
)

Jump to

Keyboard shortcuts

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