Documentation
¶
Index ¶
- type CallRequest
- type CallResponse
- type DeleteRequest
- type DeleteResponse
- type DeployRequest
- type DeployResponse
- type DescribeRequest
- type DescribeResponse
- type Func
- type FunctionService
- func (t *FunctionService) Call(request *CallRequest) (*CallResponse, error)
- func (t *FunctionService) Delete(request *DeleteRequest) (*DeleteResponse, error)
- func (t *FunctionService) Deploy(request *DeployRequest) (*DeployResponse, error)
- func (t *FunctionService) Describe(request *DescribeRequest) (*DescribeResponse, error)
- func (t *FunctionService) List(request *ListRequest) (*ListResponse, error)
- type ListRequest
- type ListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallRequest ¶
type CallResponse ¶
type CallResponse struct { // Response body that the function returned Response map[string]interface{} `json:"response"` }
type DeleteRequest ¶
type DeleteResponse ¶
type DeleteResponse struct { }
type DeployRequest ¶
type DeployRequest struct { // entry point, ie. handler name in the source code // if not provided, defaults to the name parameter Entrypoint string `json:"entrypoint"` // environment variables to pass in at runtime EnvVars map[string]string `json:"envVars"` // function name Name string `json:"name"` // project is used for namespacing your functions // optional. defaults to "default". Project string `json:"project"` // github url to repo Repo string `json:"repo"` // runtime/language of the function // eg: php74, // nodejs6, nodejs8, nodejs10, nodejs12, nodejs14, nodejs16 // dotnet3 // java11 // ruby26, ruby27 // go111, go113, go116 // python37, python38, python39 Runtime string `json:"runtime"` // optional subfolder path Subfolder string `json:"subfolder"` }
type DeployResponse ¶
type DeployResponse struct { }
type DescribeRequest ¶
type DescribeResponse ¶
type Func ¶
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" // used to namespace functions Project string `json:"project"` // git repo address Repo string `json:"repo"` // runtime/language of the function // eg: php74, // nodejs6, nodejs8, nodejs10, nodejs12, nodejs14, nodejs16 // dotnet3 // java11 // ruby26, ruby27 // go111, go113, go116 // python37, python38, python39 Runtime string `json:"runtime"` // eg. ACTIVE, DEPLOY_IN_PROGRESS, OFFLINE etc Status string `json:"status"` // subfolder path to entrypoint Subfolder string `json:"subfolder"` }
type FunctionService ¶
type FunctionService struct {
// contains filtered or unexported fields
}
func NewFunctionService ¶
func NewFunctionService(token string) *FunctionService
func (*FunctionService) Call ¶
func (t *FunctionService) Call(request *CallRequest) (*CallResponse, error)
Call a function by name
func (*FunctionService) Delete ¶
func (t *FunctionService) Delete(request *DeleteRequest) (*DeleteResponse, error)
Delete a function by name
func (*FunctionService) Deploy ¶
func (t *FunctionService) Deploy(request *DeployRequest) (*DeployResponse, error)
Deploy a group of functions
func (*FunctionService) Describe ¶
func (t *FunctionService) Describe(request *DescribeRequest) (*DescribeResponse, error)
Get the info for a deployed function
func (*FunctionService) List ¶
func (t *FunctionService) List(request *ListRequest) (*ListResponse, error)
List all the deployed functions
type ListRequest ¶
type ListRequest struct { // optional project name Project string `json:"project"` }
type ListResponse ¶
type ListResponse struct { // List of functions deployed Functions []Func `json:"functions"` }
Click to show internal directories.
Click to hide internal directories.