deployment

package
v0.0.0-...-deb6259 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDeployment

func CreateDeployment(ctx context.Context, projectId int, userId string) (int, error)

func CreateDeploymentTx

func CreateDeploymentTx(ctx context.Context, tx *sql.Tx, projectId int, userId string) (int, error)

func DeleteAllDeploymentFromUser

func DeleteAllDeploymentFromUser(ctx context.Context, uid string) error

func DeleteDeploymentFromUser

func DeleteDeploymentFromUser(ctx context.Context, pid int) error

func GetAllDeploymentIDsByUser

func GetAllDeploymentIDsByUser(ctx context.Context, uid string) ([]int, error)

func GetDeploymentListPaginatedValue

func GetDeploymentListPaginatedValue(context context.Context, uid string, itemsPerPage, offset int) (*sql.Rows, error)

func GetDeploymentStatus

func GetDeploymentStatus(context context.Context, id int) (string, error)

func GetProjectById

func GetProjectById(context context.Context, pid string) (projectModel.Project, error)

func GetQueuedProjectCount

func GetQueuedProjectCount(context context.Context, project_id int) (int, error)

Types

type Deployment

type Deployment struct {
	Id        int    `json:"id" db:"id"`
	UserId    string `json:"user_id" db:"user_id"`
	ProjectId string `json:"project_id" db:"project_id"`
	Duration  string `json:"duration" db:"duration"`
	ReadUrl   string `json:"ready_url" db:"ready_url"`
	LastLog   string `json:"last_log" db:"last_log"`
	Status    string `json:"status" db:"status"`
	CreatedAt string `json:"created_on" db:"created_at"`
	UpdatedAt string `json:"updated_at" db:"updated_at"`
}

func GetDeploymentById

func GetDeploymentById(context context.Context, id int) (Deployment, error)

type DeploymentBody

type DeploymentBody struct {
	ProjectId string `validate:"required" json:"projectId"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL