convert

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignFromHttpResponse

func AssignFromHttpResponse(restyResp *resty.Response, resp interface{}) error

func AssignToHttpRequest

func AssignToHttpRequest(req interface{}, restyRequest *resty.Request)

Types

type CancelRunRequest

type CancelRunRequest struct {
	WorkspaceID  string `path:"workspace_id"`
	SubmissionID string `path:"submission_id"`
	ID           string `path:"id"`
}

func (*CancelRunRequest) ToGRPC

type CancelRunResponse

type CancelRunResponse struct {
}

func (*CancelRunResponse) FromGRPC

func (resp *CancelRunResponse) FromGRPC(protoResp *submissionproto.CancelRunResponse)

type CancelSubmissionRequest

type CancelSubmissionRequest struct {
	WorkspaceID string `path:"workspace_id"`
	ID          string `path:"id"`
}

func (*CancelSubmissionRequest) ToGRPC

type CancelSubmissionResponse

type CancelSubmissionResponse struct {
}

func (*CancelSubmissionResponse) FromGRPC

type CheckSubmissionRequest

type CheckSubmissionRequest struct {
	WorkspaceID string `path:"workspace_id"`
	Name        string `json:"name"`
}

func (*CheckSubmissionRequest) ToGRPC

type CheckSubmissionResponse

type CheckSubmissionResponse struct {
	IsNameExist bool `json:"isNameExist"`
}

func (*CheckSubmissionResponse) FromGRPC

type CreateSubmissionRequest

type CreateSubmissionRequest struct {
	WorkspaceID    string         `path:"workspace_id"`
	Name           string         `json:"name"`
	WorkflowID     string         `json:"workflowID"`
	Description    *string        `json:"description"`
	Type           string         `json:"type"`
	Entity         *Entity        `json:"entity"`
	ExposedOptions ExposedOptions `json:"exposedOptions"`
	InOutMaterial  *InOutMaterial `json:"inOutMaterial"`
}

func (*CreateSubmissionRequest) ToGRPC

type CreateSubmissionResponse

type CreateSubmissionResponse struct {
	ID string `json:"id"`
}

func (*CreateSubmissionResponse) FromGRPC

type CreateWorkflowRequest

type CreateWorkflowRequest struct {
	ID               string `json:"id"`
	WorkspaceID      string `path:"workspace-id"`
	Name             string `json:"name" validate:"required,resName"`
	Description      string `json:"description" validate:"required,workspaceDesc"`
	Language         string `json:"language" validate:"required,oneof=WDL"`
	Source           string `json:"source" validate:"required,oneof=git"`
	Url              string `json:"url" validate:"required"`
	Tag              string `json:"tag" validate:"required"`
	Token            string `json:"token"`
	MainWorkflowPath string `json:"mainWorkflowPath" validate:"required"`
}

func (*CreateWorkflowRequest) ToGRPC

type CreateWorkflowResponse

type CreateWorkflowResponse struct {
	ID string `json:"id"`
}

func (*CreateWorkflowResponse) FromGRPC

type CreateWorkspaceRequest

type CreateWorkspaceRequest struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Storage     *WorkspaceStorage `json:"storage"`
}

func (*CreateWorkspaceRequest) ToGRPC

type CreateWorkspaceResponse

type CreateWorkspaceResponse struct {
	Id string `json:"id"`
}

func (*CreateWorkspaceResponse) FromGRPC

type DataModel

type DataModel struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	RowCount int64  `json:"rowCount"`
	Type     string `json:"type"`
}

type DeleteDataModelRequest

type DeleteDataModelRequest struct {
	ID          string   `path:"id"`
	WorkspaceID string   `path:"workspace_id"`
	Headers     []string `query:"headers,omitempty"`
	RowIDs      []string `query:"rowIDs,omitempty"`
}

func (*DeleteDataModelRequest) ToGRPC

type DeleteDataModelResponse

type DeleteDataModelResponse struct{}

func (*DeleteDataModelResponse) FromGRPC

type DeleteSubmissionRequest

type DeleteSubmissionRequest struct {
	WorkspaceID string `path:"workspace_id"`
	ID          string `path:"id"`
}

func (*DeleteSubmissionRequest) ToGRPC

type DeleteSubmissionResponse

type DeleteSubmissionResponse struct {
}

func (*DeleteSubmissionResponse) FromGRPC

type DeleteWorkflowRequest

type DeleteWorkflowRequest struct {
	ID          string `path:"id"`
	WorkspaceID string `path:"workspace-id"`
}

