Documentation
¶
Overview ¶
Package telemetryv1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.2 DO NOT EDIT.
Index ¶
- Constants
- Variables
- func ValidateBatch(data []byte) error
- func ValidateClient(data []byte) error
- func ValidateCollectedEvent(data []byte) error
- func ValidateEvent(data []byte) error
- type Batch
- type BatchSchemaVersion
- type Client
- type ClientArch
- type ClientOs
- type CollectedEvent
- type CommandEvent
- type CommandEventEventVersion
- type CommandEventName
- type CommandOutcome
- type CommandOutcomeAction
- type CommandOutcomeCommand
- type CommandOutcomeFailureStage
- type DemoEvent
- type DemoEventEventVersion
- type DemoEventName
- type Duration
- type Event
- func (t Event) AsCommandEvent() (CommandEvent, error)
- func (t Event) AsDemoEvent() (DemoEvent, error)
- func (t Event) AsIntegrationEvent() (IntegrationEvent, error)
- func (t Event) AsReadyEvent() (ReadyEvent, error)
- func (t Event) AsTransportEvent() (TransportEvent, error)
- func (t Event) Discriminator() (string, error)
- func (t *Event) FromCommandEvent(v CommandEvent) error
- func (t *Event) FromDemoEvent(v DemoEvent) error
- func (t *Event) FromIntegrationEvent(v IntegrationEvent) error
- func (t *Event) FromReadyEvent(v ReadyEvent) error
- func (t *Event) FromTransportEvent(v TransportEvent) error
- func (t Event) MarshalJSON() ([]byte, error)
- func (t *Event) MergeCommandEvent(v CommandEvent) error
- func (t *Event) MergeDemoEvent(v DemoEvent) error
- func (t *Event) MergeIntegrationEvent(v IntegrationEvent) error
- func (t *Event) MergeReadyEvent(v ReadyEvent) error
- func (t *Event) MergeTransportEvent(v TransportEvent) error
- func (t *Event) UnmarshalJSON(b []byte) error
- func (t Event) ValueByDiscriminator() (interface{}, error)
- type EventID
- type IntegrationEvent
- type IntegrationEventEventVersion
- type IntegrationEventName
- type IntegrationOutcome
- type IntegrationOutcomeDelivery
- type IntegrationOutcomeKind
- type IntegrationOutcomeOutcome
- type Measurement
- type Operation
- type Outcome
- type Path
- type PublicationReady
- type PublicationReadyFramework
- type PublicationReadyPublishMode
- type PublicationReadyServerKind
- type ReadyEvent
- type ReadyEventEventVersion
- type ReadyEventName
- type RecordTelemetryBatchJSONRequestBody
- type TransportEvent
- type TransportEventEventVersion
- type TransportEventName
- type TransportReport
- type TransportReportRole
Constants ¶
const MaximumBatchBytes = 64 << 10
const MaximumEventBytes = 16 << 10
Variables ¶
var ErrInvalid = errors.New("telemetry does not match the v1 contract")
Functions ¶
func ValidateBatch ¶
func ValidateClient ¶
func ValidateCollectedEvent ¶
func ValidateEvent ¶
Types ¶
type Batch ¶
type Batch struct {
Events []CollectedEvent `json:"events"`
InstallationId string `json:"installation_id"`
SchemaVersion BatchSchemaVersion `json:"schema_version"`
}
Batch defines model for Batch.
type BatchSchemaVersion ¶
type BatchSchemaVersion int
BatchSchemaVersion defines model for Batch.SchemaVersion.
const (
BatchSchemaVersionN1 BatchSchemaVersion = 1
)
Defines values for BatchSchemaVersion.
func (BatchSchemaVersion) Valid ¶
func (e BatchSchemaVersion) Valid() bool
Valid indicates whether the value is a known member of the BatchSchemaVersion enum.
type Client ¶
type Client struct {
Arch ClientArch `json:"arch"`
Ci bool `json:"ci"`
Os ClientOs `json:"os"`
Version string `json:"version"`
}
Client defines model for Client.
type ClientArch ¶
type ClientArch string
ClientArch defines model for Client.Arch.
const ( ClientArchAmd64 ClientArch = "amd64" ClientArchArm64 ClientArch = "arm64" ClientArchOther ClientArch = "other" )
Defines values for ClientArch.
func (ClientArch) Valid ¶
func (e ClientArch) Valid() bool
Valid indicates whether the value is a known member of the ClientArch enum.
type ClientOs ¶
type ClientOs string
ClientOs defines model for Client.Os.
type CollectedEvent ¶
CollectedEvent defines model for CollectedEvent.
type CommandEvent ¶
type CommandEvent struct {
EventId EventID `json:"event_id"`
EventVersion CommandEventEventVersion `json:"event_version"`
Name CommandEventName `json:"name"`
Payload CommandOutcome `json:"payload"`
}
CommandEvent defines model for CommandEvent.
type CommandEventEventVersion ¶
type CommandEventEventVersion int
CommandEventEventVersion defines model for CommandEvent.EventVersion.
const (
CommandEventEventVersionN1 CommandEventEventVersion = 1
)
Defines values for CommandEventEventVersion.
func (CommandEventEventVersion) Valid ¶
func (e CommandEventEventVersion) Valid() bool
Valid indicates whether the value is a known member of the CommandEventEventVersion enum.
type CommandEventName ¶
type CommandEventName string
CommandEventName defines model for CommandEvent.Name.
const (
CommandEventNameCommandOutcome CommandEventName = "command.outcome"
)
Defines values for CommandEventName.
func (CommandEventName) Valid ¶
func (e CommandEventName) Valid() bool
Valid indicates whether the value is a known member of the CommandEventName enum.
type CommandOutcome ¶
type CommandOutcome struct {
Action *CommandOutcomeAction `json:"action,omitempty"`
Command CommandOutcomeCommand `json:"command"`
DiagnosticCode *string `json:"diagnostic_code,omitempty"`
FailureStage *CommandOutcomeFailureStage `json:"failure_stage,omitempty"`
Outcome Outcome `json:"outcome"`
}
CommandOutcome defines model for CommandOutcome.
type CommandOutcomeAction ¶
type CommandOutcomeAction string
CommandOutcomeAction defines model for CommandOutcome.Action.
const ( CommandOutcomeActionAccept CommandOutcomeAction = "accept" CommandOutcomeActionAdd CommandOutcomeAction = "add" CommandOutcomeActionAllow CommandOutcomeAction = "allow" CommandOutcomeActionBlock CommandOutcomeAction = "block" CommandOutcomeActionCheck CommandOutcomeAction = "check" CommandOutcomeActionCreate CommandOutcomeAction = "create" CommandOutcomeActionCurrent CommandOutcomeAction = "current" CommandOutcomeActionDelete CommandOutcomeAction = "delete" CommandOutcomeActionDrain CommandOutcomeAction = "drain" CommandOutcomeActionGenerate CommandOutcomeAction = "generate" CommandOutcomeActionGet CommandOutcomeAction = "get" CommandOutcomeActionInspect CommandOutcomeAction = "inspect" CommandOutcomeActionInstall CommandOutcomeAction = "install" CommandOutcomeActionJoin CommandOutcomeAction = "join" CommandOutcomeActionLeave CommandOutcomeAction = "leave" CommandOutcomeActionList CommandOutcomeAction = "list" CommandOutcomeActionMembers CommandOutcomeAction = "members" CommandOutcomeActionOther CommandOutcomeAction = "other" CommandOutcomeActionPath CommandOutcomeAction = "path" CommandOutcomeActionRelease CommandOutcomeAction = "release" CommandOutcomeActionRemove CommandOutcomeAction = "remove" CommandOutcomeActionReopen CommandOutcomeAction = "reopen" CommandOutcomeActionReply CommandOutcomeAction = "reply" CommandOutcomeActionResolve CommandOutcomeAction = "resolve" CommandOutcomeActionRevoke CommandOutcomeAction = "revoke" CommandOutcomeActionSet CommandOutcomeAction = "set" CommandOutcomeActionSetRole CommandOutcomeAction = "set-role" CommandOutcomeActionShow CommandOutcomeAction = "show" CommandOutcomeActionStart CommandOutcomeAction = "start" CommandOutcomeActionStatus CommandOutcomeAction = "status" CommandOutcomeActionStop CommandOutcomeAction = "stop" CommandOutcomeActionUninstall CommandOutcomeAction = "uninstall" CommandOutcomeActionUpdate CommandOutcomeAction = "update" CommandOutcomeActionUse CommandOutcomeAction = "use" CommandOutcomeActionWatch CommandOutcomeAction = "watch" )
Defines values for CommandOutcomeAction.
func (CommandOutcomeAction) Valid ¶
func (e CommandOutcomeAction) Valid() bool
Valid indicates whether the value is a known member of the CommandOutcomeAction enum.
type CommandOutcomeCommand ¶
type CommandOutcomeCommand string
CommandOutcomeCommand defines model for CommandOutcome.Command.
const ( CommandOutcomeCommandAdmin CommandOutcomeCommand = "admin" CommandOutcomeCommandAlias CommandOutcomeCommand = "alias" CommandOutcomeCommandApply CommandOutcomeCommand = "apply" CommandOutcomeCommandConfig CommandOutcomeCommand = "config" CommandOutcomeCommandConnect CommandOutcomeCommand = "connect" CommandOutcomeCommandDomain CommandOutcomeCommand = "domain" CommandOutcomeCommandFeedback CommandOutcomeCommand = "feedback" CommandOutcomeCommandInit CommandOutcomeCommand = "init" CommandOutcomeCommandInspect CommandOutcomeCommand = "inspect" CommandOutcomeCommandLogin CommandOutcomeCommand = "login" CommandOutcomeCommandLogout CommandOutcomeCommand = "logout" CommandOutcomeCommandOther CommandOutcomeCommand = "other" CommandOutcomeCommandPublish CommandOutcomeCommand = "publish" CommandOutcomeCommandPublisher CommandOutcomeCommand = "publisher" CommandOutcomeCommandStatus CommandOutcomeCommand = "status" CommandOutcomeCommandTeam CommandOutcomeCommand = "team" CommandOutcomeCommandUrl CommandOutcomeCommand = "url" CommandOutcomeCommandWait CommandOutcomeCommand = "wait" CommandOutcomeCommandWatch CommandOutcomeCommand = "watch" CommandOutcomeCommandWebhook CommandOutcomeCommand = "webhook" )
Defines values for CommandOutcomeCommand.
func (CommandOutcomeCommand) Valid ¶
func (e CommandOutcomeCommand) Valid() bool
Valid indicates whether the value is a known member of the CommandOutcomeCommand enum.
type CommandOutcomeFailureStage ¶
type CommandOutcomeFailureStage string
CommandOutcomeFailureStage defines model for CommandOutcome.FailureStage.
const ( Authentication CommandOutcomeFailureStage = "authentication" Command CommandOutcomeFailureStage = "command" LocalService CommandOutcomeFailureStage = "local_service" PublicUrl CommandOutcomeFailureStage = "public_url" Setup CommandOutcomeFailureStage = "setup" )
Defines values for CommandOutcomeFailureStage.
func (CommandOutcomeFailureStage) Valid ¶
func (e CommandOutcomeFailureStage) Valid() bool
Valid indicates whether the value is a known member of the CommandOutcomeFailureStage enum.
type DemoEvent ¶
type DemoEvent struct {
EventId EventID `json:"event_id"`
EventVersion DemoEventEventVersion `json:"event_version"`
Name DemoEventName `json:"name"`
Payload map[string]interface{} `json:"payload"`
}
DemoEvent defines model for DemoEvent.
type DemoEventEventVersion ¶
type DemoEventEventVersion int
DemoEventEventVersion defines model for DemoEvent.EventVersion.
const (
DemoEventEventVersionN1 DemoEventEventVersion = 1
)
Defines values for DemoEventEventVersion.
func (DemoEventEventVersion) Valid ¶
func (e DemoEventEventVersion) Valid() bool
Valid indicates whether the value is a known member of the DemoEventEventVersion enum.
type DemoEventName ¶
type DemoEventName string
DemoEventName defines model for DemoEvent.Name.
const (
DemoFirstPing DemoEventName = "demo.first_ping"
)
Defines values for DemoEventName.
func (DemoEventName) Valid ¶
func (e DemoEventName) Valid() bool
Valid indicates whether the value is a known member of the DemoEventName enum.
type Duration ¶
type Duration string
Duration defines model for Duration.
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event defines model for Event.
func (Event) AsCommandEvent ¶
func (t Event) AsCommandEvent() (CommandEvent, error)
AsCommandEvent returns the union data inside the Event as a CommandEvent
func (Event) AsDemoEvent ¶
AsDemoEvent returns the union data inside the Event as a DemoEvent
func (Event) AsIntegrationEvent ¶
func (t Event) AsIntegrationEvent() (IntegrationEvent, error)
AsIntegrationEvent returns the union data inside the Event as a IntegrationEvent
func (Event) AsReadyEvent ¶
func (t Event) AsReadyEvent() (ReadyEvent, error)
AsReadyEvent returns the union data inside the Event as a ReadyEvent
func (Event) AsTransportEvent ¶
func (t Event) AsTransportEvent() (TransportEvent, error)
AsTransportEvent returns the union data inside the Event as a TransportEvent
func (Event) Discriminator ¶
func (*Event) FromCommandEvent ¶
func (t *Event) FromCommandEvent(v CommandEvent) error
FromCommandEvent overwrites any union data inside the Event as the provided CommandEvent
func (*Event) FromDemoEvent ¶
FromDemoEvent overwrites any union data inside the Event as the provided DemoEvent
func (*Event) FromIntegrationEvent ¶
func (t *Event) FromIntegrationEvent(v IntegrationEvent) error
FromIntegrationEvent overwrites any union data inside the Event as the provided IntegrationEvent
func (*Event) FromReadyEvent ¶
func (t *Event) FromReadyEvent(v ReadyEvent) error
FromReadyEvent overwrites any union data inside the Event as the provided ReadyEvent
func (*Event) FromTransportEvent ¶
func (t *Event) FromTransportEvent(v TransportEvent) error
FromTransportEvent overwrites any union data inside the Event as the provided TransportEvent
func (Event) MarshalJSON ¶
func (*Event) MergeCommandEvent ¶
func (t *Event) MergeCommandEvent(v CommandEvent) error
MergeCommandEvent performs a merge with any union data inside the Event, using the provided CommandEvent
func (*Event) MergeDemoEvent ¶
MergeDemoEvent performs a merge with any union data inside the Event, using the provided DemoEvent
func (*Event) MergeIntegrationEvent ¶
func (t *Event) MergeIntegrationEvent(v IntegrationEvent) error
MergeIntegrationEvent performs a merge with any union data inside the Event, using the provided IntegrationEvent
func (*Event) MergeReadyEvent ¶
func (t *Event) MergeReadyEvent(v ReadyEvent) error
MergeReadyEvent performs a merge with any union data inside the Event, using the provided ReadyEvent
func (*Event) MergeTransportEvent ¶
func (t *Event) MergeTransportEvent(v TransportEvent) error
MergeTransportEvent performs a merge with any union data inside the Event, using the provided TransportEvent
func (*Event) UnmarshalJSON ¶
func (Event) ValueByDiscriminator ¶
type IntegrationEvent ¶
type IntegrationEvent struct {
EventId EventID `json:"event_id"`
EventVersion IntegrationEventEventVersion `json:"event_version"`
Name IntegrationEventName `json:"name"`
Payload IntegrationOutcome `json:"payload"`
}
IntegrationEvent defines model for IntegrationEvent.
type IntegrationEventEventVersion ¶
type IntegrationEventEventVersion int
IntegrationEventEventVersion defines model for IntegrationEvent.EventVersion.
const (
IntegrationEventEventVersionN1 IntegrationEventEventVersion = 1
)
Defines values for IntegrationEventEventVersion.
func (IntegrationEventEventVersion) Valid ¶
func (e IntegrationEventEventVersion) Valid() bool
Valid indicates whether the value is a known member of the IntegrationEventEventVersion enum.
type IntegrationEventName ¶
type IntegrationEventName string
IntegrationEventName defines model for IntegrationEvent.Name.
const (
IntegrationEventNameIntegrationOutcome IntegrationEventName = "integration.outcome"
)
Defines values for IntegrationEventName.
func (IntegrationEventName) Valid ¶
func (e IntegrationEventName) Valid() bool
Valid indicates whether the value is a known member of the IntegrationEventName enum.
type IntegrationOutcome ¶
type IntegrationOutcome struct {
Delivery *IntegrationOutcomeDelivery `json:"delivery,omitempty"`
Kind IntegrationOutcomeKind `json:"kind"`
Outcome IntegrationOutcomeOutcome `json:"outcome"`
}
IntegrationOutcome defines model for IntegrationOutcome.
type IntegrationOutcomeDelivery ¶
type IntegrationOutcomeDelivery string
IntegrationOutcomeDelivery defines model for IntegrationOutcome.Delivery.
const ( Fanout IntegrationOutcomeDelivery = "fanout" Selected IntegrationOutcomeDelivery = "selected" )
Defines values for IntegrationOutcomeDelivery.
func (IntegrationOutcomeDelivery) Valid ¶
func (e IntegrationOutcomeDelivery) Valid() bool
Valid indicates whether the value is a known member of the IntegrationOutcomeDelivery enum.
type IntegrationOutcomeKind ¶
type IntegrationOutcomeKind string
IntegrationOutcomeKind defines model for IntegrationOutcome.Kind.
const ( IntegrationOutcomeKindOauth IntegrationOutcomeKind = "oauth" IntegrationOutcomeKindWebhook IntegrationOutcomeKind = "webhook" )
Defines values for IntegrationOutcomeKind.
func (IntegrationOutcomeKind) Valid ¶
func (e IntegrationOutcomeKind) Valid() bool
Valid indicates whether the value is a known member of the IntegrationOutcomeKind enum.
type IntegrationOutcomeOutcome ¶
type IntegrationOutcomeOutcome string
IntegrationOutcomeOutcome defines model for IntegrationOutcome.Outcome.
const ( ReachedReceiver IntegrationOutcomeOutcome = "reached_receiver" Ready IntegrationOutcomeOutcome = "ready" Redirected IntegrationOutcomeOutcome = "redirected" )
Defines values for IntegrationOutcomeOutcome.
func (IntegrationOutcomeOutcome) Valid ¶
func (e IntegrationOutcomeOutcome) Valid() bool
Valid indicates whether the value is a known member of the IntegrationOutcomeOutcome enum.
type Measurement ¶
type Measurement struct {
Count int64 `json:"count"`
// Duration Measured setup or recovery duration. Omitted for fallback counts.
Duration Duration `json:"duration,omitempty"`
Operation Operation `json:"operation"`
Outcome Outcome `json:"outcome"`
Path Path `json:"path"`
}
Measurement defines model for Measurement.
type Operation ¶
type Operation string
Operation defines model for Operation.
type PublicationReady ¶
type PublicationReady struct {
Framework *PublicationReadyFramework `json:"framework,omitempty"`
PublishMode PublicationReadyPublishMode `json:"publish_mode"`
ServerKind PublicationReadyServerKind `json:"server_kind"`
}
PublicationReady defines model for PublicationReady.
type PublicationReadyFramework ¶
type PublicationReadyFramework string
PublicationReadyFramework defines model for PublicationReady.Framework.
const ( PublicationReadyFrameworkNext PublicationReadyFramework = "next" PublicationReadyFrameworkOther PublicationReadyFramework = "other" PublicationReadyFrameworkVite PublicationReadyFramework = "vite" )
Defines values for PublicationReadyFramework.
func (PublicationReadyFramework) Valid ¶
func (e PublicationReadyFramework) Valid() bool
Valid indicates whether the value is a known member of the PublicationReadyFramework enum.
type PublicationReadyPublishMode ¶
type PublicationReadyPublishMode string
PublicationReadyPublishMode defines model for PublicationReady.PublishMode.
const ( App PublicationReadyPublishMode = "app" Demo PublicationReadyPublishMode = "demo" )
Defines values for PublicationReadyPublishMode.
func (PublicationReadyPublishMode) Valid ¶
func (e PublicationReadyPublishMode) Valid() bool
Valid indicates whether the value is a known member of the PublicationReadyPublishMode enum.
type PublicationReadyServerKind ¶
type PublicationReadyServerKind string
PublicationReadyServerKind defines model for PublicationReady.ServerKind.
const ( Hosted PublicationReadyServerKind = "hosted" SelfHosted PublicationReadyServerKind = "self_hosted" )
Defines values for PublicationReadyServerKind.
func (PublicationReadyServerKind) Valid ¶
func (e PublicationReadyServerKind) Valid() bool
Valid indicates whether the value is a known member of the PublicationReadyServerKind enum.
type ReadyEvent ¶
type ReadyEvent struct {
EventId EventID `json:"event_id"`
EventVersion ReadyEventEventVersion `json:"event_version"`
Name ReadyEventName `json:"name"`
Payload PublicationReady `json:"payload"`
}
ReadyEvent defines model for ReadyEvent.
type ReadyEventEventVersion ¶
type ReadyEventEventVersion int
ReadyEventEventVersion defines model for ReadyEvent.EventVersion.
const (
ReadyEventEventVersionN1 ReadyEventEventVersion = 1
)
Defines values for ReadyEventEventVersion.
func (ReadyEventEventVersion) Valid ¶
func (e ReadyEventEventVersion) Valid() bool
Valid indicates whether the value is a known member of the ReadyEventEventVersion enum.
type ReadyEventName ¶
type ReadyEventName string
ReadyEventName defines model for ReadyEvent.Name.
const (
TunnelReady ReadyEventName = "tunnel.ready"
)
Defines values for ReadyEventName.
func (ReadyEventName) Valid ¶
func (e ReadyEventName) Valid() bool
Valid indicates whether the value is a known member of the ReadyEventName enum.
type RecordTelemetryBatchJSONRequestBody ¶
type RecordTelemetryBatchJSONRequestBody = Batch
RecordTelemetryBatchJSONRequestBody defines body for RecordTelemetryBatch for application/json ContentType.
type TransportEvent ¶
type TransportEvent struct {
EventId EventID `json:"event_id"`
EventVersion TransportEventEventVersion `json:"event_version"`
Name TransportEventName `json:"name"`
Payload TransportReport `json:"payload"`
}
TransportEvent defines model for TransportEvent.
type TransportEventEventVersion ¶
type TransportEventEventVersion int
TransportEventEventVersion defines model for TransportEvent.EventVersion.
const (
TransportEventEventVersionN1 TransportEventEventVersion = 1
)
Defines values for TransportEventEventVersion.
func (TransportEventEventVersion) Valid ¶
func (e TransportEventEventVersion) Valid() bool
Valid indicates whether the value is a known member of the TransportEventEventVersion enum.
type TransportEventName ¶
type TransportEventName string
TransportEventName defines model for TransportEvent.Name.
const (
TransportEventNameTransportReport TransportEventName = "transport.report"
)
Defines values for TransportEventName.
func (TransportEventName) Valid ¶
func (e TransportEventName) Valid() bool
Valid indicates whether the value is a known member of the TransportEventName enum.
type TransportReport ¶
type TransportReport struct {
Measurements []Measurement `json:"measurements"`
Role TransportReportRole `json:"role"`
}
TransportReport defines model for TransportReport.
type TransportReportRole ¶
type TransportReportRole string
TransportReportRole defines model for TransportReport.Role.
const ( TransportReportRoleConnector TransportReportRole = "connector" TransportReportRolePublisher TransportReportRole = "publisher" )
Defines values for TransportReportRole.
func (TransportReportRole) Valid ¶
func (e TransportReportRole) Valid() bool
Valid indicates whether the value is a known member of the TransportReportRole enum.