create directory structure

This commit is contained in:
Mans Ziesel 2024-12-03 19:08:41 +01:00
parent fd07e2f025
commit 2837fa2c47
10 changed files with 80 additions and 1 deletions

View File

@ -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. - 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??? - User management, RBAC for teams???
- Ticket software integration??? - Ticket software integration???
- Device profiles
- Bulk device installer
Supported platforms Supported platforms
- Linux - Linux
@ -48,4 +50,3 @@ Supported platforms
- mTLS for communication - mTLS for communication
- Kernel level client???? - Kernel level client????
- AV integration - AV integration

0
cmd/client/.gitkeep Normal file
View File

8
cmd/client/main.go Normal file
View File

@ -0,0 +1,8 @@
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}

0
cmd/server/.gitkeep Normal file
View File

7
cmd/server/main.go Normal file
View File

@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}

0
configs/server.toml Normal file
View File

View File

0
docs/.gitkeep Normal file
View File

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.mziesel.nl/mans/zadmin
go 1.23.0

60
internal/models/models.go Normal file
View File

@ -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
}