model

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APIKey apiKeyV2
View Source
var ActionV2 actionV2
View Source
var ActorV2 actorV2
View Source
var AlertActorV2 alertActorV2
View Source
var AlertAttributeEntryV2 alertAttributeEntryV2
View Source
var AlertAttributeV2 alertAttributeV2
View Source
var AlertAttributeValueV2 alertAttributeValueV2
View Source
var AlertSlimV2 alertSlimV2
View Source
var AlertSourceV2 alertSourceV2
View Source
var AlertV2 alertV2
View Source
var ChatChannelSlimV2 chatChannelSlimV2
View Source
var CustomFieldEntryV1 customFieldEntryV1
View Source
var CustomFieldEntryV2 customFieldEntryV2
View Source
var CustomFieldOptionV1 customFieldOptionV1
View Source
var CustomFieldOptionV2 customFieldOptionV2
View Source
var CustomFieldTypeInfoV1 customFieldTypeInfoV1
View Source
var CustomFieldTypeInfoV2 customFieldTypeInfoV2
View Source
var CustomFieldV2 customFieldV2
View Source
var CustomFieldValueV1 customFieldValueV1
View Source
var CustomFieldValueV2 customFieldValueV2
View Source
var DateTime dateTime
View Source
var EmbeddedCatalogEntryV1 embeddedCatalogEntryV1
View Source
var EmbeddedCatalogEntryV2 embeddedCatalogEntryV2
View Source
var EmbeddedIncidentRoleV2 embeddedIncidentRoleV2
View Source
var EscalationCreatorV2 escalationCreatorV2
View Source
var EscalationEventV2 escalationEventV2
View Source
var EscalationPriorityV2 escalationPriorityV2
View Source
var EscalationV2 escalationV2
View Source
var ExternalIssueReferenceV2 externalIssueReferenceV2
View Source
var ExternalResourceV1 externalResourceV1
View Source
var FollowUpPriorityV2 followUpPriorityV2
View Source
var FollowUpV2 followUpV2
View Source
var IncidentAttachmentV1 incidentAttachmentV1
View Source
var IncidentRoleAssignmentV1 incidentRoleAssignmentV1
View Source
var IncidentRoleAssignmentV2 incidentRoleAssignmentV2
View Source
var IncidentRoleV1 incidentRoleV1
View Source
var IncidentRoleV2 incidentRoleV2
View Source
var IncidentSlimV2 incidentSlimV2
View Source
var IncidentStatusV1 incidentStatusV1
View Source
var IncidentStatusV2 incidentStatusV2
View Source
var IncidentTimestampV2 incidentTimestampV2
View Source
var IncidentTimestampValueV2 incidentTimestampValueV2
View Source
var IncidentTimestampWithValueV2 incidentTimestampWithValueV2
View Source
var IncidentTypeV1 incidentTypeV1
View Source
var IncidentTypeV2 incidentTypeV2
View Source
var IncidentUpdateV2 incidentUpdateV2
View Source
var IncidentV2 incidentV2
View Source
var SeverityV1 severityV1
View Source
var SeverityV2 severityV2
View Source
var UserV1 userV1
View Source
var UserV2 userV2
View Source
var UserWithRolesV2 userWithRolesV2
View Source
var WorkflowActorV2 workflowActorV2

Functions

func DumpToMap

func DumpToMap(input interface{}) map[string]any

As a shortcut for simple leaf nodes we can just dump everything (we can also dump everything higher level probably too) If we're just going to dump everything why bother with serialisers? Good question. a) Initial thoughts were that we want some control on the fields we output potentially - for example ignoring deprecated fields. b) We also might need to be cleverer when it comes to catalog config that enables / disables optional fields in the output.

Keeping this as a single callsite so it's easy to find where we're doing this in future.

Types

type ArrayItem

type ArrayItem struct {
	Type       string              `json:"type"`
	Properties map[string]Property `json:"properties,omitempty"`
}

ArrayItem is the type and properties of an item in an array.

type Property

type Property struct {
	// Types is a list of types that this property can be, e.g. "string" or "integer".
	Types []string `json:"type"`
	// CustomFormat	is a custom format for this property, e.g. "date-time".
	CustomFormat string `json:"format,omitempty"`
	// For nested structures a property can have its own properties.
	Properties map[string]Property `json:"properties,omitempty"`
	// For array structures we define the type of the items in the array
	Items *ArrayItem `json:"items,omitempty"`
}

Property is a property in a JSON schema.

func ArrayOf

func ArrayOf(p Property) Property

func Optional

func Optional(p Property) Property

func (Property) IsBoolean

func (s Property) IsBoolean() bool

func (Property) IsDateTime

func (s Property) IsDateTime() bool

func (Property) IsInteger

func (s Property) IsInteger() bool

func (Property) IsNumber

func (s Property) IsNumber() bool

type Schema

type Schema struct {
	// Type is the type of the schema, e.g. "object" - for some reason singer docs
	// have this as an array and often nullable eg: `"type": ["null", "object"]`
	Type []string `json:"type"`
	// HasAdditionalProperties indicates whether the schema allows additional properties
	// not defined in the schema.
	HasAdditionalProperties bool `json:"additionalProperties"`
	// Properties is a map of property names to their schema.
	Properties map[string]Property `json:"properties"`
}

Schema is a JSON schema for a stream.

Jump to

Keyboard shortcuts

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