-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from zqq454224016/test
feat: update datasource api
- Loading branch information
Showing
5 changed files
with
1,357 additions
and
958 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,101 @@ | ||
scalar Time | ||
scalar Map | ||
|
||
type Condition { | ||
type: String! | ||
status: String! | ||
lastTransitionTime: Time! | ||
lastSuccessfulTime: Time | ||
reason: String! | ||
message: String | ||
scalar Void | ||
type TypedObjectReference { | ||
apiGroup: String | ||
kind: String! | ||
Name: String! | ||
Namespace: String | ||
} | ||
|
||
type DatasourceStatus { | ||
conditions: [Condition!] | ||
type Endpoint { | ||
url: String | ||
authSecret: TypedObjectReference | ||
insecure: Boolean | ||
} | ||
|
||
type DatasourceSpec { | ||
url: String | ||
authsecret: String | ||
type Oss { | ||
bucket: String | ||
Object: String | ||
} | ||
|
||
type Datasource { | ||
name: String! | ||
namespace: String! | ||
labels: Map | ||
annotations: Map | ||
creator: String | ||
displayName: String! | ||
endpoint: Endpoint | ||
oss: Oss | ||
# 数据源连接状态 | ||
status: Boolean | ||
fileCount: Int | ||
#updateTimestamp: Time! | ||
} | ||
|
||
input TypedObjectReferenceInput { | ||
apiGroup: String | ||
kind: String! | ||
apiVersion: String! | ||
Name: String! | ||
Namespace: String | ||
} | ||
|
||
input EndpointInput { | ||
url: String | ||
authSecret: TypedObjectReferenceInput | ||
insecure: Boolean | ||
} | ||
|
||
input OssInput { | ||
bucket: String | ||
Object: String | ||
} | ||
input CreateDatasourceInput { | ||
name: String! | ||
namespace: String! | ||
labels: Map | ||
annotations: Map | ||
displayName: String! | ||
description: String | ||
endpointinput: EndpointInput | ||
ossinput: OssInput | ||
} | ||
|
||
input UpdateDatasourceInput { | ||
name: String! | ||
namespace: String! | ||
uid: String! | ||
resourceVersion: String! | ||
generation: Int! | ||
creationTimestamp: Time! | ||
deletionTimestamp: Time | ||
labels: Map | ||
annotations: Map | ||
finalizers: [String!] | ||
spec: DatasourceSpec | ||
status: DatasourceStatus | ||
displayName: String! | ||
description: String | ||
} | ||
|
||
input QueryDatasource { | ||
# 有name直接根据name查询 | ||
input DeleteDatasourceInput { | ||
name: String | ||
namespace: String! | ||
labelSelector: String | ||
fieldSelector: String | ||
} | ||
type Query { | ||
ds(input: QueryDatasource!): [Datasource!] | ||
} | ||
|
||
input CreateDatasource { | ||
name: String! | ||
input ListDatasourceInput { | ||
name: String | ||
namespace: String! | ||
url: String | ||
authsecret: String | ||
insecure: Boolean | ||
labelSelector: String | ||
fieldSelector: String | ||
from: Int | ||
size: Int | ||
# 搜索,name,displayname, description字段 | ||
keyword: String | ||
} | ||
|
||
# mutation | ||
type Mutation { | ||
createDatasource(input: CreateDatasource!): Datasource! | ||
createDatasource(input: CreateDatasourceInput!): Datasource! | ||
updateDatasource(input: UpdateDatasourceInput): Datasource! | ||
deleteDatasource(input: DeleteDatasourceInput): Void | ||
} | ||
# query | ||
type Query{ | ||
listDatasources(input: ListDatasourceInput): [Datasource!] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.