usecase

package
v0.0.0-...-3b85bd6 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyProject

func CopyProject(targetProject *models.Project, fields contracts.Fields) (*models.Project, error)

func CreateCabinet

func CreateCabinet(creatorId, name string, settings any) (*models.Cabinet, error)

func CreateCommand

func CreateCommand(projectId int, fields contracts.Fields) (*models.Command, error)

func CreateConfig

func CreateConfig(projectId int, fields contracts.Fields) (*models.ConfigFile, error)

func CreateDeployment

func CreateDeployment(project *models.Project, version, comment string, params map[string]bool, environmentsParam []int) (*models.Deployment, error)

func CreateEnvironment

func CreateEnvironment(name string, projectId int) (*models.ProjectEnvironment, error)

func CreateKey

func CreateKey(creatorId string, name string) (*models.Key, error)

func CreateProject

func CreateProject(creatorId string, fields contracts.Fields) (*models.Project, error)

func CreateShare

func CreateShare(projectId int, fields contracts.Fields) (*models.ShareFile, error)

func CreateUser

func CreateUser(name, password, role string) (*models.User, error)

func CreateUserGroup

func CreateUserGroup(groupId, userId int) (*models.UserGroup, error)

func CreateUserProject

func CreateUserProject(projectId, userId int) (*models.UserProject, error)

func DeleteCabinet

func DeleteCabinet(id any) error

func DeleteCommand

func DeleteCommand(id any) error

func DeleteConfig

func DeleteConfig(id any) error

func DeleteEnvironment

func DeleteEnvironment(id any) error

func DeleteGroups

func DeleteGroups(id any) error

func DeleteKeys

func DeleteKeys(id any) error

func DeleteProject

func DeleteProject(project *models.Project) error

func DeleteShare

func DeleteShare(id any) error

func DeleteUserGroup

func DeleteUserGroup(id any) error

func DeleteUserProject

func DeleteUserProject(id any) error

func DeleteUsers

func DeleteUsers(id any) error

func DeploymentNotify

func DeploymentNotify(deployment *models.Deployment)

func GetProjectDetail

func GetProjectDetail(project *models.Project) models.ProjectDetail

func GoDeployment

func GoDeployment(deployment *models.Deployment, commands contracts.Collection[*models.Command])

func HasGroupPermission

func HasGroupPermission(group *models.Group, user *models.User) bool

HasGroupPermission 判断用户是否存在指定分组的权限

func HasProjectPermission

func HasProjectPermission(project *models.Project, user *models.User) bool

HasProjectPermission 判断用户是否存在指定项目的权限

func Login

func Login(user *models.User, guard contracts.Guard) contracts.Fields

func RollbackDeployment

func RollbackDeployment(project *models.Project, deployment *models.Deployment, commands []int, before, after string) ([]string, error)

func StartDeployment

func StartDeployment(deployment *models.Deployment, commands contracts.Collection[*models.Command])

func UpdateCabinet

func UpdateCabinet(id any, name string, settings any) error

func UpdateCommand

func UpdateCommand(id any, fields contracts.Fields) error

func UpdateConfig

func UpdateConfig(id any, fields contracts.Fields) error

func UpdateEnvironment

func UpdateEnvironment(id any, name string, settings any) error

func UpdateGroup

func UpdateGroup(id any, fields contracts.Fields) error

func UpdateKey

func UpdateKey(id any, fields contracts.Fields) error

func UpdateProject

func UpdateProject(id int, fields contracts.Fields) (*models.Project, error)

func UpdateShare

func UpdateShare(id any, fields contracts.Fields) error

func UpdateUser

func UpdateUser(id any, fields contracts.Fields) error

func UpdateUserGroup

func UpdateUserGroup(project *models.UserGroup, status string) error

func UpdateUserProject

func UpdateUserProject(project *models.UserProject, status string) error

Types

type DeploymentDetail

type DeploymentDetail struct {
	Deployment  *models.Deployment `json:"deployment"`
	Key         *models.Key        `json:"key"`
	Project     *models.Project    `json:"project"`
	RepoAddress string             `json:"repo_address"`
	ProjectPath string             `json:"project_path"`
	TimeVersion string             `json:"time_version"`
}

type DeploymentParam

type DeploymentParam struct {
	Deployment *models.Deployment
	Commands   contracts.Collection[*models.Command]
}

Jump to

Keyboard shortcuts

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