Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 46d7275

Browse files
committed
Indent struct tab tags properly
1 parent 90dfe59 commit 46d7275

File tree

5 files changed

+46
-43
lines changed

5 files changed

+46
-43
lines changed

coder-sdk/devurl.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import (
88

99
// DevURL is the parsed json response record for a devURL from cemanager
1010
type DevURL struct {
11-
ID string `json:"id"`
12-
URL string `json:"url"`
13-
Port int `json:"port"`
14-
Access string `json:"access"`
15-
Name string `json:"name"`
11+
ID string `json:"id" tab:"ID"`
12+
URL string `json:"url" tab:"URL"`
13+
Port int `json:"port" tab:"Port"`
14+
Access string `json:"access" tab:"Access"`
15+
Name string `json:"name" tab:"Name"`
1616
}
1717

1818
type delDevURLRequest struct {

coder-sdk/env.go

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,31 @@ import (
1111

1212
// Environment describes a Coder environment
1313
type Environment struct {
14-
ID string `json:"id" tab:"-"`
15-
Name string `json:"name"`
16-
ImageID string `json:"image_id" tab:"-"`
17-
ImageTag string `json:"image_tag"`
18-
OrganizationID string `json:"organization_id" tab:"-"`
19-
UserID string `json:"user_id" tab:"-"`
20-
LastBuiltAt time.Time `json:"last_built_at" tab:"-"`
21-
CPUCores float32 `json:"cpu_cores"`
22-
MemoryGB int `json:"memory_gb"`
23-
DiskGB int `json:"disk_gb"`
24-
GPUs int `json:"gpus"`
25-
Updating bool `json:"updating"`
26-
LatestStat EnvironmentStat `json:"latest_stat" tab:"Status"`
27-
RebuildMessages []struct {
28-
Text string `json:"text"`
29-
Required bool `json:"required"`
30-
} `json:"rebuild_messages" tab:"-"`
31-
CreatedAt time.Time `json:"created_at" tab:"-"`
32-
UpdatedAt time.Time `json:"updated_at" tab:"-"`
33-
LastOpenedAt time.Time `json:"last_opened_at" tab:"-"`
34-
LastConnectionAt time.Time `json:"last_connection_at" tab:"-"`
35-
AutoOffThreshold xjson.Duration `json:"auto_off_threshold" tab:"-"`
14+
ID string `json:"id" tab:"-"`
15+
Name string `json:"name" tab:"Name"`
16+
ImageID string `json:"image_id" tab:"-"`
17+
ImageTag string `json:"image_tag" tab:"ImageTag"`
18+
OrganizationID string `json:"organization_id" tab:"-"`
19+
UserID string `json:"user_id" tab:"-"`
20+
LastBuiltAt time.Time `json:"last_built_at" tab:"-"`
21+
CPUCores float32 `json:"cpu_cores" tab:"CPUCores"`
22+
MemoryGB int `json:"memory_gb" tab:"MemoryGB"`
23+
DiskGB int `json:"disk_gb" tab:"DiskGB"`
24+
GPUs int `json:"gpus" tab:"GPUs"`
25+
Updating bool `json:"updating" tab:"Updating"`
26+
LatestStat EnvironmentStat `json:"latest_stat" tab:"Status"`
27+
RebuildMessages []RebuildMessage `json:"rebuild_messages" tab:"-"`
28+
CreatedAt time.Time `json:"created_at" tab:"-"`
29+
UpdatedAt time.Time `json:"updated_at" tab:"-"`
30+
LastOpenedAt time.Time `json:"last_opened_at" tab:"-"`
31+
LastConnectionAt time.Time `json:"last_connection_at" tab:"-"`
32+
AutoOffThreshold xjson.Duration `json:"auto_off_threshold" tab:"-"`
33+
}
34+
35+
// RebuildMessage defines the message shown when an Environment requires a rebuild for it can be accessed.
36+
type RebuildMessage struct {
37+
Text string `json:"text"`
38+
Required bool `json:"required"`
3639
}
3740

3841
// EnvironmentStat represents the state of an environment

coder-sdk/secrets.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88

99
// Secret describes a Coder secret
1010
type Secret struct {
11-
ID string `json:"id" tab:"-"`
12-
Name string `json:"name"`
13-
Value string `json:"value,omitempty"`
14-
Description string `json:"description"`
15-
CreatedAt time.Time `json:"created_at"`
16-
UpdatedAt time.Time `json:"updated_at" tab:"-"`
11+
ID string `json:"id" tab:"-"`
12+
Name string `json:"name" tab:"Name"`
13+
Value string `json:"value,omitempty" tab:"Value"`
14+
Description string `json:"description" tab:"Description"`
15+
CreatedAt time.Time `json:"created_at" tab:"CreatedAt"`
16+
UpdatedAt time.Time `json:"updated_at" tab:"-"`
1717
}
1818

1919
// Secrets gets all secrets for the given user

coder-sdk/users.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import (
88

99
// User describes a Coder user account.
1010
type User struct {
11-
ID string `json:"id" tab:"-"`
12-
Email string `json:"email"`
13-
Username string `json:"username"`
14-
Name string `json:"name"`
15-
CreatedAt time.Time `json:"created_at"`
11+
ID string `json:"id" tab:"-"`
12+
Email string `json:"email" tab:"Email"`
13+
Username string `json:"username" tab:"Username"`
14+
Name string `json:"name" tab:"Name"`
15+
CreatedAt time.Time `json:"created_at" tab:"CreatedAt"`
1616
UpdatedAt time.Time `json:"updated_at" tab:"-"`
1717
}
1818

internal/cmd/urls.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ func makeURLCmd() *cobra.Command {
5151

5252
// DevURL is the parsed json response record for a devURL from cemanager
5353
type DevURL struct {
54-
ID string `json:"id" tab:"-"`
55-
URL string `json:"url"`
56-
Port int `json:"port"`
57-
Name string `json:"name" tab:"-"`
58-
Access string `json:"access"`
54+
ID string `json:"id" tab:"-"`
55+
URL string `json:"url" tab:"URL"`
56+
Port int `json:"port" tab:"Port"`
57+
Name string `json:"name" tab:"-"`
58+
Access string `json:"access" tab:"Access"`
5959
}
6060

6161
var urlAccessLevel = map[string]string{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy