Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
ID primitive.ObjectID `json:"id" bson:"_id"`
UserID primitive.ObjectID `json:"-" bson:"user_id"`
Token string `json:"token" bson:"token"`
Provider Provider `json:"provider" bson:"provider"`
BuildOptions BuildOptions `json:"build_options" validate:"required" bson:"build_options"`
ContainerOptions ContainerOptions `json:"container_options" bson:"container_options"`
Owner string `json:"owner" bson:"owner"`
Name string `json:"name" bson:"name"`
ContainerID string `json:"-" bson:"container_id"`
State State `json:"state" bson:"state"`
CompleteURL string `json:"complete_url" bson:"complete_url"`
URL string `json:"url" bson:"url"`
LastBuild Build `json:"last_build" bson:"-"` // Dynamic
CreatedAt time.Time `json:"created_at" bson:"created_at"`
UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
}
App struct
func (*App) SaveBuildOptions ¶
func (app *App) SaveBuildOptions(options BuildOptions) error
SaveBuildOptions : set app build options
func (*App) SaveContainerOptions ¶
func (app *App) SaveContainerOptions(options ContainerOptions) error
SaveContainerOptions : set app container options
func (*App) SetContainerID ¶
SetContainerID util function
type Build ¶
type Build struct {
ID primitive.ObjectID `json:"id" bson:"_id"`
AppID primitive.ObjectID `json:"app_id" bson:"app_id"`
UserID primitive.ObjectID `json:"user_id" bson:"user_id"`
Branch string `json:"branch" bson:"branch"`
CommitHash string `json:"commit_hash" bson:"commit_hash"`
CommitMessage string `json:"commit_message" bson:"commit_message"`
Logs []string `json:"logs" bson:"logs"`
Status DeployStatus `json:"status" bson:"status"`
Error string `json:"error" bson:"error"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
}
Build struct
type BuildOptions ¶
type BuildOptions struct {
Branch string `json:"branch" bson:"branch"`
Env []EnvVar `json:"env" bson:"env"`
}
BuildOptions struct
type ContainerOptions ¶
type ContainerOptions struct {
MaxRAM int64 `json:"max_ram" bson:"max_ram"`
}
type ContainerStats ¶
type ContainerStats struct {
RAMUsage int64 `json:"ram_usage"`
MaxRAM int64 `json:"max_ram"`
CPU float64 `json:"cpu_usage"`
}
ContainerStats struct
type DeployStatus ¶
type DeployStatus int
const ( Building DeployStatus = iota Deploying Deployed Idle BuildError DeployError )
type Profile ¶
type Profile struct {
ID primitive.ObjectID `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
UpdatedAt time.Time `json:"updated_at"`
CreatedAt time.Time `json:"created_at"`
}
Profile struct
type User ¶
type User struct {
ID primitive.ObjectID `json:"id" bson:"_id"`
Username string `json:"username" bson:"username"`
Email string `json:"email" bson:"email" validate:"required,email"`
Password string `json:"password" bson:"password" validate:"required"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
}
User struct
Click to show internal directories.
Click to hide internal directories.