functions

package module
v0.0.0-...-91b84f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2018 License: Apache-2.0 Imports: 14 Imported by: 19

README

Go API client for functions

The open source serverless platform.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 0.1.28
  • Package version: 0.1.28
  • Build package: class io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

    "./functions"

Documentation for API Endpoints

All URIs are relative to https://127.0.0.1:8080/v1

Class Method HTTP request Description
AppsApi AppsAppDelete Delete /apps/{app} Delete an app.
AppsApi AppsAppGet Get /apps/{app} Get information for a app.
AppsApi AppsAppPatch Patch /apps/{app} Updates an app.
AppsApi AppsGet Get /apps Get all app names.
AppsApi AppsPost Post /apps Post new app
RoutesApi AppsAppRoutesGet Get /apps/{app}/routes Get route list by app name.
RoutesApi AppsAppRoutesPost Post /apps/{app}/routes Create new Route
RoutesApi AppsAppRoutesRouteDelete Delete /apps/{app}/routes/{route} Deletes the route
RoutesApi AppsAppRoutesRouteGet Get /apps/{app}/routes/{route} Gets route by name
RoutesApi AppsAppRoutesRoutePatch Patch /apps/{app}/routes/{route} Update a Route
TasksApi TasksGet Get /tasks Get next task.
VersionApi VersionGet Get /version Get daemon version.

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SSL_SKIP_VERIFY = (os.Getenv("SSL_SKIP_VERIFY") == "true")

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	// contains filtered or unexported fields
}

func (*APIClient) CallAPI

func (c *APIClient) CallAPI(path string, method string,
	postBody interface{},
	headerParams map[string]string,
	queryParams url.Values,
	formParams map[string]string,
	fileName string,
	fileBytes []byte) (*resty.Response, error)

func (*APIClient) ParameterToString

func (c *APIClient) ParameterToString(obj interface{}, collectionFormat string) string

func (*APIClient) SelectHeaderAccept

func (c *APIClient) SelectHeaderAccept(accepts []string) string

func (*APIClient) SelectHeaderContentType

func (c *APIClient) SelectHeaderContentType(contentTypes []string) string

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type App

type App struct {

	// Name of this app. Must be different than the image name. Can ony contain alphanumeric, -, and _.
	Name string `json:"name,omitempty"`

	// Application configuration
	Config map[string]string `json:"config,omitempty"`
}

type AppWrapper

type AppWrapper struct {
	App App `json:"app,omitempty"`

	Error_ ErrorBody `json:"error,omitempty"`
}

type AppsApi

type AppsApi struct {
	Configuration *Configuration
}

func NewAppsApi

func NewAppsApi() *AppsApi

func NewAppsApiWithBasePath

func NewAppsApiWithBasePath(basePath string) *AppsApi

func (AppsApi) AppsAppDelete

func (a AppsApi) AppsAppDelete(app string) (*APIResponse, error)

*

  • Delete an app.
  • Delete an app. *
  • @param app Name of the app.
  • @return void

func (AppsApi) AppsAppGet

func (a AppsApi) AppsAppGet(app string) (*AppWrapper, *APIResponse, error)

*

  • Get information for a app.
  • This gives more details about a app, such as statistics. *
  • @param app name of the app.
  • @return *AppWrapper

func (AppsApi) AppsAppPatch

func (a AppsApi) AppsAppPatch(app string, body AppWrapper) (*AppWrapper, *APIResponse, error)

*

  • Updates an app.
  • You can set app level settings here. *
  • @param app name of the app.
  • @param body App to post.
  • @return *AppWrapper

func (AppsApi) AppsGet

func (a AppsApi) AppsGet() (*AppsWrapper, *APIResponse, error)

*

  • Get all app names.
  • Get a list of all the apps in the system. *
  • @return *AppsWrapper

func (AppsApi) AppsPost

func (a AppsApi) AppsPost(body AppWrapper) (*AppWrapper, *APIResponse, error)

