api

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRouter

func GetRouter(config configuration.Config, command Controller) http.Handler

@title Smart-Service-Repository API @version 0.1 @license.name Apache 2.0 @license.url http://www.apache.org/licenses/LICENSE-2.0.html @BasePath / @securityDefinitions.apikey Bearer @in header @name Authorization

func Start

func Start(ctx context.Context, config configuration.Config, ctrl Controller) (err error)

Types

type BulkModules

type BulkModules struct{}

func (*BulkModules) CreateBulkByProcessInstance

func (this *BulkModules) CreateBulkByProcessInstance(config configuration.Config, router *httprouter.Router, ctrl Controller)

CreateBulkByProcessInstance godoc @Summary create smart-service modules @Description creates smart-service modules; only usable if config.json mongo_url points to a mongodb capable of transactions (replication-set) @Tags modules @Accept json @Produce json @Param id path string true "Process-Instance ID" @Param message body model.SmartServiceModuleInitList true "list of SmartServiceModuleInit" @Success 200 {array} model.SmartServiceModule @Failure 500 @Failure 400 @Failure 401 @Router /instances-by-process-id/{id}/modules/bulk [post]

type BulkModulesInterface

type BulkModulesInterface interface {
	AddModulesForProcessInstance(processInstanceId string, module []model.SmartServiceModuleInit) ([]model.SmartServiceModule, error, int)
}

type Designs

type Designs struct{}

func (*Designs) Create

func (this *Designs) Create(config configuration.Config, router *httprouter.Router, ctrl Controller)

Create godoc @Summary creates a smart-service designs @Description creates a smart-service designs @Tags designs @Accept json @Produce json @Param message body model.SmartServiceDesign true "SmartServiceDesign" @Success 200 {object} model.SmartServiceDesign @Failure 500 @Failure 401 @Router /designs [post]

func (*Designs) Delete

func (this *Designs) Delete(config configuration.Config, router *httprouter.Router, ctrl Controller)

Delete godoc @Summary removes a smart-service designs @Description removes a smart-service designs @Tags designs @Param id path string true "Design ID" @Success 200 @Failure 500 @Failure 401 @Router /designs/{id} [delete]

func (*Designs) Get

func (this *Designs) Get(config configuration.Config, router *httprouter.Router, ctrl Controller)

Get godoc @Summary returns a smart-service designs @Description returns a smart-service designs @Tags designs @Produce json @Param id path string true "Design ID" @Success 200 {object} model.SmartServiceDesign @Failure 500 @Failure 401 @Router /designs/{id} [get]

func (*Designs) List

func (this *Designs) List(config configuration.Config, router *httprouter.Router, ctrl Controller)

List godoc @Summary returns a list of smart-service designs @Description returns a list of smart-service designs @Tags designs @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Param sort query string false "describes the sorting in the form of name.asc" @Param search query string false "optional text search (mongo text index behavior)" @Produce json @Success 200 {array} model.SmartServiceDesign @Failure 500 @Failure 401 @Router /designs [get]

func (*Designs) Update

func (this *Designs) Update(config configuration.Config, router *httprouter.Router, ctrl Controller)

Update godoc @Summary updates a smart-service designs @Description updates a smart-service designs @Tags designs @Accept json @Produce json @Param id path string true "Design ID" @Param message body model.SmartServiceDesign true "SmartServiceDesign" @Success 200 {object} model.SmartServiceDesign @Failure 500 @Failure 400 @Failure 401 @Router /designs/{id} [put]

type DesignsInterface

type DesignsInterface interface {
	ListDesigns(token auth.Token, query model.DesignQueryOptions) ([]model.SmartServiceDesign, error, int)
	GetDesign(token auth.Token, id string) (model.SmartServiceDesign, error, int)
	SetDesign(token auth.Token, element model.SmartServiceDesign) (model.SmartServiceDesign, error, int)
	DeleteDesign(token auth.Token, id string) (error, int)
}

type EndpointMethod

type EndpointMethod = func(config configuration.Config, router *httprouter.Router, ctrl Controller)

type HealthEndpoints

type HealthEndpoints struct{}

