Exemple #1
0
func (h *HttpContentRequest) HttpPath() string {
	var base string
	switch h.Type {
	case cjobs.ContentTypeEnvironment:
		base = "/environment/:id"
	default:
		base = "/content/:id"
	}
	if h.Subpath != "" {
		return base + "/" + h.Subpath
	}
	return http.Inline(base, h.ContentRequest.Locator)
}
Exemple #2
0
func (h *HttpRestartContainerRequest) HttpPath() string {
	return http.Inline("/container/:id/restart", string(h.Id))
}
Exemple #3
0
func (h *HttpPatchEnvironmentRequest) HttpPath() string {
	return http.Inline("/environment/:id", string(h.Id))
}
Exemple #4
0
func (h *HttpListContainerPortsRequest) HttpPath() string {
	return http.Inline("/container/:id/ports", string(h.Id))
}
Exemple #5
0
func (h *HttpStopContainerRequest) HttpPath() string {
	return http.Inline("/container/:id/stopped", string(h.Id))
}
Exemple #6
0
func (h *HttpContainerStatusRequest) HttpPath() string {
	return http.Inline("/container/:id/status", string(h.Id))
}
Exemple #7
0
func (h *HttpContainerLogRequest) HttpPath() string {
	return http.Inline("/container/:id/log", string(h.Id))
}
Exemple #8
0
func (h *HttpDeleteContainerRequest) HttpPath() string {
	return http.Inline("/container/:id", string(h.Id))
}
Exemple #9
0
func (h *httpGitArchiveContentRequest) HttpPath() string {
	return http.Inline("/repository/:id/archive/:ref", string(h.RepositoryId), string(h.Ref))
}
Exemple #10
0
func (h *HttpCreateRepositoryRequest) HttpPath() string {
	return http.Inline("/repository/:id", string(h.Id))
}