audit

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audit

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

Structure for creating request to audit

func New

func New(client interfaces.Caller) *Audit

Builder for audit endpoint

func (Audit) ExportAuditsToFile added in v1.9.0

func (a Audit) ExportAuditsToFile(ctx context.Context) ([]byte, error)

ExportAuditsToFile Get audits in csv file, return []byte which should be written to a file *tar.gz

func (Audit) Get

func (a Audit) Get(ctx context.Context, req GetRequest) (*RecordAudit, error)

Get gets information about audit as a RecordAudit struct

func (Audit) GetRaw

func (a Audit) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)

GetRaw gets information about audit as an array of bytes

func (Audit) GetRawLinkedJobs

func (a Audit) GetRawLinkedJobs(ctx context.Context, req LinkedJobsRequest) ([]byte, error)

GetRawLinkedJobs gets information about Linked Jobs as an array of bytes

func (Audit) LinkedJobs

func (a Audit) LinkedJobs(ctx context.Context, req LinkedJobsRequest) (*ListLinkedJobs, error)

LinkedJobs gets information about Linked Jobs as a ListLinkedJobs struct

func (Audit) List

func (a Audit) List(ctx context.Context, req ListRequest) (*ListAudits, error)

List gets audit records for the specified account object

func (Audit) ListRaw

func (a Audit) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)

ListRaw gets list of audit records an array of bytes

type GetRequest

type GetRequest struct {
	// Audit GUID
	// Required: true
	AuditGuid string `url:"auditGuid" json:"auditGuid" validate:"required"`
}

GetRequest struct to get information about account

type ItemAudit

type ItemAudit struct {
	// Call
	Call string `json:"call"`

	// GUID
	GUID string `json:"guid"`

	// Response time
	ResponseTime float64 `json:"responsetime"`

	// Status code
	StatusCode uint64 `json:"statuscode"`

	// Timestamp
	Timestamp float64 `json:"timestamp"`

	// User
	User string `json:"user"`
}

Main info about audit

type ItemLinkedJobs

type ItemLinkedJobs struct {

	// CMD
	CMD string `json:"cmd"`

	// GUID
	GUID string `json:"guid"`

	// NID
	NID uint64 `json:"nid"`

	// state
	State string `json:"state"`

	// TimeCreate
	TimeCreate uint64 `json:"timeCreate"`

	// TimeStart
	TimeStart uint64 `json:"timeStart"`

	// TimeStop
	TimeStop uint64 `json:"timeStop"`

	// Timeout
	Timeout uint64 `json:"timeout"`
}

Main info about Linked Jobs

type LinkedJobsRequest

type LinkedJobsRequest struct {
	// Audit GUID
	// Required: true
	AuditGuid string `url:"auditGuid" json:"auditGuid" validate:"required"`
}

LinkedJobsRequest struct to get information about jobs linked with Audit

type ListAudits

type ListAudits struct {
	// Data
	Data []ItemAudit `json:"data"`

	// EntryCount
	EntryCount uint64 `json:"entryCount"`
}

List of audits

type ListLinkedJobs

type ListLinkedJobs []ItemLinkedJobs

List of Linked Jobs

type ListRequest

type ListRequest struct {

	// Find all audits after point in time (unixtime)
	// Required: false
	TimestampAt uint64 `url:"timestampAt,omitempty" json:"timestampAt,omitempty"`

	// Find all audits before point in time (unixtime)
	// Required: false
	TimestampTo uint64 `url:"timestampTo,omitempty" json:"timestampTo,omitempty"`

	// Find by user (Mongo RegExp supported)
	// Required: false
	User string `url:"user,omitempty" json:"user,omitempty"`

	// Find by api endpoint (Mongo RegExp supported)
	// Required: false
	Call string `url:"call,omitempty" json:"call,omitempty"`

	// Find by HTTP min status code
	// Required: false
	MinStatusCode uint64 `url:"minStatusCode,omitempty" json:"minStatusCode,omitempty"`

	// Find by HTTP max status code
	// Required: false
	MaxStatusCode uint64 `url:"maxStatusCode,omitempty" json:"maxStatusCode,omitempty"`

	// Sort by one of supported fields, format +|-(field)
	// Required: false
	SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListRequest struct to give list of account audits

type RecordAudit

type RecordAudit struct {

	// Arguments
	Arguments string `json:"args"`

	// Call
	Call string `json:"call"`

	// GUID
	GUID string `json:"guid"`

	// Kwargs
	Kwargs string `json:"kwargs"`

	// RemoteAddr
	RemoteAddr string `json:"remote_addr"`

	// Response time
	ResponseTime float64 `json:"responsetime"`

	// Result
	Result string `json:"result"`

	// Status code
	StatusCode uint64 `json:"statuscode"`

	// Tags
	Tags string `json:"tags"`

	// Timestamp
	Timestamp float64 `json:"timestamp"`

	// TimestampEnd
	TimestampEnd float64 `json:"timestampEnd"`

	// User
	User string `json:"user"`
}

Main info about audit

Jump to

Keyboard shortcuts

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