types

package
v0.0.0-...-89d5bac Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: AGPL-3.0, AGPL-3.0-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Name    string `json:"name"`
	Path    string `json:"path"`
	Version string `json:"version"`
}

type ActivationDoc

type ActivationDoc struct {
	ID       string `json:"_id"`
	Revision string `json:"_rev,omitempty"`
	Updated  int    `json:"updated"`
	Response
}

type ActivationMessage

type ActivationMessage struct {
	Action       Action      `json:"action"`
	ActivationID string      `json:"activationId"`
	Blocking     bool        `json:"blocking"`
	Parameters   interface{} `json:"content"`
	Revision     string      `json:"revision"`
	Controller   struct {
		AsString string `json:"asString"`
	} `json:"rootControllerIndex"`
	TransactionID []interface{} `json:"transid"`
	User          User          `json:"user"`
}

type Annotation

type Annotation struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

type CompletionMessage

type CompletionMessage struct {
	ActivationID  string        `json:"activationId"`
	Invoker       Name          `json:"invoker"`
	SystemError   bool          `json:"isSystemError"`
	TransactionID []interface{} `json:"transid"`
}

type CompletionResponseMessage

type CompletionResponseMessage struct {
	Response      Response      `json:"response"`
	TransactionID []interface{} `json:"transid"`
}

type Executable

type Executable struct {
	Kind string      `json:"kind"`
	Code interface{} `json:"code"`
}

type FunctionDoc

type FunctionDoc struct {
	ID          string        `json:"_id"`
	Revision    string        `json:"_rev"`
	Name        string        `json:"name"`
	Namespace   string        `json:"namespace"`
	Executable  Executable    `json:"exec"`
	Binary      bool          `json:"binary"`
	Limits      Limits        `json:"limits"`
	Parameters  []interface{} `json:"parameters"`
	Annotations []Annotation  `json:"annotations"`
	EntityType  string        `json:"entityType"`
	Publish     bool          `json:"publish"`
	Updated     int           `json:"updated"`
	Version     string        `json:"version"`
}

func (*FunctionDoc) CodeString

func (f *FunctionDoc) CodeString() (string, error)

type Limits

type Limits struct {
	Concurrency int `json:"concurrency"`
	Logs        int `json:"logs"`
	Memory      int `json:"memory"`
	Timeout     int `json:"timeout"`
}

type Name

type Name struct {
	Instance   int    `json:"instance"`
	UniqueName string `json:"uniqueName"`
	UserMemory string `json:"userMemory"`
}

type Response

type Response struct {
	ActivationID string        `json:"activationId"`
	Annotations  []Annotation  `json:"annotations"`
	Name         string        `json:"name"`
	Namespace    string        `json:"namespace"`
	Response     ResponseValue `json:"response"`
	Start        int           `json:"start"`
	End          int           `json:"end"`
	Duration     int           `json:"duration"`
	Subject      string        `json:"subject"`
	EntityType   string        `json:"entityType"`
	Logs         []interface{} `json:"logs"`
	Publish      bool          `json:"publish"`
	Version      string        `json:"version"`
}

func GenerateResponse

func GenerateResponse(activationMessage *ActivationMessage, function *FunctionDoc, result interface{}) Response

type ResponseValue

type ResponseValue struct {
	Result     interface{} `json:"result"`
	StatusCode int         `json:"statusCode"`
}

type User

type User struct {
	AuthKey struct {
		APIKey string `json:"api_key"`
	} `json:"authKey"`
	Limits    interface{} `json:"limits"`
	Namespace struct {
		Name string `json:"name"`
		UUID string `json:"uuid"`
	} `json:"namespace"`
	Rights  []interface{} `json:"rights"`
	Subject string        `json:"subject"`
}

Jump to

Keyboard shortcuts

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