diff --git a/README.md b/README.md index 5fa5702..e1976df 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ - Alerting and Notifications: Customizable alerts for system performance issues, security threats, and other critical events, sent via email, SMS, or in-app notifications. - User management, RBAC for teams??? - Ticket software integration??? +- Device profiles +- Bulk device installer Supported platforms - Linux @@ -48,4 +50,3 @@ Supported platforms - mTLS for communication - Kernel level client???? - AV integration - diff --git a/cmd/client/.gitkeep b/cmd/client/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cmd/client/main.go b/cmd/client/main.go new file mode 100644 index 0000000..df3e584 --- /dev/null +++ b/cmd/client/main.go @@ -0,0 +1,8 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello, World!") +} + diff --git a/cmd/server/.gitkeep b/cmd/server/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/cmd/server/main.go b/cmd/server/main.go new file mode 100644 index 0000000..a3dd973 --- /dev/null +++ b/cmd/server/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello, World!") +} diff --git a/configs/server.toml b/configs/server.toml new file mode 100644 index 0000000..e69de29 diff --git a/deployments/zadmin-server.service b/deployments/zadmin-server.service new file mode 100644 index 0000000..e69de29 diff --git a/docs/.gitkeep b/docs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..b9d4357 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.mziesel.nl/mans/zadmin + +go 1.23.0 diff --git a/internal/models/models.go b/internal/models/models.go new file mode 100644 index 0000000..9a99198 --- /dev/null +++ b/internal/models/models.go @@ -0,0 +1,60 @@ +package models + +// Model for the user accounts +type AccountModel struct { + ID string + FirstName string + LastName string + PasswordHash string + Roles []RoleModel +} + +type RoleModel struct { + TenantPattern string + AllowedPerms Permission + DeniedPerms Permission +} + +type Permission string + +const ( + PermissionBillingAll Permission = "billing" + PermissionBillingReader Permission = "billing/reader" + PermissionBillingEdit Permission = "billing/edit" + + PermissionDevicesAll Permission = "devices" + PermissionDevicesAdmin Permission = "devices/admin" + PermissionDevicesServicedeskagent Permission = "devices/servicedeskagent" +) + + + +// Model for the hosts managed by zadmin +type MachineModel struct { + ID string + OsType string +} + +// Model for a tenant within zadmin +type TenantModel struct { + ID string +} + +type ActionType string + +const ( + ShutDownAction ActionType = "shutdown" + RestartAction ActionType = "restart" +) + +// A command to be executed on a Machine +type CommandModel struct { + ID string + ActionType ActionType + Result any +} + +// Profile with configuration +type MachineProfile struct { + ID string +}