Documentation
¶
Index ¶
- Variables
- func LogMessagesToRecords(traceID string, msgs []LogMessage) []sdklog.Record
- func SpansToPB(spans []SpanData) []*tracepb.ResourceSpans
- type Check
- type CheckActor
- type CheckCommit
- type CheckCommitRef
- type CheckEvent
- type Client
- func (c *Client) CreatePortalSession(ctx context.Context, orgID string) (string, error)
- func (c *Client) DeleteOrgRepoSetting(ctx context.Context, orgID, repo string) (bool, error)
- func (c *Client) Engine(ctx context.Context, req EngineRequest) (*EngineSpec, error)
- func (c *Client) GitHubOAuthURL(ctx context.Context, redirectURI string) (string, error)
- func (c *Client) ModuleChecks(ctx context.Context, org string, moduleRef string, moduleVersion string) ([]CheckCommit, error)
- func (c *Client) OrgByName(ctx context.Context, name string) (*OrgResponse, error)
- func (c *Client) OrgChecks(ctx context.Context, org string, repos []string, first int) ([]CheckCommit, error)
- func (c *Client) OrgDetails(ctx context.Context, orgName string) (*OrgDetails, error)
- func (c *Client) OrgRepoSetting(ctx context.Context, orgName, repo string) (*RepoSetting, error)
- func (c *Client) Plans(ctx context.Context) (*PlansResponse, error)
- func (c *Client) Repos(ctx context.Context) ([]Repo, error)
- func (c *Client) Sources(ctx context.Context) ([]Source, error)
- func (c *Client) StreamLogs(ctx context.Context, orgID string, traceID string, spanID string, ...) error
- func (c *Client) StreamSpans(ctx context.Context, orgID string, traceID string, handler func([]SpanData)) error
- func (c *Client) UpdateOrgRepoSetting(ctx context.Context, orgID, repo string, isPublic bool) (bool, error)
- func (c *Client) User(ctx context.Context) (*UserResponse, error)
- type EngineRequest
- type EngineSpec
- type ErrResponse
- type Feature
- type LogMessage
- type OrgDetails
- type OrgResponse
- type Plan
- type PlanItem
- type PlanPrice
- type PlansResponse
- type Repo
- type RepoSetting
- type SerializableCertificate
- type Source
- type SpanData
- type SpanEvent
- type SpanLink
- type SpanScope
- type SpanStatus
- type SubscriptionInfo
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoOrg = errors.New("no org associated with this Engine")
Functions ¶
func LogMessagesToRecords ¶ added in v0.20.2
func LogMessagesToRecords(traceID string, msgs []LogMessage) []sdklog.Record
LogMessagesToRecords converts Cloud API LogMessage values into OTel SDK log records suitable for feeding into a LogExporter.
func SpansToPB ¶ added in v0.20.0
func SpansToPB(spans []SpanData) []*tracepb.ResourceSpans
SpansToPB converts Cloud API SpanData into OTLP ResourceSpans proto, suitable for feeding through telemetry.SpansFromPB and into a SpanExporter.
Types ¶
type Check ¶
type Check struct {
ID string `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
StartedAt *time.Time `json:"startedAt"`
EndTime *time.Time `json:"endTime"`
Duration *int `json:"duration"`
TraceID string `json:"traceId"`
SpanID string `json:"spanId"`
ModuleRef string `json:"moduleRef"`
ModuleVersion string `json:"moduleVersion"`
Internal bool `json:"internal"`
}
func (*Check) DurationAsTime ¶
type CheckActor ¶
type CheckCommit ¶
type CheckCommit struct {
Repo string `json:"repo"`
CommitSHA string `json:"commitSHA"`
CommitMessage string `json:"commitMessage"`
Timestamp time.Time `json:"timestamp"`
AuthorName string `json:"authorName"`
AuthorEmail string `json:"authorEmail"`
Events []CheckEvent `json:"events"`
Refs []CheckCommitRef `json:"refs"`
Checks []Check `json:"checks"`
}
type CheckCommitRef ¶
type CheckCommitRef struct {
Typename string `json:"__typename"`
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Number int `json:"number,omitempty"`
Title string `json:"title,omitempty"`
State string `json:"state,omitempty"`
IntegrationCommit string `json:"integrationCommit,omitempty"`
}
type CheckEvent ¶
type CheckEvent struct {
Provider string `json:"provider"`
Type string `json:"type"`
Timestamp time.Time `json:"timestamp"`
Actor CheckActor `json:"actor"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreatePortalSession ¶
func (*Client) DeleteOrgRepoSetting ¶
func (*Client) Engine ¶ added in v0.18.9
func (c *Client) Engine(ctx context.Context, req EngineRequest) (*EngineSpec, error)
func (*Client) GitHubOAuthURL ¶
func (*Client) ModuleChecks ¶
func (*Client) OrgDetails ¶
func (*Client) OrgRepoSetting ¶
func (*Client) StreamLogs ¶ added in v0.20.0
func (c *Client) StreamLogs( ctx context.Context, orgID string, traceID string, spanID string, handler func([]LogMessage), ) error
StreamLogs streams log messages for a trace from Dagger Cloud's GraphQL API.
func (*Client) StreamSpans ¶ added in v0.20.0
func (c *Client) StreamSpans( ctx context.Context, orgID string, traceID string, handler func([]SpanData), ) error
StreamSpans streams span data for a trace from Dagger Cloud's GraphQL API. It calls the handler for each batch of spans received.
func (*Client) UpdateOrgRepoSetting ¶
type EngineRequest ¶ added in v0.19.1
type EngineRequest struct {
Module string `json:"module,omitempty"`
Function string ` json:"function,omitempty"`
ExecCmd []string `json:"exec_cmd,omitempty"`
ClientID string `json:"client_id,omitempty"`
MinimumEngineVersion string `json:"minimum_engine_version,omitempty"`
TraceID string `json:"trace_id,omitempty"`
}
type EngineSpec ¶ added in v0.18.9
type EngineSpec struct {
EngineRequest
Image string `json:"image,omitempty"`
Location string `json:"location,omitempty"`
OrgID string `json:"org_id,omitempty"`
UserID string `json:"user_id,omitempty"`
URL string `json:"url,omitempty"`
CertSerialized *SerializableCertificate `json:"cert,omitempty"`
InstanceID string `json:"instance_id,omitempty"`
}
func (*EngineSpec) TLSCertificate ¶ added in v0.18.9
func (es *EngineSpec) TLSCertificate() (*tls.Certificate, error)
type ErrResponse ¶ added in v0.18.9
type ErrResponse struct {
Message string `json:"message"`
}
type LogMessage ¶ added in v0.20.0
type OrgDetails ¶
type OrgDetails struct {
ID string `json:"id"`
Name string `json:"name"`
CreatedAt string `json:"createdAt"`
Subscription SubscriptionInfo `json:"subscription"`
Features []Feature `json:"features"`
}
type OrgResponse ¶ added in v0.20.0
type PlansResponse ¶
type PlansResponse struct {
Plans []Plan `json:"plans"`
}
type RepoSetting ¶
type SerializableCertificate ¶ added in v0.18.9
type SpanData ¶ added in v0.20.0
type SpanData struct {
ID string `json:"id"`
TraceID string `json:"traceId"`
TraceState string `json:"traceState"`
Name string `json:"name"`
ParentID *string `json:"parentId"`
Kind string `json:"kind"`
Timestamp time.Time `json:"timestamp"`
EndTime *time.Time `json:"endTime"`
UpdateTime time.Time `json:"updateTime"`
Attributes map[string]any `json:"attributes"`
Status SpanStatus `json:"status"`
Events []SpanEvent `json:"events"`
Links []SpanLink `json:"links"`
Scope SpanScope `json:"scope"`
HasLogs bool `json:"hasLogs"`
ChildCount int `json:"childCount"`
Partial bool `json:"partial"`
}
type SpanStatus ¶ added in v0.20.0
type SubscriptionInfo ¶
type UserResponse ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.