func (*DeleteWorkflowRequest) ToGRPC

type DeleteWorkflowResponse

type DeleteWorkflowResponse struct {
}

func (*DeleteWorkflowResponse) FromGRPC

type DeleteWorkspaceRequest

type DeleteWorkspaceRequest struct {
	Id string `path:"id"`
}

func (*DeleteWorkspaceRequest) ToGRPC

type DeleteWorkspaceResponse

type DeleteWorkspaceResponse struct {
}

func (*DeleteWorkspaceResponse) FromGRPC

type Entity

type Entity struct {
	DataModelID     string   `json:"dataModelID"`
	DataModelRowIDs []string `json:"dataModelRowIDs"`
	/** 输入配置,json 序列化后的 string
	  采用 json 序列化原因基于以下两点考虑:
	  - thrift/接口设计层面不允许 `Value` 类型不确定
	  - 在 inputs/outputs 层级进行序列化可使得 `bioos-server` 不处理 `Inputs`/`Outputs`(非 `this.xxx` 索引的输入) 就入库/提交给计算引擎,达到透传效果
	*/
	InputsTemplate string `json:"inputsTemplate"`
	/** 输出配置,json 序列化后的 string
	  采用 json 序列化原因基于以下两点考虑:
	  - thrift/接口设计层面不允许 `Value` 类型不确定
	  - 在 inputs/outputs 层级进行序列化可使得 `bioos-server` 不处理 `Inputs`/`Outputs`(非 `this.xxx` 索引的输入) 就入库/提交给计算引擎,达到透传效果
	*/
	OutputsTemplate string `json:"outputsTemplate"`
}

type ExposedOptions

type ExposedOptions struct {
	ReadFromCache bool `json:"readFromCache"`
}

type GetDataModelRequest

type GetDataModelRequest struct {
	WorkspaceID string `path:"workspace_id"`
	ID          string `path:"id"`
}

func (*GetDataModelRequest) ToGRPC

type GetDataModelResponse

type GetDataModelResponse struct {
	DataModel *DataModel `json:"dataModel,omitempty"`
	Headers   []string   `json:"headers"`
}

func (*GetDataModelResponse) FromGRPC

func (resp *GetDataModelResponse) FromGRPC(protoResp *workspaceproto.GetDataModelResponse)

type GetWorkflowFileRequest

type GetWorkflowFileRequest struct {
	ID          string `path:"id"`
	WorkspaceID string `path:"workspace-id"`
	WorkflowID  string `path:"workflow-id"`
}

func (*GetWorkflowFileRequest) ToGRPC

type GetWorkflowFileResponse

type GetWorkflowFileResponse struct {
	File *WorkflowFile `json:"file"`
}

func (*GetWorkflowFileResponse) FromGRPC

type GetWorkflowRequest

type GetWorkflowRequest struct {
	WorkspaceID string `path:"workspace-id"`
	ID          string `path:"id"`
}

func (*GetWorkflowRequest) ToGRPC

type GetWorkflowResponse

type GetWorkflowResponse struct {
	Workflow WorkflowItem `json:"workflow"`
}

func (*GetWorkflowResponse) FromGRPC

func (resp *GetWorkflowResponse) FromGRPC(protoResp *workspaceproto.GetWorkflowResponse)

type GetWorkflowVersionRequest

type GetWorkflowVersionRequest struct {
	ID          string `path:"id"`
	WorkspaceID string `path:"workspace-id"`
	WorkflowID  string `path:"workflow-id"`
}

func (*GetWorkflowVersionRequest) ToGRPC

type GetWorkflowVersionResponse

type GetWorkflowVersionResponse struct {
	Version WorkflowVersion `json:"version"`
}

func (*GetWorkflowVersionResponse) FromGRPC

type Grid

type Grid struct {
	Value []byte `json:"value"`
	Type  string `json:"type"`
}

type ImportWorkspaceRequest

type ImportWorkspaceRequest struct {
	FilePath  string
	MountPath string `query:"mountPath"`
	MountType string `query:"mountType"`
}

type ImportWorkspaceResponse

type ImportWorkspaceResponse struct {
	Id string `json:"id"`
}

func (*ImportWorkspaceResponse) FromGRPC

type InOutMaterial

type InOutMaterial struct {
	InputsMaterial  string `json:"inputsMaterial"`
	OutputsMaterial string `json:"outputsMaterial"`
}

type ListAllDataModelRowIDsRequest

type ListAllDataModelRowIDsRequest struct {
	WorkspaceID string `path:"workspace_id"`
	ID          string `path:"id"`
}

