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

Indent struct tab tags properly #112

Merged
merged 1 commit into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions coder-sdk/devurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (

// DevURL is the parsed json response record for a devURL from cemanager
type DevURL struct {
ID string `json:"id"`
URL string `json:"url"`
Port int `json:"port"`
Access string `json:"access"`
Name string `json:"name"`
ID string `json:"id" tab:"ID"`
URL string `json:"url" tab:"URL"`
Port int `json:"port" tab:"Port"`
Access string `json:"access" tab:"Access"`
Name string `json:"name" tab:"Name"`
}

type delDevURLRequest struct {
Expand Down
47 changes: 25 additions & 22 deletions coder-sdk/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,31 @@ import (

// Environment describes a Coder environment
type Environment struct {
ID string `json:"id" tab:"-"`
Name string `json:"name"`
ImageID string `json:"image_id" tab:"-"`
ImageTag string `json:"image_tag"`
OrganizationID string `json:"organization_id" tab:"-"`
UserID string `json:"user_id" tab:"-"`
LastBuiltAt time.Time `json:"last_built_at" tab:"-"`
CPUCores float32 `json:"cpu_cores"`
MemoryGB int `json:"memory_gb"`
DiskGB int `json:"disk_gb"`
GPUs int `json:"gpus"`
Updating bool `json:"updating"`
LatestStat EnvironmentStat `json:"latest_stat" tab:"Status"`
RebuildMessages []struct {
Text string `json:"text"`
Required bool `json:"required"`
} `json:"rebuild_messages" tab:"-"`
CreatedAt time.Time `json:"created_at" tab:"-"`
UpdatedAt time.Time `json:"updated_at" tab:"-"`
LastOpenedAt time.Time `json:"last_opened_at" tab:"-"`
LastConnectionAt time.Time `json:"last_connection_at" tab:"-"`
AutoOffThreshold xjson.Duration `json:"auto_off_threshold" tab:"-"`
ID string `json:"id" tab:"-"`
Name string `json:"name" tab:"Name"`
ImageID string `json:"image_id" tab:"-"`
ImageTag string `json:"image_tag" tab:"ImageTag"`
OrganizationID string `json:"organization_id" tab:"-"`
UserID string `json:"user_id" tab:"-"`
LastBuiltAt time.Time `json:"last_built_at" tab:"-"`
CPUCores float32 `json:"cpu_cores" tab:"CPUCores"`
MemoryGB int `json:"memory_gb" tab:"MemoryGB"`
DiskGB int `json:"disk_gb" tab:"DiskGB"`
GPUs int `json:"gpus" tab:"GPUs"`
Updating bool `json:"updating" tab:"Updating"`
LatestStat EnvironmentStat `json:"latest_stat" tab:"Status"`
RebuildMessages []RebuildMessage `json:"rebuild_messages" tab:"-"`
CreatedAt time.Time `json:"created_at" tab:"-"`
UpdatedAt time.Time `json:"updated_at" tab:"-"`
LastOpenedAt time.Time `json:"last_opened_at" tab:"-"`
LastConnectionAt time.Time `json:"last_connection_at" tab:"-"`
AutoOffThreshold xjson.Duration `json:"auto_off_threshold" tab:"-"`
}

// RebuildMessage defines the message shown when an Environment requires a rebuild for it can be accessed.
type RebuildMessage struct {
Text string `json:"text"`
Required bool `json:"required"`
}

// EnvironmentStat represents the state of an environment
Expand Down
12 changes: 6 additions & 6 deletions coder-sdk/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (

// Secret describes a Coder secret
type Secret struct {
ID string `json:"id" tab:"-"`
Name string `json:"name"`
Value string `json:"value,omitempty"`
Description string `json:"description"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at" tab:"-"`
ID string `json:"id" tab:"-"`
Name string `json:"name" tab:"Name"`
Value string `json:"value,omitempty" tab:"Value"`
Description string `json:"description" tab:"Description"`
CreatedAt time.Time `json:"created_at" tab:"CreatedAt"`
UpdatedAt time.Time `json:"updated_at" tab:"-"`
}

// Secrets gets all secrets for the given user
Expand Down
10 changes: 5 additions & 5 deletions coder-sdk/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (

// User describes a Coder user account.
type User struct {
ID string `json:"id" tab:"-"`
Email string `json:"email"`
Username string `json:"username"`
Name string `json:"name"`
CreatedAt time.Time `json:"created_at"`
ID string `json:"id" tab:"-"`
Email string `json:"email" tab:"Email"`
Username string `json:"username" tab:"Username"`
Name string `json:"name" tab:"Name"`
CreatedAt time.Time `json:"created_at" tab:"CreatedAt"`
UpdatedAt time.Time `json:"updated_at" tab:"-"`
}

Expand Down
10 changes: 5 additions & 5 deletions internal/cmd/urls.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ func makeURLCmd() *cobra.Command {

// DevURL is the parsed json response record for a devURL from cemanager
type DevURL struct {
ID string `json:"id" tab:"-"`
URL string `json:"url"`
Port int `json:"port"`
Name string `json:"name" tab:"-"`
Access string `json:"access"`
ID string `json:"id" tab:"-"`
URL string `json:"url" tab:"URL"`
Port int `json:"port" tab:"Port"`
Name string `json:"name" tab:"-"`
Access string `json:"access" tab:"Access"`
}

var urlAccessLevel = map[string]string{
Expand Down