function: Describe + Delete endpoints (#230)

This commit is contained in:
Janos Dobronszki
2021-10-14 10:29:18 +01:00
committed by GitHub
parent a67ecc0e36
commit e6e0b1a84d
12 changed files with 406 additions and 63 deletions

View File

@@ -34,6 +34,12 @@ func (t *FunctionService) Deploy(request *DeployRequest) (*DeployResponse, error
return rsp, t.client.Call("function", "Deploy", request, rsp)
}
//
func (t *FunctionService) Describe(request *DescribeRequest) (*DescribeResponse, error) {
rsp := &DescribeResponse{}
return rsp, t.client.Call("function", "Describe", request, rsp)
}
// List all the deployed functions
func (t *FunctionService) List(request *ListRequest) (*ListResponse, error) {
rsp := &ListResponse{}
@@ -89,10 +95,24 @@ type DeployRequest struct {
type DeployResponse struct {
}
type DescribeRequest struct {
// The name of the function
Name string `json:"name"`
// Optional project name
Project string `json:"project"`
}
type DescribeResponse struct {
Status string `json:"status"`
Timeout string `json:"timeout"`
UpdateTime string `json:"updateTime"`
}
type Func struct {
// name of handler in source code
Entrypoint string `json:"entrypoint"`
// function name
// limitation: must be unique across projects
Name string `json:"name"`
// project of function, optional
// defaults to literal "default"