func (*ListAllDataModelRowIDsRequest) ToGRPC

type ListAllDataModelRowIDsResponse

type ListAllDataModelRowIDsResponse struct {
	RowIDs []string `json:"rowIDs"`
}

func (*ListAllDataModelRowIDsResponse) FromGRPC

type ListDataModelRowsRequest

type ListDataModelRowsRequest struct {
	WorkspaceID string   `path:"workspace_id"`
	ID          string   `path:"id"`
	Page        int32    `query:"page"`
	Size        int32    `query:"size"`
	OrderBy     string   `query:"orderBy"`
	SearchWord  string   `query:"searchWord"`
	InSetIDs    []string `query:"inSetIDs"`
	RowIDs      []string `query:"rowIDs"`
}

func (*ListDataModelRowsRequest) ToGRPC

type ListDataModelRowsResponse

type ListDataModelRowsResponse struct {
	Headers []string   `json:"headers"`
	Rows    [][]string `json:"rows"`
	Page    int32      `json:"page"`
	Size    int32      `json:"size"`
	Total   int64      `json:"total"`
}

func (*ListDataModelRowsResponse) FromGRPC

type ListDataModelsRequest

type ListDataModelsRequest struct {
	WorkspaceID string   `path:"workspace_id"`
	Types       []string `query:"types,omitempty"`
	SearchWord  string   `query:"searchWord"`
	IDs         []string `query:"ids,omitempty"`
}

func (*ListDataModelsRequest) ToGRPC

type ListDataModelsResponse

type ListDataModelsResponse struct {
	Items []DataModel `json:"Items"`
}

func (*ListDataModelsResponse) BriefItems

func (resp *ListDataModelsResponse) BriefItems() interface{}

func (*ListDataModelsResponse) FromGRPC

type ListRunsRequest

type ListRunsRequest struct {
	WorkspaceID  string   `path:"workspace_id"`
	SubmissionID string   `path:"submission_id"`
	Page         int      `query:"page"`
	Size         int      `query:"size"`
	OrderBy      string   `query:"orderBy"`
	SearchWord   string   `query:"searchWord"`
	Status       []string `query:"status,omitempty"`
	IDs          []string `query:"ids,omitempty"`
}

func (*ListRunsRequest) ToGRPC

type ListRunsResponse

type ListRunsResponse struct {
	Page  int       `json:"page"`
	Size  int       `json:"size"`
	Total int       `json:"total"`
	Items []RunItem `json:"items"`
}

func (*ListRunsResponse) FromGRPC

func (resp *ListRunsResponse) FromGRPC(protoResp *submissionproto.ListRunsResponse)

type ListSubmissionsRequest

type ListSubmissionsRequest struct {
	WorkspaceID string   `path:"workspace_id"`
	Page        int      `query:"page"`
	Size        int      `query:"size"`
	OrderBy     string   `query:"orderBy"`
	SearchWord  string   `query:"searchWord"`
	WorkflowID  string   `query:"workflowID,omitempty"`
	Status      []string `query:"status,omitempty"`
	IDs         []string `query:"ids,omitempty"`
}

func (*ListSubmissionsRequest) ToGRPC

type ListSubmissionsResponse

type ListSubmissionsResponse struct {
	Page  int              `json:"page"`
	Size  int              `json:"size"`
	Total int              `json:"total"`
	Items []SubmissionItem `json:"items"`
}

func (*ListSubmissionsResponse) BriefItems

func (resp *ListSubmissionsResponse) BriefItems() reflect.Value

func (*ListSubmissionsResponse) FromGRPC

type ListTasksRequest

type ListTasksRequest struct {
	WorkspaceID  string `path:"workspace_id"`
	SubmissionID string `path:"submission_id"`
	RunID        string `path:"run_id"`
	Page         int    `query:"page"`
	Size         int    `query:"size"`
	OrderBy      string `query:"orderBy"`
}

func (*ListTasksRequest) ToGRPC

type ListTasksResponse

type ListTasksResponse struct {
	Page  int        `json:"page"`
	Size  int        `json:"size"`
	Total int        `json:"total"`
	Items []TaskItem `json:"items"`
}

func (*ListTasksResponse) FromGRPC

func (resp *ListTasksResponse) FromGRPC(protoResp *submissionproto.ListTasksResponse)

type ListWorkflowFilesRequest

type ListWorkflowFilesRequest struct {
	Page              int    `query:"page"`
	Size              int    `query:"size"`
	OrderBy           string `query:"orderBy"`
	IDs               string `query:"ids"`
	WorkspaceID       string `path:"workspace-id"`
	WorkflowID        string `path:"workflow-id"`
	WorkflowVersionID string `query:"workflowVersionID,omitempty"`
}

