Documentation ¶
Index ¶
- Constants
- Variables
- func GetAuthMiddleware() (*jwt.GinJWTMiddleware, error)
- func Router(r *gin.Engine)
- func Run() error
- type Chart
- type Cluster
- type HelmUUID
- type JSONEMSGResult
- type JSONERRORResult
- type JSONResult
- type Job
- type Login
- type Namespace
- type RequestArgs
- type TokenResult
- type User
- type Version
- type VersionResult
Constants ¶
const APIVersion string = "v1"
APIVersion API version
const ServiceVersion = "v1.4.5"
ServiceVersion code release version
const ( // USEREXISTED USER EXISTED USEREXISTED string = "User is existed." )
Variables ¶
var AuthMiddleware *jwt.GinJWTMiddleware = nil
AuthMiddleware singleton middleware
Functions ¶
func GetAuthMiddleware ¶
func GetAuthMiddleware() (*jwt.GinJWTMiddleware, error)
GetAuthMiddleware get auth middleware in other file.
func Run ¶
func Run() error
Run starts the API server @title KubeFATE service API @version v1 @description This is a KubeFATE. @contact.name API Support @contact.url https://github.com/FederatedAI/KubeFATE @license.name Apache 2.0 @license.url http://www.apache.org/licenses/LICENSE-2.0.html @BasePath /v1 @securityDefinitions.apikey ApiKeyAuth @in header @name Authorization
Types ¶
type Chart ¶
type Chart struct { }
Chart API struct
func (*Chart) Router ¶
func (c *Chart) Router(r *gin.RouterGroup)
Router is Chart router definition method
type Cluster ¶
type Cluster struct { }
Cluster api of Cluster
func (*Cluster) Router ¶
func (c *Cluster) Router(r *gin.RouterGroup)
Router is Cluster router definition method
type JSONEMSGResult ¶
type JSONEMSGResult struct { Code int `json:"code" example:"401"` Message string `json:"msg" example:"cookie token is empty"` }
JSONEMSGResult 401 Result
type JSONERRORResult ¶
JSONERRORResult error Result
type JSONResult ¶
type JSONResult struct {
Message string `json:"msg" example:"Success"`
}
JSONResult Success Result
type RequestArgs ¶
type RequestArgs struct { Container string `form:"container"` Follow bool `form:"follow"` Previous bool `form:"previous"` SinceSeconds *int64 `form:"since"` SinceTime time.Time `form:"since-time" time_format:"2006-01-02T15:04:05Z07:00"` Timestamps bool `form:"timestamps"` TailLines *int64 `form:"tail"` LimitBytes *int64 `form:"limit-bytes"` InsecureSkipTLSVerifyBackend bool }
RequestArgs Request Args
type TokenResult ¶
type TokenResult struct { Code int `example:"200"` Expire string `example:"2021-01-28T14:48:53+08:00"` Token string `example:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."` }
TokenResult LOgin Result
type User ¶
User model
func (*User) Router ¶
func (u *User) Router(r *gin.RouterGroup)
Router is user router definition method
type Version ¶
type Version struct { }
Version API struct
func (*Version) Router ¶
func (c *Version) Router(r *gin.RouterGroup)
Router is Cluster router definition method
type VersionResult ¶
type VersionResult struct { Version string `example:"v1.3.0"` Message string `json:"msg" example:"getVersion Success"` }
VersionResult GET Version Result