api

package
v0.0.0-...-61190b0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion string = "v1"

APIVersion API version

View Source
const ServiceVersion = "v1.4.5"

ServiceVersion code release version

View Source
const (

	// USEREXISTED USER EXISTED
	USEREXISTED string = "User is existed."
)

Variables

View Source
var AuthMiddleware *jwt.GinJWTMiddleware = nil

AuthMiddleware singleton middleware

Functions

func GetAuthMiddleware

func GetAuthMiddleware() (*jwt.GinJWTMiddleware, error)

GetAuthMiddleware get auth middleware in other file.

func Router

func Router(r *gin.Engine)

Router of API

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 HelmUUID

type HelmUUID struct {
	HelmUUID string
}

HelmUUID HelmUUID

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

type JSONERRORResult struct {
	Code  int    `json:"code" `
	Error string `json:"error"`
}

JSONERRORResult error Result

type JSONResult

type JSONResult struct {
	Message string `json:"msg" example:"Success"`
}

JSONResult Success Result

type Job

type Job struct {
}

Job API struct

func (*Job) Router

func (j *Job) Router(r *gin.RouterGroup)

Router of Job API

type Login

type Login struct {
	Username string `example:"admin"`
	Password string `example:"admin"`
}

Login body

type Namespace

type Namespace struct {
}

Namespace API struct

func (*Namespace) Router

func (j *Namespace) Router(r *gin.RouterGroup)

Router of Namespace API

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

type User modules.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

Jump to

Keyboard shortcuts

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