Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadRequest = errors.New("bad-request") ErrNotFound = errors.New("not-found") ErrInternal = errors.New("internal") ErrInvalidAuthorizationHeader = errors.New("invalid-authorization-header") ErrInvalidToken = errors.New("invalid-token") ErrUserNotFound = errors.New("user-not-found") ErrEnvironmentWithNameExists = errors.New("environment-with-name-exists") ErrProjectWithNameExists = errors.New("project-with-name-exists") )
View Source
var (
UserRoleAdmin = "admin"
)
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { ID string `json:"id"` Name string `json:"name"` Image string `json:"image"` ImageID string `json:"imageId"` Status ContainerStatus `json:"status"` Ports []ContainerPort `json:"ports"` Volumes []ContainerVolume `json:"volumes"` }
type ContainerPort ¶
type ContainerPortType ¶
type ContainerPortType string
const ( ContainerPortTypeTCP ContainerPortType = "tcp" ContainerPortTypeUDP ContainerPortType = "udp" )
type ContainerStatus ¶
type ContainerStatus string
const ( ContainerStatusRunning ContainerStatus = "running" ContainerStatusStopped ContainerStatus = "stopped" )
type ContainerVolume ¶
type CreateProjectRequest ¶
type CreateProjectRequest struct { Name string `json:"name"` Description string `json:"description,omitempty"` }
CreateProjectRequest represents a request to create a project.
type Environment ¶
type Environment struct { ID int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` }
Environment represents a project environment.
func EnvironmentFromDB ¶
func EnvironmentFromDB(e *db.Environment) *Environment
EnvironmentFromDB converts a db.ProjectEnvironment to an Environment.
func (*Environment) ToDB ¶
func (e *Environment) ToDB() *db.Environment
ToDB converts an Environment to a db.ProjectEnvironment.
type LoginRequest ¶
type Project ¶
type Project struct { ID int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` CreatedBy int64 `json:"created_by"` CreatedAt time.Time `json:"created_at"` }
Project represents a Diploid project.
func ProjectFromDB ¶
ProjectFromDB converts a db.Project to a Project.
type UpdateProjectRequest ¶
Click to show internal directories.
Click to hide internal directories.