func (*HealthEndpoints) HealthCheck

func (this *HealthEndpoints) HealthCheck(config configuration.Config, router *httprouter.Router, ctrl Controller)

HealthCheck godoc @Summary health check @Description checks health and reachability of the service @Tags health @Success 200 @Router / [get]

func (*HealthEndpoints) HealthCheck2

func (this *HealthEndpoints) HealthCheck2(config configuration.Config, router *httprouter.Router, ctrl Controller)

HealthCheck godoc @Summary health check @Description checks health and reachability of the service @Tags health @Success 200 @Router /health [get]

type Instances

type Instances struct{}

func (*Instances) Delete

func (this *Instances) Delete(config configuration.Config, router *httprouter.Router, ctrl Controller)

Delete godoc @Summary removes a smart-service instance with all modules @Description removes a smart-service instance with all modules @Tags instances @Param id path string true "Instance ID" @Param ignore_module_delete_errors query bool false "used if module delete information are invalid" @Success 200 @Failure 500 @Failure 401 @Router /instances/{id} [delete]

func (*Instances) Get

func (this *Instances) Get(config configuration.Config, router *httprouter.Router, ctrl Controller)

Get godoc @Summary returns a smart-service instance @Description returns a smart-service instance @Tags instances @Produce json @Param id path string true "Instance ID" @Success 200 {object} model.SmartServiceInstance @Failure 500 @Failure 401 @Router /instances/{id} [get]

func (*Instances) GetInstanceByProcessId

func (this *Instances) GetInstanceByProcessId(config configuration.Config, router *httprouter.Router, ctrl Controller)

GetInstanceByProcessId godoc @Summary get smart-service instance by process-instance-id @Description get smart-service instance by process-instance-id @Tags instances, process-id @Param id path string true "Process-Instance ID" @Produce json @Success 200 {object} model.SmartServiceInstance @Failure 500 @Failure 401 @Router /instances-by-process-id/{id} [get]

func (*Instances) GetInstanceUserId

func (this *Instances) GetInstanceUserId(config configuration.Config, router *httprouter.Router, ctrl Controller)

GetInstanceUserId godoc @Summary get smart-service instance user-id @Description get smart-service instance user-id @Tags instances, process-id, user-id @Param id path string true "Process-Instance ID" @Produce json @Success 200 @Failure 500 @Failure 401 @Router /instances-by-process-id/{id}/user-id [get]

func (*Instances) GetVariablesMapByProcessInstance

func (this *Instances) GetVariablesMapByProcessInstance(config configuration.Config, router *httprouter.Router, ctrl Controller)

GetVariablesMapByProcessInstance godoc @Summary returns smart-service instance variables as map @Description returns smart-service instance variables as map @Tags instances, variables, process-id @Param id path string true "Process ID" @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Param sort query string false "describes the sorting in the form of name.asc" @Produce json @Success 200 {object} map[string]interface{} @Failure 500 @Failure 401 @Router /instances-by-process-id/{id}/variables-map [get]

func (*Instances) List

func (this *Instances) List(config configuration.Config, router *httprouter.Router, ctrl Controller)

List godoc @Summary returns a list of smart-service instances @Description returns a list of smart-service instances @Tags instances @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Param sort query string false "describes the sorting in the form of name.asc" @Produce json @Success 200 {array} model.SmartServiceInstance @Failure 500 @Failure 401 @Router /instances [get]

func (*Instances) Redeploy

func (this *Instances) Redeploy(config configuration.Config, router *httprouter.Router, ctrl Controller)

Redeploy godoc @Summary updates smart-service instance parameter @Description updates smart-service instance parameter @Tags instances, parameter @Accept json @Produce json @Param release_id query string false "sets new release id if set" @Param id path string true "Instance ID" @Param message body model.SmartServiceParameters true "SmartServiceParameter" @Success 200 {object} model.SmartServiceInstance @Failure 500 @Failure 401 @Router /instances/{id}/parameters [put]

func (*Instances) SetError

func (this *Instances) SetError(config configuration.Config, router *httprouter.Router, ctrl Controller)

