audit

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditItem added in v0.1.10

type AuditItem struct {
	ID        string                 `json:"id"`
	Action    string                 `json:"action"`
	UserID    string                 `json:"userId"`
	GameID    string                 `json:"gameId,omitempty"`
	Env       string                 `json:"env,omitempty"`
	Target    string                 `json:"target,omitempty"`
	Result    string                 `json:"result,omitempty"`
	TraceID   string                 `json:"traceId,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
	CreatedAt string                 `json:"createdAt"`
}

AuditItem is the canonical REST response item for audit events.

type AuditListResponse added in v0.1.10

type AuditListResponse struct {
	Items    []AuditItem `json:"items"`
	Total    int         `json:"total"`
	Page     int         `json:"page"`
	PageSize int         `json:"pageSize"`
}

AuditListResponse is the canonical REST list envelope for audit events.

type AuditRequest

type AuditRequest struct {
	Page     int    `form:"page" json:"page"`
	PageSize int    `form:"pageSize" json:"pageSize"`
	Size     int    `form:"size" json:"size"`
	Action   string `form:"action" json:"action"`
	UserID   string `form:"userId" json:"userId"`
	Actor    string `form:"actor" json:"actor"`
	Kind     string `form:"kind" json:"kind"`
	Kinds    string `form:"kinds" json:"kinds"`
	GameID   string `form:"gameId" json:"gameId"`
	Env      string `form:"env" json:"env"`
	IP       string `form:"ip" json:"ip"`
	Start    string `form:"start" json:"start"`
	End      string `form:"end" json:"end"`
}

AuditRequest is the query/body contract for listing audit events.

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(service *Service) *Handler

func (*Handler) GetAuditLogs

func (h *Handler) GetAuditLogs(c *gin.Context)

GetAuditLogs retrieves audit logs with filtering and pagination Supports both GET (query params) and POST (JSON body) requests

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(svcCtx *svc.ServiceContext) *Service

func (*Service) GetAuditLogs

func (s *Service) GetAuditLogs(ctx context.Context, req *AuditRequest) (*AuditListResponse, error)

GetAuditLogs retrieves audit logs with filtering and pagination.

Jump to

Keyboard shortcuts

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