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:
Kyle Carberry
2022-11-16 17:09:49 -06:00
committed by GitHub
parent b6703b11c6
commit fb9ca7b830
29 changed files with 332 additions and 79 deletions
+3
View File
@@ -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
View File
@@ -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.