SetError godoc @Summary sets smart-service instance error @Description sets smart-service instance error @Tags instances, error @Accept json @Param id path string true "Instance ID" @Param message body string true "error message (json encoded)" @Success 200 @Failure 500 @Failure 401 @Router /instances/{id}/error [put]

func (*Instances) SetErrorByProcessInstance

func (this *Instances) SetErrorByProcessInstance(config configuration.Config, router *httprouter.Router, ctrl Controller)

SetErrorByProcessInstance godoc @Summary sets smart-service instance error @Description sets smart-service instance error @Tags instances, process-id, error @Accept json @Param id path string true "Process-Instance ID" @Param message body string true "error message (json encoded)" @Success 200 @Failure 500 @Failure 401 @Router /instances-by-process-id/{id}/error [put]

func (*Instances) SetVariablesMapByProcessInstance

func (this *Instances) SetVariablesMapByProcessInstance(config configuration.Config, router *httprouter.Router, ctrl Controller)

SetVariablesMapByProcessInstance godoc @Summary sets multiple smart-service instance variable values with a map @Description sets multiple smart-service instance variable values with a map; variables that are already stored but not present in the input map are NOT deleted @Tags instances, variables, process-id @Param id path string true "Process ID" @Accept json @Produce json @Param message body map[string]interface{} true "mapped variable values" @Success 200 @Failure 500 @Failure 400 @Failure 401 @Router /instances-by-process-id/{id}/variables-map [put]

func (*Instances) UpdateInfo

func (this *Instances) UpdateInfo(config configuration.Config, router *httprouter.Router, ctrl Controller)

UpdateInfo godoc @Summary updates smart-service instance parameter @Description updates smart-service instance parameter @Tags instances, parameter @Accept json @Produce json @Param id path string true "Instance ID" @Param message body model.SmartServiceInstanceInfo true "SmartServiceParameter" @Success 200 {object} model.SmartServiceInstance @Failure 500 @Failure 401 @Failure 404 @Router /instances/{id}/info [put]

type InstancesInterface

type InstancesInterface interface {
	CreateInstance(token auth.Token, releaseId string, instance model.SmartServiceInstanceInit) (model.SmartServiceInstance, error, int)
	ListInstances(token auth.Token, query model.InstanceQueryOptions) ([]model.SmartServiceInstance, error, int)
	GetInstance(token auth.Token, id string) (model.SmartServiceInstance, error, int)
	DeleteInstance(token auth.Token, id string, ignoreModuleDeleteError bool) (error, int)
	SetInstanceError(token auth.Token, instanceId string, errMsg string) (error, int)
	SetInstanceErrorByProcessInstanceId(processInstanceId string, errMsg string) (error, int)
	UpdateInstanceInfo(token auth.Token, id string, element model.SmartServiceInstanceInfo) (model.SmartServiceInstance, error, int)
	RedeployInstance(token auth.Token, id string, parameters []model.SmartServiceParameter, releaseId string) (model.SmartServiceInstance, error, int)
	GetInstanceUserIdByProcessInstanceId(processInstanceId string) (string, error, int)
	GetInstanceByProcessInstanceId(processInstanceId string) (model.SmartServiceInstance, error, int)
}

type Maintenance

type Maintenance struct{}

func (*Maintenance) GetMaintenanceProcedure

func (this *Maintenance) GetMaintenanceProcedure(config configuration.Config, router *httprouter.Router, ctrl Controller)

GetMaintenanceProcedure godoc @Summary get smart-service maintenance procedure information @Description get smart-service maintenance procedure information @Tags instances, maintenance-procedures @Param id path string true "Instance ID" @Param public_event_id path string true "public event id of maintenance-procedure" @Produce json @Success 200 {object} model.MaintenanceProcedure @Failure 500 @Failure 401 @Router /instances/{id}/maintenance-procedures/{public_event_id} [get]

func (*Maintenance) GetMaintenanceProcedureParameters

func (this *Maintenance) GetMaintenanceProcedureParameters(config configuration.Config, router *httprouter.Router, ctrl Controller)

