Add enterprise support

This change adds enterprise support throughout garm.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2022-10-13 16:09:28 +00:00
parent f40420bfb6
commit 296333412a
No known key found for this signature in database
GPG key ID: 7D073DCC2C074CB5
34 changed files with 2028 additions and 112 deletions

View file

@ -66,6 +66,23 @@ func (c *CreateOrgParams) Validate() error {
return nil
}
type CreateEnterpriseParams struct {
Name string `json:"name"`
CredentialsName string `json:"credentials_name"`
WebhookSecret string `json:"webhook_secret"`
}
func (c *CreateEnterpriseParams) Validate() error {
if c.Name == "" {
return errors.NewBadRequestError("missing org name")
}
if c.CredentialsName == "" {
return errors.NewBadRequestError("missing credentials name")
}
return nil
}
// NewUserParams holds the needed information to create
// a new user
type NewUserParams struct {