project

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProject

func CreateProject(context context.Context, body ProjectBody) (bool, error)

func DeleteAllProjectFromUser

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

func DeleteProjectFromUser

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

func GetProjectListPaginatedValue

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

func IsSubDomainAvailable

func IsSubDomainAvailable(ctx context.Context, subDomain string) (bool, error)

func UpdateProject

func UpdateProject(ctx context.Context, id int, name, subDomain string) (bool, error)

Types

type Project

type Project struct {
	Id            int    `json:"id" db:"id"`
	UserId        string `json:"user_id" db:"user_id"`
	Name          string `json:"name" db:"name"`
	SourceCodeUrl string `json:"source_code_url" db:"source_code_url"`
	SourceCode    string `json:"source_code" db:"source_code"`
	Subdomain     string `json:"subdomain" db:"subdomain"`
	CustomDomain  string `json:"custom_domain" db:"custom_domain"`
	Language      string `json:"language" db:"language"`
	IsDockerized  string `json:"is_dockerized" db:"is_dockerized"`
	CreatedAt     string `json:"created_on" db:"created_at"`
}

func GetProjectById

func GetProjectById(context context.Context, pid int) (Project, error)

type ProjectBody

type ProjectBody struct {
	UserId        string `validate:"required" json:"user_id"`
	Name          string `validate:"required" json:"name"`
	SourceCodeUrl string `validate:"required" json:"source_code_url"`
	SourceCode    string `validate:"required" json:"source_code"`
	Subdomain     string `validate:"required" json:"subdomain"`
	CustomDomain  string `validate:"required" json:"custom_domain"`
	Language      string `validate:"required" json:"language"`
	IsDockerized  string `validate:"required" json:"is_dockerized"`
}

type UpdateProjectBody

type UpdateProjectBody struct {
	Name      string `validate:"required" json:"name"`
	Subdomain string `validate:"required" json:"subdomain"`
}

Jump to

Keyboard shortcuts

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