GetMaintenanceProcedureParameters godoc @Summary returns parameters of a smart-service maintenance procedure @Description returns parameters of a smart-service maintenance procedure @Tags instances, maintenance-procedures, parameter @Produce json @Param id path string true "Instance ID" @Param public_event_id path string true "public event id of maintenance-procedure" @Success 200 {array} model.SmartServiceExtendedParameter @Failure 500 @Failure 401 @Router /instances/{id}/maintenance-procedures/{public_event_id}/parameters [get]

func (*Maintenance) ListMaintenanceProcedures

func (this *Maintenance) ListMaintenanceProcedures(config configuration.Config, router *httprouter.Router, ctrl Controller)

ListMaintenanceProcedures godoc @Summary lists smart-service maintenance procedure information @Description lists smart-service maintenance procedure information @Tags instances, maintenance-procedures @Param id path string true "Instance ID" @Produce json @Success 200 {array} model.MaintenanceProcedure @Failure 500 @Failure 401 @Router /instances/{id}/maintenance-procedures [get]

func (*Maintenance) Start

func (this *Maintenance) Start(config configuration.Config, router *httprouter.Router, ctrl Controller)

Start godoc @Summary start a smart-service instance maintenance procedure @Description start a smart-service instance maintenance procedure @Tags instances, maintenance-procedures @Accept json @Produce json @Param id path string true "Instance ID" @Param public_event_id path string true "public event id of maintenance-procedure" @Param message body model.SmartServiceParameters true "SmartServiceParameters" @Success 204 @Failure 500 @Failure 401 @Router /instances/{id}/maintenance-procedures/{public_event_id}/start [post]

type MaintenanceInterface

type MaintenanceInterface interface {
	GetMaintenanceProceduresOfInstance(token auth.Token, instanceId string) (maintenanceProcedure []model.MaintenanceProcedure, instance model.SmartServiceInstance, release model.SmartServiceReleaseExtended, err error, code int)
	GetMaintenanceProcedureOfInstance(token auth.Token, instanceId string, publicEventId string) (maintenanceProcedure model.MaintenanceProcedure, instance model.SmartServiceInstance, release model.SmartServiceReleaseExtended, err error, code int)
	GetMaintenanceProcedureParametersOfInstance(token auth.Token, instanceId string, publicEventId string) ([]model.SmartServiceExtendedParameter, error, int)
	StartMaintenanceProcedure(token auth.Token, instanceId string, publicEventId string, parameters model.SmartServiceParameters) (error, int)
}

type Modules

type Modules struct{}

func (*Modules) Create

func (this *Modules) Create(config configuration.Config, router *httprouter.Router, ctrl Controller)

Create godoc @Summary create a smart-service module @Description creates a smart-service module @Tags modules @Accept json @Produce json @Param id path string true "Instance ID" @Param message body model.SmartServiceModuleInit true "SmartServiceModuleInit" @Success 200 {object} model.SmartServiceModule @Failure 500 @Failure 400 @Failure 401 @Router /instances/{id}/modules [post]

func (*Modules) CreateByProcessInstance

func (this *Modules) CreateByProcessInstance(config configuration.Config, router *httprouter.Router, ctrl Controller)

CreateByProcessInstance godoc @Summary create a smart-service module @Description creates a smart-service module @Tags modules @Accept json @Produce json @Param id path string true "Process-Instance ID" @Param message body model.SmartServiceModuleInit true "SmartServiceModuleInit" @Success 200 {object} model.SmartServiceModule @Failure 500 @Failure 400 @Failure 401 @Router /instances-by-process-id/{id}/modules [post]

func (*Modules) Delete

func (this *Modules) Delete(config configuration.Config, router *httprouter.Router, ctrl Controller)

Delete godoc @Summary removes a smart-service module @Description removes a smart-service module @Tags modules @Param id path string true "Module ID" @Param ignore_module_delete_errors query bool false "used if stored module delete information are invalid" @Success 200 @Failure 500 @Failure 401 @Router /modules/{id} [delete]

func (*Modules) Get

func (this *Modules) Get(config configuration.Config, router *httprouter.Router, ctrl Controller)

