audit_logs

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActorExternalSystem

func ActorExternalSystem(name string) string

func ActorOrgAdmin

func ActorOrgAdmin(id any) string

func ActorSysAdmin

func ActorSysAdmin(email string) string

func ActorSystem

func ActorSystem() string

func ActorUser

func ActorUser(id any) string

ActorUser returns the actor string for a user with the given ID.

func New

func New(ctx context.Context, q *db.Queries, orgID *uuid.UUID, actor string, action LogAction, entity LogEntity, entityID *uuid.UUID, ip *netip.Addr, userAgent *string, details map[string]any) error

Types

type LogAction

type LogAction string
const (
	LogActionCreate         LogAction = "CREATE"
	LogActionUpdate         LogAction = "UPDATE"
	LogActionDelete         LogAction = "DELETE"
	LogActionLogin          LogAction = "LOGIN"
	LogActionLogout         LogAction = "LOGOUT"
	LogActionPasswordChange LogAction = "PASSWORD_CHANGE"
	LogActionInviteAccepted LogAction = "INVITE_ACCEPTED"
	LogActionInviteDeclined LogAction = "INVITE_DECLINED"
	LogActionBan            LogAction = "BAN"
	LogActionUnban          LogAction = "UNBAN"
	LogActionVerify         LogAction = "VERIFY"
	LogActionRevoke         LogAction = "REVOKE"
)

type LogEntity

type LogEntity string
const (
	LogEntityUser          LogEntity = "USER"
	LogEntityOrg           LogEntity = "ORG"
	LogEntityOrgDomain     LogEntity = "ORG_DOMAIN"
	LogEntityRole          LogEntity = "ROLE"
	LogEntityOrgMembership LogEntity = "ORG_MEMBERSHIP"
	LogEntitySession       LogEntity = "SESSION"
	LogEntityInvitation    LogEntity = "INVITATION"
	LogEntityMFAFactor     LogEntity = "MFA_FACTOR"
)

Jump to

Keyboard shortcuts

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