types.go 1.7 KB
Newer Older
J
jeff 已提交
1
/*
H
hongming 已提交
2
Copyright 2019 The KubeSphere Authors.
J
jeff 已提交
3

H
hongming 已提交
4 5 6
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
J
jeff 已提交
7

H
hongming 已提交
8
    http://www.apache.org/licenses/LICENSE-2.0
J
jeff 已提交
9

H
hongming 已提交
10 11 12 13 14
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
J
jeff 已提交
15
*/
H
hongming 已提交
16

J
jeff 已提交
17 18 19
package models

type PageableResponse struct {
H
hongming 已提交
20 21
	Items      []interface{} `json:"items" description:"paging data"`
	TotalCount int           `json:"total_count" description:"total count"`
J
jeff 已提交
22
}
H
hongming 已提交
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

type Workspace struct {
	Group          `json:",inline"`
	Admin          string   `json:"admin,omitempty"`
	Namespaces     []string `json:"namespaces"`
	DevopsProjects []string `json:"devops_projects"`
}

type Group struct {
	Path        string   `json:"path"`
	Name        string   `json:"name"`
	Gid         string   `json:"gid"`
	Members     []string `json:"members"`
	Logo        string   `json:"logo"`
	ChildGroups []string `json:"child_groups"`
	Description string   `json:"description"`
}

type PodInfo struct {
H
hongming 已提交
42 43 44
	Namespace string `json:"namespace" description:"namespace"`
	Pod       string `json:"pod" description:"pod name"`
	Container string `json:"container" description:"container name"`
H
hongming 已提交
45 46
}

47 48 49 50 51
type AuthGrantResponse struct {
	TokenType    string  `json:"token_type,omitempty"`
	Token        string  `json:"access_token" description:"access token"`
	ExpiresIn    float64 `json:"expires_in,omitempty"`
	RefreshToken string  `json:"refresh_token,omitempty"`
H
hongming 已提交
52
}