@@ -29,3 +29,66 @@ type ConnectorCatalogueItem struct {
29
29
SSCAType string `json:"sscaType,omitempty"`
30
30
SSCASupported bool `json:"sscaSupported,omitempty"`
31
31
}
32
+
33
+ // ConnectorDetail represents the detailed information of a connector.
34
+ // Based on https://apidocs.harness.io/tag/Connectors#operation/getConnector
35
+ type ConnectorDetail struct {
36
+ Connector Connector `json:"connector"`
37
+ CreatedAt int64 `json:"createdAt"`
38
+ LastModifiedAt int64 `json:"lastModifiedAt"`
39
+ Status ConnectorStatus `json:"status"`
40
+ ActivityDetails ActivityDetails `json:"activityDetails"`
41
+ HarnessManaged bool `json:"harnessManaged"`
42
+ GitDetails GitDetails `json:"gitDetails"`
43
+ EntityValidityDetails EntityValidityDetails `json:"entityValidityDetails"`
44
+ GovernanceMetadata interface {} `json:"governanceMetadata,omitempty"`
45
+ IsFavorite bool `json:"isFavorite"`
46
+ }
47
+
48
+ // Connector represents the core connector information.
49
+ type Connector struct {
50
+ Name string `json:"name"`
51
+ Identifier string `json:"identifier"`
52
+ Description string `json:"description"`
53
+ AccountIdentifier string `json:"accountIdentifier"`
54
+ OrgIdentifier string `json:"orgIdentifier"`
55
+ ProjectIdentifier string `json:"projectIdentifier"`
56
+ Tags map [string ]string `json:"tags"`
57
+ Type string `json:"type"`
58
+ Spec map [string ]interface {} `json:"spec"`
59
+ }
60
+
61
+ // ConnectorStatus represents the status information of a connector.
62
+ type ConnectorStatus struct {
63
+ Status string `json:"status"`
64
+ ErrorSummary string `json:"errorSummary"`
65
+ Errors []ConnectorError `json:"errors"`
66
+ TestedAt int64 `json:"testedAt"`
67
+ LastTestedAt int64 `json:"lastTestedAt"`
68
+ LastConnectedAt int64 `json:"lastConnectedAt"`
69
+ LastAlertSent int64 `json:"lastAlertSent"`
70
+ }
71
+
72
+ // ConnectorError represents an error in connector status.
73
+ type ConnectorError struct {
74
+ Reason string `json:"reason"`
75
+ Message string `json:"message"`
76
+ Code int `json:"code"`
77
+ }
78
+
79
+ // ActivityDetails represents the activity information of a connector.
80
+ type ActivityDetails struct {
81
+ LastActivityTime int64 `json:"lastActivityTime"`
82
+ }
83
+
84
+ // GitDetails represents git-related information of a connector.
85
+ type GitDetails struct {
86
+ Valid bool `json:"valid"`
87
+ InvalidYaml string `json:"invalidYaml"`
88
+ }
89
+
90
+ // EntityValidityDetails represents the validity information of a connector.
91
+ type EntityValidityDetails struct {
92
+ Valid bool `json:"valid"`
93
+ InvalidYaml string `json:"invalidYaml"`
94
+ }
0 commit comments