mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Add the option to generate a trial license during setup (#5110)
This allows users to generate a 30 day free license during setup to test out Enterprise features.
This commit is contained in:
@@ -6,6 +6,8 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type AddLicenseRequest struct {
|
||||
@@ -14,6 +16,7 @@ type AddLicenseRequest struct {
|
||||
|
||||
type License struct {
|
||||
ID int32 `json:"id"`
|
||||
UUID uuid.UUID `json:"uuid"`
|
||||
UploadedAt time.Time `json:"uploaded_at"`
|
||||
// Claims are the JWT claims asserted by the license. Here we use
|
||||
// a generic string map to ensure that all data from the server is
|
||||
|
||||
+4
-4
@@ -53,10 +53,10 @@ type GetUsersResponse struct {
|
||||
}
|
||||
|
||||
type CreateFirstUserRequest struct {
|
||||
Email string `json:"email" validate:"required,email"`
|
||||
Username string `json:"username" validate:"required,username"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
OrganizationName string `json:"organization" validate:"required,username"`
|
||||
Email string `json:"email" validate:"required,email"`
|
||||
Username string `json:"username" validate:"required,username"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Trial bool `json:"trial"`
|
||||
}
|
||||
|
||||
// CreateFirstUserResponse contains IDs for newly created user info.
|
||||
|
||||
Reference in New Issue
Block a user