model

package
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address added in v0.59.0

type Address struct {
	IP         *string `json:"ip,omitempty"`
	Port       *int    `json:"port,omitempty"`
	SystemUser *bool   `json:"isSystemUser,omitempty"`
	UnixSocket *string `json:"unix,omitempty"`
}

type Alert

type Alert struct {
	Created                 string  `json:"created"`
	AlertConfigID           string  `json:"alertConfigId"`
	GroupID                 string  `json:"groupId"`
	EventType               string  `json:"eventTypeName"`
	ID                      string  `json:"id"`
	HumanReadable           string  `json:"humanReadable"`
	Updated                 string  `json:"updated"`
	Status                  string  `json:"status"`
	ReplicaSetName          *string `json:"replicaSetName"`
	MetricName              *string `json:"metricName"`
	TypeName                *string `json:"typeName"`
	ClusterName             *string `json:"clusterName"`
	UserAlias               *string `json:"userAlias"`
	LastNotified            *string `json:"lastNotified"`
	Resolved                *string `json:"resolved"`
	AcknowledgementComment  *string `json:"acknowledgementComment"`
	AcknowledgementUsername *string `json:"acknowledgingUsername"`
	AcknowledgedUntil       *string `json:"acknowledgedUntil"`
	CurrentValue            *struct {
		Number float64 `json:"number"`
		Units  string  `json:"units"`
	} `json:"currentValue"`
	HostNameAndPort *string `json:"hostnameAndPort"`
}

Alert represents an alert. It uses the format defined by mongodb atlas. See: https://www.mongodb.com/docs/atlas/reference/api/alerts-get-alert/#response-elements

type AuditLog added in v0.59.0

type AuditLog struct {
	Type      string         `json:"atype"`
	Timestamp LogTimestamp   `json:"ts"`
	ID        *ID            `json:"uuid,omitempty"`
	Local     Address        `json:"local"`
	Remote    Address        `json:"remote"`
	Users     []AuditUser    `json:"users"`
	Roles     []AuditRole    `json:"roles"`
	Result    int            `json:"result"`
	Param     map[string]any `json:"param"`
	// Raw is the original log line. It is not a part of the payload, but transient data added during decoding.
	Raw string `json:"-"`
}

AuditLog represents a MongoDB Atlas JSON audit log entry

type AuditRole added in v0.61.0

type AuditRole struct {
	Role     string `json:"role"`
	Database string `json:"db"`
}

func (AuditRole) Pdata added in v0.61.0

func (ar AuditRole) Pdata() pcommon.Map

type AuditUser added in v0.61.0

type AuditUser struct {
	User     string `json:"user"`
	Database string `json:"db"`
}

func (AuditUser) Pdata added in v0.61.0

func (ar AuditUser) Pdata() pcommon.Map

type ID added in v0.59.0

type ID struct {
	Binary string `json:"$binary"`
	Type   string `json:"$type"`
}

type LogEntry added in v0.59.0

type LogEntry struct {
	Timestamp  LogTimestamp   `json:"t"`
	Severity   string         `json:"s"`
	Component  string         `json:"c"`
	ID         int64          `json:"id"`
	Context    string         `json:"ctx"`
	Message    string         `json:"msg"`
	Attributes map[string]any `json:"attr"`
	// Raw is the original log line. It is not a part of the payload, but transient data added during decoding.
	Raw string `json:"-"`
}

LogEntry represents a MongoDB Atlas JSON log entry

type LogTimestamp added in v0.59.0

type LogTimestamp struct {
	Date string `json:"$date"`
}

logTimestamp is the structure that represents a Log Timestamp

Jump to

Keyboard shortcuts

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