Help us shape the future of Go! Take the 2026 Go Developer Survey

activity

package
v2.15.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: BSD-3-Clause Imports: 1 Imported by: 5

Documentation

Index

Constants

View Source
const (
	TypeJobRun      Type   = "job_run"
	StatusQueued    Status = "queued"
	StatusRunning   Status = "running"
	StatusSuccess   Status = "success"
	StatusFailed    Status = "failed"
	StatusCancelled Status = "cancelled"

	TypeImagePull         Type = "image_pull"
	TypeImageBuild        Type = "image_build"
	TypeImageUpdateCheck  Type = "image_update_check"
	TypeProjectPull       Type = "project_pull"
	TypeProjectBuild      Type = "project_build"
	TypeProjectDeploy     Type = "project_deploy"
	TypeProjectRedeploy   Type = "project_redeploy"
	TypeProjectDown       Type = "project_down"
	TypeProjectRestart    Type = "project_restart"
	TypeProjectDestroy    Type = "project_destroy"
	TypeContainerStart    Type = "container_start"
	TypeContainerStop     Type = "container_stop"
	TypeContainerRestart  Type = "container_restart"
	TypeContainerRedeploy Type = "container_redeploy"
	TypeContainerEdit     Type = "container_edit"
	TypeContainerDelete   Type = "container_delete"
	TypeContainerKill     Type = "container_kill"
	TypeContainerPause    Type = "container_pause"
	TypeContainerUnpause  Type = "container_unpause"
	TypeVulnerabilityScan Type = "vulnerability_scan"
	TypeImagePatch        Type = "image_patch"
	TypeAutoUpdate        Type = "auto_update"
	TypeSystemPrune       Type = "system_prune"
	TypeResourceAction    Type = "resource_action"

	MessageLevelInfo    MessageLevel = "info"
	MessageLevelWarning MessageLevel = "warning"
	MessageLevelError   MessageLevel = "error"
	MessageLevelSuccess MessageLevel = "success"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	ID                    string         `json:"id"`
	EnvironmentID         string         `json:"environmentId"`
	BatchID               *string        `json:"batchId,omitempty"`
	SourceEnvironmentID   string         `json:"sourceEnvironmentId,omitempty"`
	SourceEnvironmentName string         `json:"sourceEnvironmentName,omitempty"`
	Type                  Type           `json:"type"`
	Status                Status         `json:"status"`
	ResourceType          *string        `json:"resourceType,omitempty"`
	ResourceID            *string        `json:"resourceId,omitempty"`
	ResourceName          *string        `json:"resourceName,omitempty"`
	Progress              *int           `json:"progress,omitempty"`
	Step                  string         `json:"step,omitempty"`
	LatestMessage         string         `json:"latestMessage,omitempty"`
	StartedBy             *StartedBy     `json:"startedBy,omitempty"`
	StartedAt             time.Time      `json:"startedAt"`
	EndedAt               *time.Time     `json:"endedAt,omitempty"`
	DurationMs            *int64         `json:"durationMs,omitempty"`
	Error                 *string        `json:"error,omitempty"`
	Metadata              map[string]any `json:"metadata,omitempty"`
	CreatedAt             time.Time      `json:"createdAt"`
	UpdatedAt             *time.Time     `json:"updatedAt,omitempty"`
}

type ClearHistoryResult

type ClearHistoryResult struct {
	Deleted int64 `json:"deleted"`
}

type Detail

type Detail struct {
	Activity Activity  `json:"activity"`
	Messages []Message `json:"messages"`
}

type Message

type Message struct {
	ID         string         `json:"id"`
	ActivityID string         `json:"activityId"`
	Level      MessageLevel   `json:"level"`
	Message    string         `json:"message"`
	Payload    map[string]any `json:"payload,omitempty"`
	CreatedAt  time.Time      `json:"createdAt"`
}

type MessageLevel

type MessageLevel string

type StartedBy

type StartedBy struct {
	UserID      string `json:"userId,omitempty"`
	Username    string `json:"username"`
	DisplayName string `json:"displayName,omitempty"`
}

type Status

type Status string

type StreamEvent

type StreamEvent struct {
	Type          string     `json:"type"`
	EnvironmentID string     `json:"environmentId,omitempty"`
	ActivityID    string     `json:"activityId,omitempty"`
	Activity      *Activity  `json:"activity,omitempty"`
	Activities    []Activity `json:"activities,omitempty"`
	Message       *Message   `json:"message,omitempty"`
	Error         string     `json:"error,omitempty"`
	Timestamp     time.Time  `json:"timestamp"`
	// ActivityType is the type of the owning activity for events that carry no
	// activity payload. It is an internal hint used to skip visibility rereads
	// for ordinary activities and is never serialized.
	ActivityType Type `json:"-"`
}

type Type

type Type string

Jump to

Keyboard shortcuts

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