Get godoc @Summary read a smart-service module @Description read a smart-service module @Tags modules @Param id path string true "Module ID" @Success 200 @Failure 500 @Failure 401 @Router /modules/{id} [get]

func (*Modules) List

func (this *Modules) List(config configuration.Config, router *httprouter.Router, ctrl Controller)

List godoc @Summary returns a list of smart-service models @Description returns a list of smart-service models @Produce json @Tags modules @Param module_type query string false "filter by module type" @Param instance_id query string false "filter by instance id" @Param key query string false "filter by key" @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Success 200 {array} model.SmartServiceModule @Failure 500 @Failure 401 @Router /modules [get]

func (*Modules) ListByProcessInstance

func (this *Modules) ListByProcessInstance(config configuration.Config, router *httprouter.Router, ctrl Controller)

ListByProcessInstance godoc @Summary list smart-service modules of process-instance @Description creates a smart-service module @Tags modules @Produce json @Param key query string false "filter by key" @Param module_type query string false "filter by module type" @Param id path string true "Process-Instance ID" @Success 200 {array} model.SmartServiceModule @Failure 500 @Failure 400 @Failure 401 @Router /instances-by-process-id/{id}/modules [get]

func (*Modules) SetByProcessInstance

func (this *Modules) SetByProcessInstance(config configuration.Config, router *httprouter.Router, ctrl Controller)

SetByProcessInstance godoc @Summary set a smart-service module @Description set a smart-service module; existing modules will be updated, missing modules will be created @Tags modules @Accept json @Produce json @Param id path string true "Process-Instance ID" @Param moduleId path string true "Module ID" @Param message body model.SmartServiceModuleInit true "SmartServiceModuleInit" @Success 200 {object} model.SmartServiceModule @Failure 500 @Failure 400 @Failure 401 @Router /instances-by-process-id/{id}/modules/{moduleId} [put]

type ModulesInterface

type ModulesInterface interface {
	SetModuleForProcessInstance(processInstanceId string, module model.SmartServiceModuleInit, moduleId string) (model.SmartServiceModule, error, int)
	AddModuleForProcessInstance(processInstanceId string, module model.SmartServiceModuleInit) (model.SmartServiceModule, error, int)
	ListModulesOfProcessInstance(processInstanceId string, query model.ModuleQueryOptions) ([]model.SmartServiceModule, error, int)
	AddModule(token auth.Token, instanceId string, module model.SmartServiceModuleInit) (model.SmartServiceModule, error, int)
	ListModules(token auth.Token, query model.ModuleQueryOptions) ([]model.SmartServiceModule, error, int)
	DeleteModule(token auth.Token, id string, ignoreModuleDeleteError bool) (error, int)
	GetModule(token auth.Token, id string) (model.SmartServiceModule, error, int)
}

type ReleaseInterface

type ReleaseInterface interface {
	CreateRelease(token auth.Token, element model.SmartServiceRelease) (model.SmartServiceRelease, error, int)
	DeleteRelease(token auth.Token, id string) (error, int)
	GetRelease(token auth.Token, id string) (model.SmartServiceRelease, error, int)
	GetExtendedRelease(token auth.Token, id string) (model.SmartServiceReleaseExtended, error, int)
	ListReleases(token auth.Token, query model.ReleaseQueryOptions) ([]model.SmartServiceRelease, error, int)
	ListExtendedReleases(token auth.Token, query model.ReleaseQueryOptions) (result []model.SmartServiceReleaseExtended, err error, code int)
	GetReleaseParameter(token auth.Token, id string) ([]model.SmartServiceExtendedParameter, error, int)
	GetReleaseParameterWithoutAuthCheck(token auth.Token, id string) (result []model.SmartServiceExtendedParameter, err error, code int)
}

type Releases

type Releases struct{}

func (*Releases) Create

func (this *Releases) Create(config configuration.Config, router *httprouter.Router, ctrl Controller)

