Documentation
¶
Index ¶
- Variables
- func Create(w http.ResponseWriter, r *http.Request, userid string)
- func Delete(w http.ResponseWriter, r *http.Request, userid, toasterid string)
- func DeleteToasterHelper(w http.ResponseWriter, userid string, toaster *model.Toaster) bool
- func Get(w http.ResponseWriter, r *http.Request, userid, toasterid string)
- func GetBuildResult(w http.ResponseWriter, r *http.Request, userid, buildid string)
- func GetCodeFile(w http.ResponseWriter, r *http.Request, userid, toasterid, filePath string)
- func GetRunningLogs(w http.ResponseWriter, r *http.Request, userid, exeid string)
- func GetToasterPicture(w http.ResponseWriter, r *http.Request, userid, toasterid, lastURLPart string)
- func List(w http.ResponseWriter, r *http.Request, userid string)
- func RunToaster(w http.ResponseWriter, r *http.Request, ...)
- func RunningCount(w http.ResponseWriter, r *http.Request, userid, toasterid string)
- func Update(w http.ResponseWriter, r *http.Request, userid, toasterID string)
- func UpdateToasterPictureRoute(w http.ResponseWriter, r *http.Request, userid, toasterid string)
- func Usage(w http.ResponseWriter, r *http.Request, userid, toasterid string)
- type CreateRequest
- type CreateResponse
- type DelResponse
- type GetBuildResultRequest
- type GetBuildResultResponse
- type GetResponse
- type GetRunningLogsResponse
- type ListResponse
- type RunningCountResponse
- type UpdateRequest
- type UpdateResponse
- type UsageResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsuccessfulBuild = errors.New("build failed")
Functions ¶
func DeleteToasterHelper ¶
func GetBuildResult ¶
func GetBuildResult(w http.ResponseWriter, r *http.Request, userid, buildid string)
GetBuildLogs is called when a build time exceeded at least 15s its result will then be stored for an async retrieval because of web browser HTTP requests timeout
func GetCodeFile ¶
func GetCodeFile(w http.ResponseWriter, r *http.Request, userid, toasterid, filePath string)
func GetRunningLogs ¶
func GetRunningLogs(w http.ResponseWriter, r *http.Request, userid, exeid string)
toasterid is contained within the exeid
func GetToasterPicture ¶
func GetToasterPicture(w http.ResponseWriter, r *http.Request, userid, toasterid, lastURLPart string)
func RunToaster ¶
func RunningCount ¶
func RunningCount(w http.ResponseWriter, r *http.Request, userid, toasterid string)
func UpdateToasterPictureRoute ¶
func UpdateToasterPictureRoute(w http.ResponseWriter, r *http.Request, userid, toasterid string)
Types ¶
type CreateRequest ¶
type CreateRequest struct { FileContents [][]byte `json:"file_contents,omitempty"` FilePaths []string `json:"file_paths,omitempty"` GitURL string `json:"git_url,omitempty"` GitUsername string `json:"git_username,omitempty"` GitAccessToken string `json:"git_access_token,omitempty"` GitPassword string `json:"git_password,omitempty"` GitBranch string `json:"git_branch,omitempty"` Image string `json:"image,omitempty"` // Executed in the root directory of the FilePaths BuildCmd []string `json:"build_command,omitempty"` ExeCmd []string `json:"execution_command,omitempty"` Env []string `json:"environment_variables,omitempty"` JoinableForSec int `json:"joinable_for_seconds,omitempty"` MaxConcurrentJoiners int `json:"max_concurrent_joiners,omitempty"` TimeoutSec int `json:"timeout_seconds,omitempty"` Name string `json:"name,omitempty"` Readme string `json:"readme,omitempty"` Keywords []string `json:"keywords,omitempty"` }
type CreateResponse ¶
type CreateResponse struct { Success bool `json:"success"` BuildLogs []byte `json:"build_logs,omitempty"` // base64 encoded string, see https://pkg.go.dev/encoding/json#Marshal BuildError []byte `json:"build_error,omitempty"` // base64 encoded string, see https://pkg.go.dev/encoding/json#Marshal BuildID string `json:"build_id,omitempty"` Toaster *model.Toaster `json:"toaster,omitempty"` }
type DelResponse ¶
type GetBuildResultRequest ¶
type GetBuildResultRequest struct { }
type GetBuildResultResponse ¶
type GetResponse ¶
type GetRunningLogsResponse ¶
type ListResponse ¶
type RunningCountResponse ¶
type UpdateRequest ¶
type UpdateRequest struct { FileContents [][]byte `json:"file_contents,omitempty"` FilePaths []string `json:"file_paths,omitempty"` GitURL *string `json:"git_url,omitempty"` GitUsername *string `json:"git_username,omitempty"` GitAccessToken *string `json:"git_access_token,omitempty"` GitPassword *string `json:"git_password,omitempty"` GitBranch *string `json:"git_branch,omitempty"` // Executed in the root directory of the FilePaths BuildCmd []string `json:"build_command,omitempty"` ExeCmd []string `json:"execution_command,omitempty"` Env []string `json:"environment_variables,omitempty"` JoinableForSec *int `json:"joinable_for_seconds,omitempty"` MaxConcurrentJoiners *int `json:"max_concurrent_joiners,omitempty"` TimeoutSec *int `json:"timeout_seconds,omitempty"` Name *string `json:"name,omitempty"` Readme *string `json:"readme,omitempty"` Keywords []string `json:"keywords,omitempty"` }
type UpdateResponse ¶
type UpdateResponse struct { Success bool `json:"success,omitempty"` BuildLogs []byte `json:"build_logs,omitempty"` // base64 encoded string, see https://pkg.go.dev/encoding/json#Marshal BuildError []byte `json:"build_error,omitempty"` // base64 encoded string, see https://pkg.go.dev/encoding/json#Marshal BuildID string `json:"build_id,omitempty"` Toaster *model.Toaster `json:"toaster,omitempty"` }
type UsageResponse ¶
type UsageResponse struct { Success bool `json:"success,omitempty"` Usage *usage `json:"usage"` }
Click to show internal directories.
Click to hide internal directories.