func (*ListWorkflowFilesRequest) ToGRPC

type ListWorkflowFilesResponse

type ListWorkflowFilesResponse struct {
	Page        int             `json:"page"`
	Size        int             `json:"size"`
	Total       int             `json:"total"`
	WorkspaceID string          `json:"workspaceID"`
	WorkflowID  string          `json:"workflowID"`
	Items       []*WorkflowFile `json:"items"`
}

func (*ListWorkflowFilesResponse) FromGRPC

type ListWorkflowVersionsRequest

type ListWorkflowVersionsRequest struct {
	Page        int    `query:"page"`
	Size        int    `query:"size"`
	OrderBy     string `query:"orderBy"`
	IDs         string `query:"ids"`
	WorkspaceID string `path:"workspace-id"`
	WorkflowID  string `path:"workflow-id"`
}

func (*ListWorkflowVersionsRequest) ToGRPC

type ListWorkflowVersionsResponse

type ListWorkflowVersionsResponse struct {
	Page        int               `json:"page"`
	Size        int               `json:"size"`
	Total       int               `json:"total"`
	WorkspaceID string            `json:"workspaceID"`
	WorkflowID  string            `json:"workflowID"`
	Items       []WorkflowVersion `json:"items"`
}

func (*ListWorkflowVersionsResponse) FromGRPC

type ListWorkflowsRequest

type ListWorkflowsRequest struct {
	Page        int    `query:"page"`
	Size        int    `query:"size"`
	OrderBy     string `query:"orderBy"`
	SearchWord  string `query:"searchWord"`
	IDs         string `query:"ids"`
	WorkspaceID string `path:"workspace-id"`
}

func (*ListWorkflowsRequest) ToGRPC

type ListWorkflowsResponse

type ListWorkflowsResponse struct {
	Page  int            `json:"page"`
	Size  int            `json:"size"`
	Total int            `json:"total"`
	Items []WorkflowItem `json:"items"`
}

func (*ListWorkflowsResponse) BriefItems

func (resp *ListWorkflowsResponse) BriefItems() reflect.Value

func (*ListWorkflowsResponse) FromGRPC

func (resp *ListWorkflowsResponse) FromGRPC(protoResp *workspaceproto.ListWorkflowResponse)

type ListWorkspacesRequest

type ListWorkspacesRequest struct {
	Page       int    `query:"page"`
	Size       int    `query:"size"`
	OrderBy    string `query:"orderBy"`
	SearchWord string `query:"searchWord"`
	IDs        string `query:"ids"`
}

func (*ListWorkspacesRequest) ToGRPC

type ListWorkspacesResponse

type ListWorkspacesResponse struct {
	Page  int             `json:"page"`
	Size  int             `json:"size"`
	Total int             `json:"total"`
	Items []WorkspaceItem `json:"items"`
}

func (*ListWorkspacesResponse) BriefItems

func (resp *ListWorkspacesResponse) BriefItems() reflect.Value

func (*ListWorkspacesResponse) FromGRPC

func (resp *ListWorkspacesResponse) FromGRPC(protoResp *workspaceproto.ListWorkspaceResponse)

type NFSWorkspaceStorage

type NFSWorkspaceStorage struct {
	MountPath string `json:"mountPath"`
}

type PatchDataModelRequest

type PatchDataModelRequest struct {
	WorkspaceID string     `path:"workspace_id"`
	Name        string     `json:"name"`
	Async       bool       `json:"async"`
	Headers     []string   `json:"headers"`
	Rows        [][]string `json:"rows"`
}

func (*PatchDataModelRequest) ToGRPC

type PatchDataModelResponse

type PatchDataModelResponse struct {
	ID string `json:"id"`
}

func (*PatchDataModelResponse) FromGRPC

type Row

type Row struct {
	Grid []Grid `json:"grid"`
}

type RunItem

type RunItem struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Status      string  `json:"status"`
	StartTime   int64   `json:"startTime"`
	FinishTime  *int64  `json:"finishTime"`
	Duration    int64   `json:"duration"`
	EngineRunID string  `json:"engineRunID"`
	Inputs      string  `json:"inputs"`
	Outputs     string  `json:"outputs"`
	TaskStatus  Status  `json:"taskStatus"`
	Log         *string `json:"log"`
	Message     *string `json:"message"`
}

type Status

type Status struct {
	Count        int64 `json:"count"`
	Pending      int64 `json:"pending"`
	Succeeded    int64 `json:"succeeded"`
	Failed       int64 `json:"failed"`
	Running      int64 `json:"running"`
	Cancelling   int64 `json:"cancelling"`
	Cancelled    int64 `json:"cancelled"`
	Queued       int64 `json:"queued"`
	Initializing int64 `json:"initializing"`
}

type SubmissionItem

type SubmissionItem struct {
	ID              string               `json:"id"`
	Name            string               `json:"name"`
	Description     *string              `json:"description"`
	Status          string               `json:"status"`
	StartTime       int64                `json:"startTime"`
	FinishTime      *int64               `json:"finishTime"`
	Duration        int64                `json:"duration"`
	WorkflowVersion WorkflowVersionBrief `json:"workflowVersion"`
	RunStatus       Status               `json:"runStatus"`
	Entity          *Entity              `json:"entity"`
	ExposedOptions  ExposedOptions       `json:"exposedOptions"`
	InOutMaterial   *InOutMaterial       `json:"inOutMaterial"`
}

type TaskItem

type TaskItem struct {
	Name       string `json:"name"`
	RunID      string `json:"runID"`
	Status     string `json:"status"`
	StartTime  int64  `json:"startTime"`
	FinishTime *int64 `json:"finishTime"`
	Duration   int64  `json:"duration"`
	Stdout     string `json:"stdout"`
	Stderr     string `json:"stderr"`
}

type UpdateWorkflowRequest

type UpdateWorkflowRequest struct {
	ID          string `path:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	WorkspaceID string `path:"workspace-id"`
}

func (*UpdateWorkflowRequest) ToGRPC

type UpdateWorkflowResponse

type UpdateWorkflowResponse struct {
}

func (*UpdateWorkflowResponse) FromGRPC

type UpdateWorkspaceRequest

type UpdateWorkspaceRequest struct {
	ID          string  `path:"id"`
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
}

func (*UpdateWorkspaceRequest) ToGRPC

type UpdateWorkspaceResponse

type UpdateWorkspaceResponse struct {
}

func (*UpdateWorkspaceResponse) FromGRPC

type WorkflowFile

type WorkflowFile struct {
	ID                string    `json:"id"`
	WorkflowVersionID string    `json:"workflowVersionID"`
	Path              string    `json:"path"`
	Content           string    `json:"content"`
	CreatedAt         time.Time `json:"createdAt"`
	UpdatedAt         time.Time `json:"UpdatedAt"`
}

type WorkflowFileInfo

type WorkflowFileInfo struct {
	ID   string `json:"id"`
	Path string `json:"path"`
}

type WorkflowItem

type WorkflowItem struct {
	ID            string          `json:"id"`
	Name          string          `json:"name"`
	Description   string          `json:"description"`
	LatestVersion WorkflowVersion `json:"latestVersion"`
	CreatedAt     time.Time       `json:"createdAt"`
	UpdatedAt     time.Time       `json:"UpdatedAt"`
}

type WorkflowParam

type WorkflowParam struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Optional bool   `json:"optional"`
	Default  string `json:"default"`
}

type WorkflowVersion

type WorkflowVersion struct {
	ID               string              `json:"id"`
	Status           string              `json:"status"`
	Message          string              `json:"message"`
	Language         string              `json:"language"`
	LanguageVersion  string              `json:"languageVersion"`
	MainWorkflowPath string              `json:"mainWorkflowPath"`
	Inputs           []*WorkflowParam    `json:"inputs"`
	Outputs          []*WorkflowParam    `json:"outputs"`
	Graph            string              `json:"graph"`
	Metadata         map[string]string   `json:"metadata"`
	Source           string              `json:"source"`
	Files            []*WorkflowFileInfo `json:"files"`
	CreatedAt        time.Time           `json:"createdAt"`
	UpdatedAt        time.Time           `json:"UpdatedAt"`
}

type WorkflowVersionBrief

type WorkflowVersionBrief struct {
	ID        string `json:"id"`
	VersionID string `json:"versionID"`
}

type WorkspaceItem

type WorkspaceItem struct {
	Id          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Storage     *WorkspaceStorage `json:"storage"`
	CreateTime  int64             `json:"createTime"`
	UpdateTime  int64             `json:"updateTime"`
}

type WorkspaceStorage

type WorkspaceStorage struct {
	NFS *NFSWorkspaceStorage `json:"nfs,omitempty"`
}

func (WorkspaceStorage) String

func (s WorkspaceStorage) String() string

For table/text output

Jump to

Keyboard shortcuts

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