Create godoc @Summary create a smart-service release @Description creates a smart-service release @Tags releases @Accept json @Produce json @Param id path string true "Release ID" @Param message body model.SmartServiceRelease true "SmartServiceRelease" @Success 200 {object} model.SmartServiceRelease @Failure 500 @Failure 401 @Router /releases [post]

func (*Releases) Delete

func (this *Releases) Delete(config configuration.Config, router *httprouter.Router, ctrl Controller)

Delete godoc @Summary removes a smart-service release @Description removes a smart-service release @Tags releases @Accept json @Produce json @Param id path string true "Release ID" @Success 200 @Failure 500 @Failure 400 @Failure 401 @Failure 403 @Router /releases/{id} [delete]

func (*Releases) Get

func (this *Releases) Get(config configuration.Config, router *httprouter.Router, ctrl Controller)

Get godoc @Summary returns a smart-service release @Description returns a smart-service release @Tags releases @Produce json @Param id path string true "Release ID" @Success 200 {object} model.SmartServiceRelease @Failure 500 @Failure 401 @Router /releases/{id} [get]

func (*Releases) GetExtended

func (this *Releases) GetExtended(config configuration.Config, router *httprouter.Router, ctrl Controller)

GetExtended godoc @Summary returns a smart-service release @Description returns a smart-service release @Tags releases @Produce json @Param id path string true "Release ID" @Success 200 {object} model.SmartServiceReleaseExtended @Failure 500 @Failure 401 @Router /extended-releases/{id} [get]

func (*Releases) List

func (this *Releases) List(config configuration.Config, router *httprouter.Router, ctrl Controller)

List godoc @Summary returns a list of smart-service releases @Description returns a list of smart-service releases @Tags releases @Param limit query integer false "limits size of result" @Param offset query integer false "offset to be used in combination with limit" @Param rights query string false "rights needed to see a release; bay be a combination of the following letters: 'rwxa'; default = r; release rights are set with https://github.com/SENERGY-Platform/permission-command" @Param sort query string false "describes the sorting in the form of name.asc" @Param search query string false "optional text search (permission-search/elastic-search behavior)" @Param latest query bool false "returns only newest release of the same design" @Param add-usable-flag query bool false "add 'usable' flag to result, describing if the user hase options for all iot parameters" @Produce json @Success 200 {array} model.SmartServiceRelease @Failure 500 @Failure 401 @Router /releases [get]

func (*Releases) ListExtended

func (this *Releases) ListExtended(config configuration.Config, router *httprouter.Router, ctrl Controller)

ListExtended godoc @Summary returns a list of smart-service releases @Description returns a list of smart-service releases @Tags releases @Param limit query integer false "limits size of result" @Param offset query integer false "offset to be used in combination with limit" @Param rights query string false "rights needed to see a release; bay be a combination of the following letters: 'rwxa'; default = r; release rights are set with https://github.com/SENERGY-Platform/permission-command" @Param sort query string false "describes the sorting in the form of name.asc" @Param search query string false "optional text search (permission-search/elastic-search behavior)" @Param latest query bool false "returns only newest release of the same design" @Param add-usable-flag query bool false "add 'usable' flag to result, describing if the user hase options for all iot parameters" @Produce json @Success 200 {array} model.SmartServiceReleaseExtended @Failure 500 @Failure 401 @Router /extended-releases [get]

func (*Releases) Parameters

func (this *Releases) Parameters(config configuration.Config, router *httprouter.Router, ctrl Controller)

Parameters godoc @Summary returns parameters of a release @Description returns parameters of a release @Tags releases, parameter @Produce json @Param id path string true "Release ID" @Success 200 {array} model.SmartServiceExtendedParameter @Failure 500 @Failure 401 @Router /releases/{id}/parameters [get]

func (*Releases) Start

func (this *Releases) Start(config configuration.Config, router *httprouter.Router, ctrl Controller)

Start godoc @Summary creates a smart-service instance from the release @Description creates a smart-service instance from the release @Tags releases, instances @Accept json @Produce json @Param id path string true "Release ID" @Param message body model.SmartServiceInstanceInit true "SmartServiceInstanceInit" @Success 200 {object} model.SmartServiceInstance @Failure 500 @Failure 401 @Router /releases/{id}/instances [post]

