Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type BaseResponse
- type BasicAuth
- type Configuration
- type CrowdApiService
- type ExperimentApiListExperimentsOpts
- type ExperimentApiService
- func (a *ExperimentApiService) AddExperiment(ctx context.Context, body model.Experiment) (Response, error)
- func (a *ExperimentApiService) CloneExperiment(ctx context.Context, experimentId int64) (Response, error)
- func (a *ExperimentApiService) DeleteExperimentById(ctx context.Context, experimentId int64) (Response, error)
- func (a *ExperimentApiService) GetExperimentById(ctx context.Context, experimentId int64) (Response, error)
- func (a *ExperimentApiService) ListExperiments(ctx context.Context, expGroupId int64, ...) (ListExperimentsResponse, error)
- func (a *ExperimentApiService) OfflineExperiment(ctx context.Context, experimentId int64) (Response, error)
- func (a *ExperimentApiService) OnlineExperiment(ctx context.Context, experimentId int64) (Response, error)
- func (a *ExperimentApiService) UpdateExperiment(ctx context.Context, body model.Experiment, experimentId int64) (Response, error)
- type ExperimentGroupApiListExperimentGroupsOpts
- type ExperimentGroupApiService
- func (a *ExperimentGroupApiService) AddExperimentGroup(ctx context.Context, body model.ExperimentGroup) (Response, error)
- func (a *ExperimentGroupApiService) DeleteExperimentGroupById(ctx context.Context, expGroupId int64) (Response, error)
- func (a *ExperimentGroupApiService) GetExperimentGroupById(ctx context.Context, expGroupId int64) (Response, error)
- func (a *ExperimentGroupApiService) ListExperimentGroups(ctx context.Context, layerId int64, ...) (ListExperimentGroupsResponse, error)
- func (a *ExperimentGroupApiService) OfflineExperimentGroup(ctx context.Context, expGroupId int64) (Response, error)
- func (a *ExperimentGroupApiService) OnlineExperimentGroup(ctx context.Context, expGroupId int64) (Response, error)
- func (a *ExperimentGroupApiService) UpdateExperimentGroup(ctx context.Context, body model.ExperimentGroup, expGroupId int64) (Response, error)
- type ExperimentRoomApiCloneExperimentRoomOpts
- type ExperimentRoomApiListExperimentRoomsOpts
- type ExperimentRoomApiService
- func (a *ExperimentRoomApiService) AddExperimentRoom(ctx context.Context, body model.ExperimentRoom) (Response, error)
- func (a *ExperimentRoomApiService) CloneExperimentRoom(ctx context.Context, expRoomId int64, ...) (Response, error)
- func (a *ExperimentRoomApiService) DeleteExperimentRoomById(ctx context.Context, expRoomId int64) (Response, error)
- func (a *ExperimentRoomApiService) GetExperimentRoomById(ctx context.Context, expRoomId int64) (Response, error)
- func (a *ExperimentRoomApiService) ListExperimentRooms(ctx context.Context, environment string, ...) (ListExperimentRoomsResponse, error)
- func (a *ExperimentRoomApiService) OfflineExperimentRoom(ctx context.Context, expRoomId int64) (Response, error)
- func (a *ExperimentRoomApiService) OnlineExperimentRoom(ctx context.Context, expRoomId int64) (Response, error)
- func (a *ExperimentRoomApiService) UpdateExperimentRoom(ctx context.Context, body model.ExperimentRoom, expRoomId int64) (Response, error)
- type FlowCtrlApiListFlowCtrlPlansOpts
- type FlowCtrlApiService
- type GenericSwaggerError
- type LayerApiService
- func (a *LayerApiService) AddLayer(ctx context.Context, body model.Layer) (Response, error)
- func (a *LayerApiService) DeleteLayerById(ctx context.Context, layerId int64) (Response, error)
- func (a *LayerApiService) GetLayerById(ctx context.Context, layerId int64) (Response, error)
- func (a *LayerApiService) ListLayers(ctx context.Context, expRoomId int64) (ListLayersResponse, error)
- func (a *LayerApiService) UpdateLayer(ctx context.Context, body model.Layer, layerId int64) (Response, error)
- type ListCrowdUsersResponse
- type ListExperimentGroupsResponse
- type ListExperimentRoomsResponse
- type ListExperimentsResponse
- type ListFlowCtrlPlansResponse
- type ListLayersResponse
- type ListParamsResponse
- type ListScenesResponse
- type ParamApiGetParamOpts
- type ParamApiService
- func (a *ParamApiService) AddParam(ctx context.Context, body model.Param) (Response, error)
- func (a *ParamApiService) DeleteParam(ctx context.Context, paramId int64) (Response, error)
- func (a *ParamApiService) GetParam(ctx context.Context, sceneId int64, localVarOptionals *ParamApiGetParamOpts) (ListParamsResponse, error)
- func (a *ParamApiService) UpdateParam(ctx context.Context, body model.Param, paramId int64) (Response, error)
- type Response
- type SceneApiService
- func (a *SceneApiService) AddScene(ctx context.Context, body model.Scene) (Response, error)
- func (a *SceneApiService) GetSceneById(ctx context.Context, sceneId int64) (Response, error)
- func (a *SceneApiService) ListAllScenes(ctx context.Context) (ListScenesResponse, error)
- func (a *SceneApiService) UpdateScene(ctx context.Context, body model.Scene, sceneId int64) (Response, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { ExperimentApi *ExperimentApiService // ExperimentGroupApi *ExperimentGroupApiService // ExperimentRoomApi *ExperimentRoomApiService // LayerApi *LayerApiService SceneApi *SceneApiService ParamApi *ParamApiService CrowdApi *CrowdApiService FlowCtrlApi *FlowCtrlApiService // contains filtered or unexported fields }
APIClient manages communication with the Pairec Experiment Restful Api API v1.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type BaseResponse ¶
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Token string `json:"token,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration(host, token string) *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type CrowdApiService ¶
type CrowdApiService service
func (*CrowdApiService) GetCrowdUsersById ¶
func (a *CrowdApiService) GetCrowdUsersById(ctx context.Context, crowdId int64) (ListCrowdUsersResponse, error)
CrowdApiService Get Crowd users By crowd ID Get Crowd users By crowd ID
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sceneId Scene Id to get scene info
@return InlineResponse2001
type ExperimentApiService ¶
type ExperimentApiService service
func (*ExperimentApiService) AddExperiment ¶
func (a *ExperimentApiService) AddExperiment(ctx context.Context, body model.Experiment) (Response, error)
ExperimentApiService Create a new experiment
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body Experiment object that needs to be added
@return Response
func (*ExperimentApiService) CloneExperiment ¶
func (a *ExperimentApiService) CloneExperiment(ctx context.Context, experimentId int64) (Response, error)
ExperimentApiService Clone the experiment to creat new experiment
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param experimentId Experiment Id to get experiment data
@return Response
func (*ExperimentApiService) DeleteExperimentById ¶
func (a *ExperimentApiService) DeleteExperimentById(ctx context.Context, experimentId int64) (Response, error)
ExperimentApiService Delete Experiment By experiment_id when the experiment status is offline
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param experimentId Experiment Id to delete
@return Response
func (*ExperimentApiService) GetExperimentById ¶
func (a *ExperimentApiService) GetExperimentById(ctx context.Context, experimentId int64) (Response, error)
ExperimentApiService Get Experiment By experiment_id Get Experiment By experiment_id
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param experimentId Experiment Id to get experiment data
@return Response
func (*ExperimentApiService) ListExperiments ¶
func (a *ExperimentApiService) ListExperiments(ctx context.Context, expGroupId int64, localVarOptionals *ExperimentApiListExperimentsOpts) (ListExperimentsResponse, error)
func (*ExperimentApiService) OfflineExperiment ¶
func (a *ExperimentApiService) OfflineExperiment(ctx context.Context, experimentId int64) (Response, error)
ExperimentApiService change the status of experiment to offline
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param experimentId Experiment Id to get experiment data
@return Response
func (*ExperimentApiService) OnlineExperiment ¶
func (a *ExperimentApiService) OnlineExperiment(ctx context.Context, experimentId int64) (Response, error)
ExperimentApiService change the status of experiment to online
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param experimentId Experiment Id to get experiment data
@return Response
func (*ExperimentApiService) UpdateExperiment ¶
func (a *ExperimentApiService) UpdateExperiment(ctx context.Context, body model.Experiment, experimentId int64) (Response, error)
ExperimentApiService update experiment data
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body Experiment object that needs to be update
- @param experimentId ID of experiment to update
@return Response
type ExperimentGroupApiService ¶
type ExperimentGroupApiService service
func (*ExperimentGroupApiService) AddExperimentGroup ¶
func (a *ExperimentGroupApiService) AddExperimentGroup(ctx context.Context, body model.ExperimentGroup) (Response, error)
ExperimentGroupApiService Create a new experiment group
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body ExperimentGroup object that needs to be added
@return InlineResponse2008
func (*ExperimentGroupApiService) DeleteExperimentGroupById ¶
func (a *ExperimentGroupApiService) DeleteExperimentGroupById(ctx context.Context, expGroupId int64) (Response, error)
ExperimentGroupApiService Delete ExperimentGroup By exp_group_id
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param expGroupId ExperimentGroup Id to delete
@return ModelApiResponse
func (*ExperimentGroupApiService) GetExperimentGroupById ¶
func (a *ExperimentGroupApiService) GetExperimentGroupById(ctx context.Context, expGroupId int64) (Response, error)
ExperimentGroupApiService Get ExperimentGroup By exp_group_id
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param expGroupId Experiment Id to get experiment data
@return Response
func (*ExperimentGroupApiService) ListExperimentGroups ¶
func (a *ExperimentGroupApiService) ListExperimentGroups(ctx context.Context, layerId int64, localVarOptionals *ExperimentGroupApiListExperimentGroupsOpts) (ListExperimentGroupsResponse, error)
func (*ExperimentGroupApiService) OfflineExperimentGroup ¶
func (a *ExperimentGroupApiService) OfflineExperimentGroup(ctx context.Context, expGroupId int64) (Response, error)
ExperimentGroupApiService change the status of experiment group to offline
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param expGroupId ExperimentGroup Id to get experiment group data
@return Response
func (*ExperimentGroupApiService) OnlineExperimentGroup ¶
func (a *ExperimentGroupApiService) OnlineExperimentGroup(ctx context.Context, expGroupId int64) (Response, error)
ExperimentGroupApiService change the status of experiment group to online
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param expGroupId ExperimentGroup Id to get experiment group data
@return Response
func (*ExperimentGroupApiService) UpdateExperimentGroup ¶
func (a *ExperimentGroupApiService) UpdateExperimentGroup(ctx context.Context, body model.ExperimentGroup, expGroupId int64) (Response, error)
ExperimentGroupApiService update experiment group data
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body ExperimentGroup object that needs to be update
- @param expGroupId ID of experiment group to update
@return Response
type ExperimentRoomApiService ¶
type ExperimentRoomApiService service
func (*ExperimentRoomApiService) AddExperimentRoom ¶
func (a *ExperimentRoomApiService) AddExperimentRoom(ctx context.Context, body model.ExperimentRoom) (Response, error)
ExperimentRoomApiService Create a new experiment_room
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body ExperimentRoom object that needs to be added
@return InlineResponse2002
func (*ExperimentRoomApiService) CloneExperimentRoom ¶
func (a *ExperimentRoomApiService) CloneExperimentRoom(ctx context.Context, expRoomId int64, localVarOptionals *ExperimentRoomApiCloneExperimentRoomOpts) (Response, error)
func (*ExperimentRoomApiService) DeleteExperimentRoomById ¶
func (a *ExperimentRoomApiService) DeleteExperimentRoomById(ctx context.Context, expRoomId int64) (Response, error)
ExperimentRoomApiService Delete ExperimentRoom By scene ID Delete ExperimentRoom By scene ID
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param expRoomId ExperimentRoom Id to delete
@return Response
func (*ExperimentRoomApiService) GetExperimentRoomById ¶
func (a *ExperimentRoomApiService) GetExperimentRoomById(ctx context.Context, expRoomId int64) (Response, error)
ExperimentRoomApiService Get ExperimentRoom By exp_room_id Get ExperimentRoom By exp_room_id
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param expRoomId ExperimentRoom Id to get experiment room data
@return InlineResponse2003
func (*ExperimentRoomApiService) ListExperimentRooms ¶
func (a *ExperimentRoomApiService) ListExperimentRooms(ctx context.Context, environment string, localVarOptionals *ExperimentRoomApiListExperimentRoomsOpts) (ListExperimentRoomsResponse, error)
func (*ExperimentRoomApiService) OfflineExperimentRoom ¶
func (a *ExperimentRoomApiService) OfflineExperimentRoom(ctx context.Context, expRoomId int64) (Response, error)
ExperimentRoomApiService change the status of experiment room to offline
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param expRoomId ExperimentRoom Id to get experiment room data
@return Response
func (*ExperimentRoomApiService) OnlineExperimentRoom ¶
func (a *ExperimentRoomApiService) OnlineExperimentRoom(ctx context.Context, expRoomId int64) (Response, error)
ExperimentRoomApiService change the status of experiment room to online
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param expRoomId ExperimentRoom Id to get experiment room data
@return InlineResponse2004
func (*ExperimentRoomApiService) UpdateExperimentRoom ¶
func (a *ExperimentRoomApiService) UpdateExperimentRoom(ctx context.Context, body model.ExperimentRoom, expRoomId int64) (Response, error)
ExperimentRoomApiService update experiment room data
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body ExperimentRoom object that needs to be update
- @param expRoomId ID of experiment room to update
@return Response
type FlowCtrlApiService ¶
type FlowCtrlApiService service
func (*FlowCtrlApiService) ListFlowCtrlPlans ¶
func (a *FlowCtrlApiService) ListFlowCtrlPlans(ctx context.Context, localVarOptionals *FlowCtrlApiListFlowCtrlPlansOpts) (ListFlowCtrlPlansResponse, error)
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type LayerApiService ¶
type LayerApiService service
func (*LayerApiService) AddLayer ¶
LayerApiService Create a new layer
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body Layer object that needs to be added
@return Response
func (*LayerApiService) DeleteLayerById ¶
LayerApiService Delete layer By layer id
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param layerId Layer Id to delete
@return Response
func (*LayerApiService) GetLayerById ¶
LayerApiService Get layer By layer_id
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param layerId Layer Id to get layer info
@return Response
func (*LayerApiService) ListLayers ¶
func (a *LayerApiService) ListLayers(ctx context.Context, expRoomId int64) (ListLayersResponse, error)
LayerApiService list all Layers By filter condition
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param expRoomId list all layers of the experiment room
@return Response
func (*LayerApiService) UpdateLayer ¶
func (a *LayerApiService) UpdateLayer(ctx context.Context, body model.Layer, layerId int64) (Response, error)
LayerApiService update layer data
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body Layer object that needs to be update
- @param layerId ID of layer to update
@return Response
type ListCrowdUsersResponse ¶
type ListCrowdUsersResponse struct { BaseResponse Data map[string][]string `json:"data,omitempty"` }
type ListExperimentGroupsResponse ¶
type ListExperimentGroupsResponse struct { BaseResponse Data map[string][]*model.ExperimentGroup `json:"data,omitempty"` }
type ListExperimentRoomsResponse ¶
type ListExperimentRoomsResponse struct { BaseResponse Data map[string][]*model.ExperimentRoom `json:"data,omitempty"` }
type ListExperimentsResponse ¶
type ListExperimentsResponse struct { BaseResponse Data map[string][]*model.Experiment `json:"data,omitempty"` }
type ListFlowCtrlPlansResponse ¶
type ListFlowCtrlPlansResponse struct { BaseResponse Data struct { Plans []model.FlowCtrlPlan `json:"plans"` } `json:"data,omitempty"` }
type ListLayersResponse ¶
type ListLayersResponse struct { BaseResponse Data map[string][]*model.Layer `json:"data,omitempty"` }
type ListParamsResponse ¶
type ListParamsResponse struct { BaseResponse Data map[string][]*model.Param `json:"data,omitempty"` }
type ListScenesResponse ¶
type ListScenesResponse struct { BaseResponse Data map[string][]*model.Scene `json:"data,omitempty"` }
type ParamApiGetParamOpts ¶
type ParamApiService ¶
type ParamApiService service
func (*ParamApiService) AddParam ¶
ParamApiService add param data
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body Param object that needs to be add
@return Response
func (*ParamApiService) DeleteParam ¶
ParamApiService Delete Param By scene id
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param paramId param id
@return Response
func (*ParamApiService) GetParam ¶
func (a *ParamApiService) GetParam(ctx context.Context, sceneId int64, localVarOptionals *ParamApiGetParamOpts) (ListParamsResponse, error)
func (*ParamApiService) UpdateParam ¶
func (a *ParamApiService) UpdateParam(ctx context.Context, body model.Param, paramId int64) (Response, error)
ParamApiService update param data
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body Param object that needs to be add
- @param paramId param Id
@return Response
type Response ¶
type Response struct { BaseResponse Data map[string]interface{} `json:"data,omitempty"` }
type SceneApiService ¶
type SceneApiService service
func (*SceneApiService) AddScene ¶
SceneApiService Create a new scene
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body Scene object that needs to be added
@return Response
func (*SceneApiService) GetSceneById ¶
SceneApiService Get Scene By scene ID Get Scene By scene ID
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param sceneId Scene Id to get scene info
@return InlineResponse2001
func (*SceneApiService) ListAllScenes ¶
func (a *SceneApiService) ListAllScenes(ctx context.Context) (ListScenesResponse, error)
SceneApiService Get all scenes Get all scenes
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return InlineResponse2001
func (*SceneApiService) UpdateScene ¶
func (a *SceneApiService) UpdateScene(ctx context.Context, body model.Scene, sceneId int64) (Response, error)
SceneApiService update scene data
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body Scene object that needs to be update
- @param sceneId ID of scene to update
@return ModelApiResponse
Source Files ¶
- api_crowd.go
- api_experiment.go
- api_experiment_group.go
- api_experiment_room.go
- api_flow_ctrl.go
- api_layer.go
- api_param.go
- api_scene.go
- client.go
- configuration.go
- response.go
- response_crowd_users.go
- response_experiment.go
- response_experiment_group.go
- response_experiment_room.go
- response_flow_ctrl_plans.go
- response_layer.go
- response_param.go
- response_scene.go