audit

package
Version: v0.0.0-...-0600186 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUDIT_RECORD_ACCEPT = "application/vnd.com.nsn.cumulocity.auditrecord+json"
	AUDIT_CONTENT_TYPE  = "application/vnd.com.nsn.cumulocity.auditrecord+json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditApi

type AuditApi interface {
	GetAuditRecord(auditID string) (*AuditRecord, *generic.Error)
	GetAuditRecords(auditQuery *AuditQuery, pageSize int) (*AuditRecordCollection, *generic.Error)
	CreateAuditRecord(record *AuditRecord) (*AuditRecord, *generic.Error)
	NextPage(c *AuditRecordCollection) (*AuditRecordCollection, *generic.Error)
	PreviousPage(c *AuditRecordCollection) (*AuditRecordCollection, *generic.Error)
}

func NewAuditApi

func NewAuditApi(client *generic.Client) AuditApi

type AuditQuery

type AuditQuery struct {
	Revert bool // In case of executing range queries on audit logs API, like query by dateFrom and dateTo,

	Type        string
	Application string
	User        string
}

func (AuditQuery) QueryParams

func (a AuditQuery) QueryParams(params *url.Values) error

type AuditRecord

type AuditRecord struct {
	Severity     string    `json:"severity"`
	Activity     string    `json:"activity"`
	CreationTime time.Time `json:"creationTime"`
	Source       struct {
		Self string `json:"self"`
		ID   string `json:"id"`
	} `json:"source"`
	Type              string    `json:"type"`
	Self              string    `json:"self"`
	Time              time.Time `json:"time"`
	Text              string    `json:"text"`
	ID                string    `json:"id"`
	User              string    `json:"user"`
	Application       string    `json:"application"`
	Changes           []Changes `json:"changes"`
	AuditSourceDevice struct {
		ID string `json:"id"`
	} `json:"com_cumulocity_model_event_AuditSourceDevice"`
}

type AuditRecordCollection

type AuditRecordCollection struct {
	Self         string                    `json:"self"`
	Next         string                    `json:"next"`
	Prev         string                    `json:"prev"`
	AuditRecords []AuditRecord             `json:"auditRecords"`
	Statistics   *generic.PagingStatistics `json:"statistics"`
}

type Changes

type Changes struct {
	NewValue      string `json:"newValue"`
	Attribute     string `json:"attribute"`
	Type          string `json:"type"`
	PreviousValue string `json:"previousValue"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL