Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d19d864

Browse files
committed
make gen
1 parent 2689c10 commit d19d864

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

codersdk/api_key.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ type APIKey struct {
2222
LifetimeSeconds int64 `json:"lifetime_seconds" validate:"required"`
2323
}
2424

25+
type LoginType string
26+
27+
const (
28+
LoginTypePassword LoginType = "password"
29+
LoginTypeGithub LoginType = "github"
30+
LoginTypeOIDC LoginType = "oidc"
31+
LoginTypeMachine LoginType = "machine"
32+
)
33+
2534
// CreateMachineKey generates an API key that doesn't expire.
2635
func (c *Client) CreateMachineKey(ctx context.Context) (*GenerateAPIKeyResponse, error) {
2736
res, err := c.Request(ctx, http.MethodPost, fmt.Sprintf("/api/v2/users/%s/keys/machine", Me), nil)

codersdk/users.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ const (
2222
UserStatusSuspended UserStatus = "suspended"
2323
)
2424

25-
type LoginType string
26-
27-
const (
28-
LoginTypePassword LoginType = "password"
29-
LoginTypeGithub LoginType = "github"
30-
LoginTypeOIDC LoginType = "oidc"
31-
)
32-
3325
type UsersRequest struct {
3426
Search string `json:"search,omitempty" typescript:"-"`
3527
// Filter users by status.

site/src/api/typesGenerated.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Code generated by 'make coder/scripts/apitypings/main.go'. DO NOT EDIT.
22

3-
// From codersdk/users.go
3+
// From codersdk/api_key.go
44
export interface APIKey {
55
readonly id: string
66
readonly user_id: string
@@ -685,8 +685,8 @@ export type LogLevel = "debug" | "error" | "info" | "trace" | "warn"
685685
// From codersdk/provisionerdaemons.go
686686
export type LogSource = "provisioner" | "provisioner_daemon"
687687

688-
// From codersdk/users.go
689-
export type LoginType = "github" | "oidc" | "password"
688+
// From codersdk/api_key.go
689+
export type LoginType = "github" | "machine" | "oidc" | "password"
690690

691691
// From codersdk/parameters.go
692692
export type ParameterDestinationScheme = "environment_variable" | "none" | "provisioner_variable"

0 commit comments

Comments
 (0)