type SwaggerEndpoints

type SwaggerEndpoints struct{}

func (*SwaggerEndpoints) Swagger

func (this *SwaggerEndpoints) Swagger(config configuration.Config, router *httprouter.Router, ctrl Controller)

type Variables

type Variables struct{}

func (*Variables) Delete

func (this *Variables) Delete(config configuration.Config, router *httprouter.Router, ctrl Controller)

Delete godoc @Summary removes a smart-service instance variable value @Description removes a smart-service instance variable value @Tags instances, variables @Param id path string true "Instance ID" @Param name path string true "Variable Name" @Produce json @Success 200 @Failure 500 @Failure 400 @Failure 401 @Router /instances/{id}/variables/{name} [delete]

func (*Variables) Get

func (this *Variables) Get(config configuration.Config, router *httprouter.Router, ctrl Controller)

Get godoc @Summary gets a smart-service instance variable @Description gets a smart-service instance variable @Tags instances, variables @Param id path string true "Instance ID" @Param name path string true "Variable Name" @Produce json @Success 200 {object} model.SmartServiceInstanceVariable @Failure 500 @Failure 400 @Failure 401 @Router /instances/{id}/variables/{name} [get]

func (*Variables) GetValue

func (this *Variables) GetValue(config configuration.Config, router *httprouter.Router, ctrl Controller)

GetValue godoc @Summary gets a smart-service instance variable value @Description gets a smart-service instance variable value @Tags instances, variables @Param id path string true "Instance ID" @Param name path string true "Variable Name" @Produce json @Success 200 {object} interface{} @Failure 500 @Failure 400 @Failure 401 @Router /instances/{id}/variables/{name}/value [get]

func (*Variables) List

func (this *Variables) List(config configuration.Config, router *httprouter.Router, ctrl Controller)

List godoc @Summary returns a list of smart-service instance variables @Description returns a list of smart-service instance variables @Tags instances, variables @Param id path string true "Instance ID" @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Param sort query string false "describes the sorting in the form of name.asc" @Produce json @Success 200 {array} model.SmartServiceInstanceVariable @Failure 500 @Failure 401 @Router /instances/{id}/variables [get]

func (*Variables) Map

func (this *Variables) Map(config configuration.Config, router *httprouter.Router, ctrl Controller)

Map godoc @Summary returns smart-service instance variables as a map @Description returns smart-service instance variables as a map @Tags instances, variables @Param id path string true "Instance ID" @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Param sort query string false "describes the sorting in the form of name.asc" @Produce json @Success 200 {object} map[string]interface{} @Failure 500 @Failure 401 @Router /instances/{id}/variables-map [get]

func (*Variables) Set

func (this *Variables) Set(config configuration.Config, router *httprouter.Router, ctrl Controller)

Set godoc @Summary sets a smart-service instance variable value @Description sets a smart-service instance variable value @Tags instances, variables @Param id path string true "Instance ID" @Param name path string true "Variable Name" @Accept json @Produce json @Param message body interface{} true "value of variable" @Success 200 {object} model.SmartServiceInstanceVariable @Failure 500 @Failure 400 @Failure 401 @Router /instances/{id}/variables/{name} [put]

type VariablesInterface

type VariablesInterface interface {
	SetVariable(token auth.Token, variable model.SmartServiceInstanceVariable) (result model.SmartServiceInstanceVariable, err error, code int)
	GetVariablesMap(token auth.Token, instanceId string, query model.VariableQueryOptions) (map[string]interface{}, error, int)
	ListVariables(token auth.Token, instanceId string, query model.VariableQueryOptions) ([]model.SmartServiceInstanceVariable, error, int)
	DeleteVariable(token auth.Token, instanceId string, name string) (error, int)
	GetVariable(token auth.Token, instanceId string, name string) (model.SmartServiceInstanceVariable, error, int)
	SetVariablesMapOfProcessInstance(processInstanceId string, mappedVariableValues map[string]interface{}) (err error, code int)
	GetVariablesMapOfProcessInstance(processInstanceId string) (map[string]interface{}, error, int)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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