Skip to content

Commit 8e1654c

Browse files
committed
chore: add organization id to provisioner sdk type
1 parent 1691768 commit 8e1654c

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

coderd/database/db2sdk/db2sdk.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,14 @@ func Apps(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerNa
509509

510510
func ProvisionerDaemon(dbDaemon database.ProvisionerDaemon) codersdk.ProvisionerDaemon {
511511
result := codersdk.ProvisionerDaemon{
512-
ID: dbDaemon.ID,
513-
CreatedAt: dbDaemon.CreatedAt,
514-
LastSeenAt: codersdk.NullTime{NullTime: dbDaemon.LastSeenAt},
515-
Name: dbDaemon.Name,
516-
Tags: dbDaemon.Tags,
517-
Version: dbDaemon.Version,
518-
APIVersion: dbDaemon.APIVersion,
512+
ID: dbDaemon.ID,
513+
OrganizationID: dbDaemon.OrganizationID,
514+
CreatedAt: dbDaemon.CreatedAt,
515+
LastSeenAt: codersdk.NullTime{NullTime: dbDaemon.LastSeenAt},
516+
Name: dbDaemon.Name,
517+
Tags: dbDaemon.Tags,
518+
Version: dbDaemon.Version,
519+
APIVersion: dbDaemon.APIVersion,
519520
}
520521
for _, provisionerType := range dbDaemon.Provisioners {
521522
result.Provisioners = append(result.Provisioners, codersdk.ProvisionerType(provisionerType))

codersdk/provisionerdaemons.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ const (
3636
)
3737

3838
type ProvisionerDaemon struct {
39-
ID uuid.UUID `json:"id" format:"uuid"`
40-
CreatedAt time.Time `json:"created_at" format:"date-time"`
41-
LastSeenAt NullTime `json:"last_seen_at,omitempty" format:"date-time"`
42-
Name string `json:"name"`
43-
Version string `json:"version"`
44-
APIVersion string `json:"api_version"`
45-
Provisioners []ProvisionerType `json:"provisioners"`
46-
Tags map[string]string `json:"tags"`
39+
ID uuid.UUID `json:"id" format:"uuid"`
40+
OrganizationID uuid.UUID `json:"organization_id" format:"uuid"`
41+
CreatedAt time.Time `json:"created_at" format:"date-time"`
42+
LastSeenAt NullTime `json:"last_seen_at,omitempty" format:"date-time"`
43+
Name string `json:"name"`
44+
Version string `json:"version"`
45+
APIVersion string `json:"api_version"`
46+
Provisioners []ProvisionerType `json:"provisioners"`
47+
Tags map[string]string `json:"tags"`
4748
}
4849

4950
// ProvisionerJobStatus represents the at-time state of a job.

0 commit comments

Comments
 (0)