Documentation
¶
Index ¶
- type API
- func (e *API) CheckAuth(r *http.Request, w http.ResponseWriter) bool
- func (e *API) Commands() *mux.Router
- func (e *API) ErrorMessage(number int, function string, msg string) []byte
- func (e *API) GetRandomHostPort() uint32
- func (e *API) V0ComposeKillService(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ComposeKillTask(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ComposePush(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ComposeRestartService(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ComposeUpdate(w http.ResponseWriter, r *http.Request)
- func (e *API) V0ShowAllTasks(w http.ResponseWriter, r *http.Request)
- func (e *API) Versions(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶ added in v0.4.0
type API struct {
Config *cfg.Config
Framework *mesosutil.FrameworkConfig
Service cfg.Service
Compose cfg.Compose
Redis *redis.Redis
Vault *vault.Vault
}
API Service include all the current vars and global config
func New ¶ added in v0.4.0
func New(cfg *cfg.Config, frm *mesosutil.FrameworkConfig, vault *vault.Vault, redis *redis.Redis) *API
New will create a new API object
func (*API) ErrorMessage ¶ added in v0.4.0
ErrorMessage will create a message json
func (*API) GetRandomHostPort ¶ added in v0.4.2
GetRandomHostPort Get random hostportnumber
func (*API) V0ComposeKillService ¶ added in v0.4.0
func (e *API) V0ComposeKillService(w http.ResponseWriter, r *http.Request)
V0ComposeKillService will kill a task from a service from a specific project example: curl -X DELETE http://user:password@127.0.0.1:10000/api/compose/v0/{projectname}/{servicename}/{taskid}
func (*API) V0ComposeKillTask ¶ added in v0.4.0
func (e *API) V0ComposeKillTask(w http.ResponseWriter, r *http.Request)
V0ComposeKillTask will kill a task from a service from a specific project example: curl -X DELETE http://user:password@127.0.0.1:10000/api/compose/v0/{projectname}/{servicename}/{taskid}
func (*API) V0ComposePush ¶ added in v0.4.0
func (e *API) V0ComposePush(w http.ResponseWriter, r *http.Request)
V0ComposePush will read and interpret the docker-compose.yml example: curl -X GET http://user:password@127.0.0.1:10000/api/compose/v0 --data-binary @docker-compose.yml
func (*API) V0ComposeRestartService ¶ added in v0.4.0
func (e *API) V0ComposeRestartService(w http.ResponseWriter, r *http.Request)
V0ComposeRestartService will restart a service from a specific project example: curl -X PUT http://user:password@127.0.0.1:10000/api/compose/v0/{projectname}/{servicename}/restart
func (*API) V0ComposeUpdate ¶ added in v0.4.0
func (e *API) V0ComposeUpdate(w http.ResponseWriter, r *http.Request)
V0ComposeUpdate will update the docker-compose.yml example: curl -X GET http://user:password@127.0.0.1:10000/api/compose/v0 --data-binary @docker-compose.yml
func (*API) V0ShowAllTasks ¶ added in v0.4.0
func (e *API) V0ShowAllTasks(w http.ResponseWriter, r *http.Request)
V0ShowAllTasks will print out all tasks example: curl -X GET http://user:password@127.0.0.1:10000/api/compose/v0/tasks