*

  • Post new app
  • Insert a new app *
  • @param body App to post.
  • @return *AppWrapper

type AppsWrapper

type AppsWrapper struct {
	Apps []App `json:"apps,omitempty"`

	Error_ ErrorBody `json:"error,omitempty"`
}

type Configuration

type Configuration struct {
	UserName      string            `json:"userName,omitempty"`
	Password      string            `json:"password,omitempty"`
	APIKeyPrefix  map[string]string `json:"APIKeyPrefix,omitempty"`
	APIKey        map[string]string `json:"APIKey,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	DebugFile     string            `json:"debugFile,omitempty"`
	OAuthToken    string            `json:"oAuthToken,omitempty"`
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	AccessToken   string            `json:"accessToken,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	APIClient     *APIClient
	Transport     *http.Transport
	Timeout       *time.Duration `json:"timeout,omitempty"`
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

func (*Configuration) GetAPIKeyWithPrefix

func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string

func (*Configuration) GetBasicAuthEncodedString

func (c *Configuration) GetBasicAuthEncodedString() string

type ErrorBody

type ErrorBody struct {
	Message string `json:"message,omitempty"`

	Fields string `json:"fields,omitempty"`
}

type ModelError

type ModelError struct {
	Error_ ErrorBody `json:"error,omitempty"`
}

type NewTask

type NewTask struct {

	// Name of Docker image to use. This is optional and can be used to override the image defined at the group level.
	Image string `json:"image,omitempty"`

	// Payload for the task. This is what you pass into each task to make it do something.
	Payload string `json:"payload,omitempty"`
}

type NewTasksWrapper

type NewTasksWrapper struct {
	Tasks []NewTask `json:"tasks,omitempty"`
}

type Route

type Route struct {

	// URL path that will be matched to this route
	Path string `json:"path,omitempty"`

	// Name of Docker image to use in this route. You should include the image tag, which should be a version number, to be more accurate. Can be overridden on a per route basis with route.image.
	Image string `json:"image,omitempty"`

	// Map of http headers that will be sent with the response
	Headers map[string][]string `json:"headers,omitempty"`

	// Max usable memory for this route (MiB).
	Memory int64 `json:"memory,omitempty"`

	// Route type
	Type_ string `json:"type,omitempty"`

	// Payload format sent into function.
	Format string `json:"format,omitempty"`

	// Maximum number of hot containers concurrency
	MaxConcurrency int32 `json:"max_concurrency,omitempty"`

	// Route configuration - overrides application configuration
	Config map[string]string `json:"config,omitempty"`

	// Timeout for executions of this route. Value in Seconds
	Timeout int32 `json:"timeout,omitempty"`
}

type RouteWrapper

type RouteWrapper struct {
	Message string `json:"message,omitempty"`

	Error_ ErrorBody `json:"error,omitempty"`

	Route Route `json:"route,omitempty"`
}

type RoutesApi

type RoutesApi struct {
	Configuration *Configuration
}

func NewRoutesApi

func NewRoutesApi() *RoutesApi

func NewRoutesApiWithBasePath

func NewRoutesApiWithBasePath(basePath string) *RoutesApi

func (RoutesApi) AppsAppRoutesGet

func (a RoutesApi) AppsAppRoutesGet(app string) (*RoutesWrapper, *APIResponse, error)

*

  • Get route list by app name.
  • This will list routes for a particular app. *
  • @param app Name of app for this set of routes.
  • @return *RoutesWrapper

func (RoutesApi) AppsAppRoutesPost

func (a RoutesApi) AppsAppRoutesPost(app string, body RouteWrapper) (*RouteWrapper, *APIResponse, error)

*

  • Create new Route
  • Create a new route in an app, if app doesn't exists, it creates the app *
  • @param app name of the app.
  • @param body One route to post.
  • @return *RouteWrapper

func (RoutesApi) AppsAppRoutesRouteDelete

func (a RoutesApi) AppsAppRoutesRouteDelete(app string, route string) (*APIResponse, error)

*

  • Deletes the route
  • Deletes the route. *
  • @param app Name of app for this set of routes.
  • @param route Route name
  • @return void

func (RoutesApi) AppsAppRoutesRouteGet

func (a RoutesApi) AppsAppRoutesRouteGet(app string, route string) (*RouteWrapper, *APIResponse, error)

*

  • Gets route by name
  • Gets a route by name. *
  • @param app Name of app for this set of routes.
  • @param route Route name
  • @return *RouteWrapper

func (RoutesApi) AppsAppRoutesRoutePatch

func (a RoutesApi) AppsAppRoutesRoutePatch(app string, route string, body RouteWrapper) (*RouteWrapper, *APIResponse, error)

*

  • Update a Route
  • Update a route *
  • @param app name of the app.
  • @param route route path.
  • @param body One route to post.
  • @return *RouteWrapper

type RoutesWrapper

type RoutesWrapper struct {
	Routes []Route `json:"routes,omitempty"`

	Error_ ErrorBody `json:"error,omitempty"`
}

type Task

type Task struct {

	// Name of Docker image to use. This is optional and can be used to override the image defined at the group level.
	Image string `json:"image,omitempty"`

	// Payload for the task. This is what you pass into each task to make it do something.
	Payload string `json:"payload,omitempty"`

	// Group this task belongs to.
	GroupName string `json:"group_name,omitempty"`

	// The error message, if status is 'error'. This is errors due to things outside the task itself. Errors from user code will be found in the log.
	Error_ string `json:"error,omitempty"`

	// Machine usable reason for task being in this state. Valid values for error status are `timeout | killed | bad_exit`. Valid values for cancelled status are `client_request`. For everything else, this is undefined.
	Reason string `json:"reason,omitempty"`

	// Time when task was submitted. Always in UTC.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Time when task started execution. Always in UTC.
	StartedAt time.Time `json:"started_at,omitempty"`

	// Time when task completed, whether it was successul or failed. Always in UTC.
	CompletedAt time.Time `json:"completed_at,omitempty"`

	// If this field is set, then this task is a retry of the ID in this field.
	RetryOf string `json:"retry_of,omitempty"`

	// If this field is set, then this task was retried by the task referenced in this field.
	RetryAt string `json:"retry_at,omitempty"`

	// Env vars for the task. Comes from the ones set on the Group.
	EnvVars map[string]string `json:"env_vars,omitempty"`
}

type TaskWrapper

type TaskWrapper struct {
	Task Task `json:"task,omitempty"`
}

type TasksApi

type TasksApi struct {
	Configuration *Configuration
}

func NewTasksApi

func NewTasksApi() *TasksApi

func NewTasksApiWithBasePath

func NewTasksApiWithBasePath(basePath string) *TasksApi

func (TasksApi) TasksGet

func (a TasksApi) TasksGet() (*TaskWrapper, *APIResponse, error)

*

  • Get next task.
  • Gets the next task in the queue, ready for processing. Consumers should start processing tasks in order. No other consumer can retrieve this task. *
  • @return *TaskWrapper

type TasksWrapper

type TasksWrapper struct {
	Tasks []Task `json:"tasks,omitempty"`

	// Used to paginate results. If this is returned, pass it into the same query again to get more results.
	Cursor string `json:"cursor,omitempty"`

	Error_ ErrorBody `json:"error,omitempty"`
}

type Version

type Version struct {
	Version string `json:"version,omitempty"`
}

type VersionApi

type VersionApi struct {
	Configuration *Configuration
}

func NewVersionApi

func NewVersionApi() *VersionApi

func NewVersionApiWithBasePath

func NewVersionApiWithBasePath(basePath string) *VersionApi

func (VersionApi) VersionGet

func (a VersionApi) VersionGet() (*Version, *APIResponse, error)

*

  • Get daemon version. *
  • @return *Version

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL