Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToProject ¶
func ToProject(projectDTO ProjectDTO) *types.Project
func ToRepository ¶
func ToRepository(repoDTO RepositoryDTO) *types.Repository
func ToWorkspace ¶
func ToWorkspace(workspaceDTO WorkspaceDTO) *types.Workspace
Types ¶
type ProjectDTO ¶
type ProjectDTO struct { Name string `json:"name"` Repository RepositoryDTO `json:"repository"` WorkspaceId string `json:"workspaceId"` ApiKey string `json:"apiKey"` Target string `json:"target"` }
func ToProjectDTO ¶
func ToProjectDTO(project *types.Project, workspace *types.Workspace) ProjectDTO
type RepositoryDTO ¶
type RepositoryDTO struct { Url string `json:"url"` Branch *string `default:"main" json:"branch,omitempty"` SHA *string `json:"sha,omitempty"` Owner *string `json:"owner,omitempty"` PrNumber *uint32 `json:"prNumber,omitempty"` Source *string `json:"source,omitempty"` Path *string `json:"path,omitempty"` }
func ToRepositoryDTO ¶
func ToRepositoryDTO(repo *types.Repository) RepositoryDTO
type WorkspaceDTO ¶
type WorkspaceDTO struct { Id string `gorm:"primaryKey"` Name string `json:"name" gorm:"unique"` Target string `json:"target"` Projects []ProjectDTO `gorm:"serializer:json"` }
func ToWorkspaceDTO ¶
func ToWorkspaceDTO(workspace *types.Workspace) WorkspaceDTO
func (WorkspaceDTO) GetProject ¶
func (w WorkspaceDTO) GetProject(name string) (*ProjectDTO, error)
Click to show internal directories.
Click to hide internal directories.