Massive architectural rework
This commit massively overhauls the project's structure to simplify development. Most parts are now correctly compartmentalized and dependencies are passed in a sane way rather than global variables galore xd.
This commit is contained in:
10
pkg/API/app.go
Normal file
10
pkg/API/app.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package API
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
type App struct {
|
||||
Id uuid.UUID `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
DeploymentID int64 `json:"deployment_id,omitempty"`
|
||||
DeploymentStatus string `json:"deployment_status,omitempty"`
|
||||
}
|
||||
19
pkg/API/deploy.go
Normal file
19
pkg/API/deploy.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package API
|
||||
|
||||
import (
|
||||
"mime/multipart"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/juls0730/flux/pkg"
|
||||
)
|
||||
|
||||
type DeployRequest struct {
|
||||
Id uuid.UUID `form:"id"`
|
||||
Config pkg.ProjectConfig `form:"config"`
|
||||
Code multipart.File `form:"code"`
|
||||
}
|
||||
|
||||
type DeploymentEvent struct {
|
||||
Message any `json:"message"`
|
||||
Stage string `json:"stage"`
|
||||
}
|
||||
8
pkg/API/info.go
Normal file
8
pkg/API/info.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package API
|
||||
|
||||
type Info struct {
|
||||
// an int between 0 and 9 that represents the compression level, 0 being no compression, 9 being maximum compression
|
||||
CompressionLevel int `json:"compression_level"`
|
||||
// the version of the daemon (see pkg/version.go)
|
||||
Version string `json:"version"`
|
||||
}
|
||||
Reference in New Issue
Block a user