Documentation ¶
Index ¶
- Constants
- func ToApiKey(apiKeyDTO ApiKeyDTO) apikey.ApiKey
- func ToBuild(buildDTO BuildDTO) *build.Build
- func ToContainerRegistry(dto ContainerRegistryDTO) *containerregistry.ContainerRegistry
- func ToFileStatus(statusDTO *FileStatusDTO) *project.FileStatus
- func ToGitProviderConfig(gitProviderDTO GitProviderConfigDTO) gitprovider.GitProviderConfig
- func ToGitStatus(statusDTO *GitStatusDTO) *project.GitStatus
- func ToPrebuild(prebuildDTO PrebuildDTO) *config.PrebuildConfig
- func ToProfileData(profileDataDTO ProfileDataDTO) *profiledata.ProfileData
- func ToProject(projectDTO ProjectDTO) *project.Project
- func ToProjectBuild(buildDTO *ProjectBuildDTO) *buildconfig.BuildConfig
- func ToProjectConfig(projectConfigDTO ProjectConfigDTO) *config.ProjectConfig
- func ToProjectState(stateDTO *ProjectStateDTO) *project.ProjectState
- func ToProviderTarget(providerTargetDTO ProviderTargetDTO) *provider.ProviderTarget
- func ToRepository(repoDTO RepositoryDTO) *gitprovider.GitRepository
- func ToWorkspace(workspaceDTO WorkspaceDTO) *workspace.Workspace
- type ApiKeyDTO
- type BuildDTO
- type ContainerRegistryDTO
- type FileStatusDTO
- type GitProviderConfigDTO
- type GitStatusDTO
- type PrebuildDTO
- type ProfileDataDTO
- type ProjectBuildDTO
- type ProjectBuildDevcontainerDTO
- type ProjectConfigDTO
- type ProjectDTO
- type ProjectStateDTO
- type ProviderTargetDTO
- type RepositoryDTO
- type WorkspaceDTO
Constants ¶
View Source
const ProfileDataId = "profile_data"
Variables ¶
This section is empty.
Functions ¶
func ToContainerRegistry ¶ added in v0.13.0
func ToContainerRegistry(dto ContainerRegistryDTO) *containerregistry.ContainerRegistry
func ToFileStatus ¶ added in v0.15.0
func ToFileStatus(statusDTO *FileStatusDTO) *project.FileStatus
func ToGitProviderConfig ¶
func ToGitProviderConfig(gitProviderDTO GitProviderConfigDTO) gitprovider.GitProviderConfig
func ToGitStatus ¶ added in v0.15.0
func ToGitStatus(statusDTO *GitStatusDTO) *project.GitStatus
func ToPrebuild ¶ added in v0.26.0
func ToPrebuild(prebuildDTO PrebuildDTO) *config.PrebuildConfig
func ToProfileData ¶ added in v0.15.0
func ToProfileData(profileDataDTO ProfileDataDTO) *profiledata.ProfileData
func ToProject ¶
func ToProject(projectDTO ProjectDTO) *project.Project
func ToProjectBuild ¶ added in v0.17.0
func ToProjectBuild(buildDTO *ProjectBuildDTO) *buildconfig.BuildConfig
func ToProjectConfig ¶ added in v0.24.0
func ToProjectConfig(projectConfigDTO ProjectConfigDTO) *config.ProjectConfig
func ToProjectState ¶
func ToProjectState(stateDTO *ProjectStateDTO) *project.ProjectState
func ToProviderTarget ¶
func ToProviderTarget(providerTargetDTO ProviderTargetDTO) *provider.ProviderTarget
func ToRepository ¶
func ToRepository(repoDTO RepositoryDTO) *gitprovider.GitRepository
func ToWorkspace ¶
func ToWorkspace(workspaceDTO WorkspaceDTO) *workspace.Workspace
Types ¶
type ApiKeyDTO ¶
type ApiKeyDTO struct { KeyHash string `gorm:"primaryKey"` Type apikey.ApiKeyType Name string `gorm:"uniqueIndex"` }
func ToApiKeyDTO ¶
type BuildDTO ¶ added in v0.25.0
type BuildDTO struct { Id string `json:"id" gorm:"primaryKey"` State string `json:"state"` Image *string `json:"image,omitempty"` User *string `json:"user,omitempty"` ContainerConfig containerconfig.ContainerConfig `gorm:"serializer:json"` BuildConfig *ProjectBuildDTO `json:"build,omitempty" gorm:"serializer:json"` Repository RepositoryDTO `gorm:"serializer:json"` EnvVars map[string]string `json:"envVars" gorm:"serializer:json"` PrebuildId string `json:"prebuildId"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func ToBuildDTO ¶ added in v0.25.0
type ContainerRegistryDTO ¶ added in v0.13.0
type ContainerRegistryDTO struct { Server string `gorm:"primaryKey"` Username string `json:"username"` Password string `json:"password"` }
func ToContainerRegistryDTO ¶ added in v0.13.0
func ToContainerRegistryDTO(cr *containerregistry.ContainerRegistry) ContainerRegistryDTO
type FileStatusDTO ¶ added in v0.15.0
type FileStatusDTO struct { Name string `json:"name"` Extra string `json:"extra"` Staging string `json:"staging"` Worktree string `json:"worktree"` }
func ToFileStatusDTO ¶ added in v0.15.0
func ToFileStatusDTO(status *project.FileStatus) *FileStatusDTO
type GitProviderConfigDTO ¶
type GitProviderConfigDTO struct { Id string `gorm:"primaryKey"` ProviderId string `json:"providerId"` Username string `json:"username"` Token string `json:"token"` BaseApiUrl *string `json:"baseApiUrl,omitempty"` Alias string `gorm:"uniqueIndex" json:"alias"` SigningKey *string `json:"siginingKey,omitempty"` SigningMethod *gitprovider.SigningMethod `json:"siginingMethod,omitempty"` }
func ToGitProviderConfigDTO ¶
func ToGitProviderConfigDTO(gitProvider gitprovider.GitProviderConfig) GitProviderConfigDTO
type GitStatusDTO ¶ added in v0.15.0
type GitStatusDTO struct { CurrentBranch string `json:"currentBranch"` Files []*FileStatusDTO `json:"fileStatus"` BranchPublished bool `json:"branchPublished,omitempty"` Ahead int32 `json:"ahead,omitempty"` Behind int32 `json:"behind,omitempty"` }
func ToGitStatusDTO ¶ added in v0.15.0
func ToGitStatusDTO(status *project.GitStatus) *GitStatusDTO
type PrebuildDTO ¶ added in v0.26.0
type PrebuildDTO struct { Id string `json:"id"` Branch string `json:"branch"` CommitInterval *int `json:"commitInterval,omitempty"` TriggerFiles []string `json:"triggerFiles,omitempty"` Retention int `json:"retention"` }
func ToPrebuildDTO ¶ added in v0.26.0
func ToPrebuildDTO(prebuild *config.PrebuildConfig) PrebuildDTO
type ProfileDataDTO ¶ added in v0.15.0
type ProfileDataDTO struct { Id string `gorm:"primaryKey"` EnvVars map[string]string `gorm:"serializer:json"` }
func ToProfileDataDTO ¶ added in v0.15.0
func ToProfileDataDTO(profileData *profiledata.ProfileData) ProfileDataDTO
type ProjectBuildDTO ¶ added in v0.17.0
type ProjectBuildDTO struct {
Devcontainer *ProjectBuildDevcontainerDTO `json:"devcontainer"`
}
func ToProjectBuildDTO ¶ added in v0.17.0
func ToProjectBuildDTO(build *buildconfig.BuildConfig) *ProjectBuildDTO
type ProjectBuildDevcontainerDTO ¶ added in v0.17.0
type ProjectBuildDevcontainerDTO struct {
FilePath string `json:"filePath"`
}
type ProjectConfigDTO ¶ added in v0.24.0
type ProjectConfigDTO struct { Name string `gorm:"primaryKey"` Image string `json:"image"` User string `json:"user"` Build *ProjectBuildDTO `json:"build,omitempty" gorm:"serializer:json"` RepositoryUrl string `json:"repositoryUrl"` EnvVars map[string]string `json:"envVars" gorm:"serializer:json"` Prebuilds []PrebuildDTO `gorm:"serializer:json"` IsDefault bool `json:"isDefault"` GitProviderConfigId *string `json:"gitProviderConfigId" validate:"optional"` }
func ToProjectConfigDTO ¶ added in v0.24.0
func ToProjectConfigDTO(projectConfig *config.ProjectConfig) ProjectConfigDTO
type ProjectDTO ¶
type ProjectDTO struct { Name string `json:"name"` Image string `json:"image"` User string `json:"user"` Build *ProjectBuildDTO `json:"build,omitempty" gorm:"serializer:json"` Repository RepositoryDTO `json:"repository" gorm:"serializer:json"` WorkspaceId string `json:"workspaceId"` Target string `json:"target"` ApiKey string `json:"apiKey"` State *ProjectStateDTO `json:"state,omitempty" gorm:"serializer:json"` GitProviderConfigId *string `json:"gitProviderConfigId,omitempty"` }
func ToProjectDTO ¶
func ToProjectDTO(project *project.Project) ProjectDTO
type ProjectStateDTO ¶
type ProjectStateDTO struct { UpdatedAt string `json:"updatedAt"` Uptime uint64 `json:"uptime"` GitStatus *GitStatusDTO `json:"gitStatus"` }
func ToProjectStateDTO ¶
func ToProjectStateDTO(state *project.ProjectState) *ProjectStateDTO
type ProviderTargetDTO ¶
type ProviderTargetDTO struct { Name string `json:"name" gorm:"primaryKey"` ProviderName string `json:"providerName"` ProviderLabel *string `json:"providerLabel,omitempty"` ProviderVersion string `json:"providerVersion"` Options string `json:"options"` IsDefault bool `json:"isDefault"` }
func ToProviderTargetDTO ¶
func ToProviderTargetDTO(providerTarget *provider.ProviderTarget) ProviderTargetDTO
type RepositoryDTO ¶
type RepositoryDTO struct { Id string `json:"id"` Url string `json:"url"` Name string `json:"name"` Owner string `json:"owner"` Sha string `json:"sha"` Source string `json:"source"` Branch string `json:"branch"` PrNumber *uint32 `json:"prNumber,omitempty"` Path *string `json:"path,omitempty"` Target gitprovider.CloneTarget `json:"cloneTarget,omitempty"` }
func ToRepositoryDTO ¶
func ToRepositoryDTO(repo *gitprovider.GitRepository) RepositoryDTO
type WorkspaceDTO ¶
type WorkspaceDTO struct { Id string `gorm:"primaryKey"` Name string `json:"name" gorm:"unique"` Target string `json:"target"` ApiKey string `json:"apiKey"` Projects []ProjectDTO `gorm:"serializer:json"` }
func ToWorkspaceDTO ¶
func ToWorkspaceDTO(workspace *workspace.Workspace) WorkspaceDTO
func (WorkspaceDTO) GetProject ¶
func (w WorkspaceDTO) GetProject(name string) (*ProjectDTO, error)
Click to show internal directories.
Click to hide internal directories.