added more stuff
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
module acooldomain.co/backend/models
|
||||
|
||||
go 1.22.0
|
||||
module acooldomain.co/backend/models
|
||||
|
||||
go 1.22.0
|
||||
|
@@ -1,13 +1,13 @@
|
||||
package models
|
||||
|
||||
type Permission int
|
||||
|
||||
const (
|
||||
Start Permission = 1 << iota
|
||||
Stop
|
||||
Browse
|
||||
Create
|
||||
Delete
|
||||
RunCommand
|
||||
Admin
|
||||
)
|
||||
package models
|
||||
|
||||
type Permission int
|
||||
|
||||
const (
|
||||
Start Permission = 1 << iota
|
||||
Stop
|
||||
Browse
|
||||
Create
|
||||
Delete
|
||||
RunCommand
|
||||
Admin
|
||||
)
|
||||
|
@@ -1,36 +1,36 @@
|
||||
package models
|
||||
|
||||
type Port struct {
|
||||
Protocol string
|
||||
Number int
|
||||
}
|
||||
|
||||
type ImageInfo struct {
|
||||
Name string
|
||||
Version string
|
||||
Ports []Port
|
||||
}
|
||||
|
||||
type ServerInfo struct {
|
||||
Id string
|
||||
OwnerId string
|
||||
Image ImageInfo
|
||||
On bool
|
||||
Nickname string
|
||||
Ports []Port
|
||||
}
|
||||
|
||||
type FileBrowserInfo struct {
|
||||
Id string
|
||||
OwnerId string
|
||||
ConnectedTo ServerInfo
|
||||
}
|
||||
|
||||
type ServerData struct {
|
||||
Id string
|
||||
OwnerId string
|
||||
Image string
|
||||
VolumeId string
|
||||
Nickname string
|
||||
UserPermissions map[string]Permission
|
||||
}
|
||||
package models
|
||||
|
||||
type Port struct {
|
||||
Protocol string
|
||||
Number int
|
||||
}
|
||||
|
||||
type ImageInfo struct {
|
||||
Name string
|
||||
Version string
|
||||
Ports []Port
|
||||
}
|
||||
|
||||
type ServerInfo struct {
|
||||
Id string
|
||||
OwnerId string
|
||||
Image ImageInfo
|
||||
On bool
|
||||
Nickname string
|
||||
Ports []Port
|
||||
}
|
||||
|
||||
type FileBrowserInfo struct {
|
||||
Id string
|
||||
OwnerId string
|
||||
ConnectedTo ServerInfo
|
||||
}
|
||||
|
||||
type ServerData struct {
|
||||
Id string
|
||||
OwnerId string
|
||||
Image string
|
||||
VolumeId string
|
||||
Nickname string
|
||||
UserPermissions map[string]Permission
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
package models
|
||||
|
||||
type User struct {
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
MaxOwnedServers int `json:"maxed_owned_servers"`
|
||||
Permissions Permission `json:"permissions"`
|
||||
HashedPass string `json:"hashedPass"`
|
||||
}
|
||||
package models
|
||||
|
||||
type User struct {
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
MaxOwnedServers int `json:"maxed_owned_servers"`
|
||||
Permissions Permission `json:"permissions"`
|
||||
HashedPass string `json:"hashedPass"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user