types

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModelFileName is model file name.
	ModelFileName = "model.graphdef"

	// ModelConfigFileName is model config file name.
	ModelConfigFileName = "config.pbtxt"

	// GNNModelNameSuffix is suffix of GNN model name.
	GNNModelNameSuffix = "gnn"

	// MLPModelNameSuffix is suffix of MLP model name.
	MLPModelNameSuffix = "mlp"

	// DefaultTritonPlatform is default triton backend configuration.
	DefaultTritonPlatform = "tensorrt_plan"
)
View Source
const (
	// PersonalAccessTokenScopePreheat represents the personal access token whose scope is preheat.
	PersonalAccessTokenScopePreheat = "preheat"

	// PersonalAccessTokenScopeJob represents the personal access token whose scope is job.
	PersonalAccessTokenScopeJob = "job"
)
View Source
const (
	// SchedulerFeatureSchedule is the schedule feature of scheduler.
	SchedulerFeatureSchedule = "schedule"

	// SchedulerFeaturePreheat is the preheat feature of scheduler.
	SchedulerFeaturePreheat = "preheat"
)
View Source
const (
	// IsBootConfigName represents server is boot.
	IsBootConfigName = "is_boot"
)

Variables

View Source
var (
	// DefaultPersonalAccessTokenScopes is the default scopes of personal access token.
	DefaultPersonalAccessTokenScopes = []string{PersonalAccessTokenScopePreheat, PersonalAccessTokenScopeJob}
)
View Source
var (
	// DefaultSchedulerFeatures is the default features of scheduler.
	DefaultSchedulerFeatures = []string{SchedulerFeatureSchedule, SchedulerFeaturePreheat}
)

Functions

func MakeObjectKeyOfModelConfigFile

func MakeObjectKeyOfModelConfigFile(id string) string

MakeObjectKeyOfModelConfigFile returns object key of model config file.

func MakeObjectKeyOfModelFile

func MakeObjectKeyOfModelFile(id string, version int) string

MakeObjectKeyOfModelFile returns object key of model file.

Types

type AddPermissionForRoleRequest

type AddPermissionForRoleRequest struct {
	rbac.Permission `json:",inline" binding:"required"`
}

type AddRoleForUserParams

type AddRoleForUserParams struct {
	ID   uint   `uri:"id" binding:"required"`
	Role string `uri:"role" binding:"required"`
}

type AddSchedulerClusterToSeedPeerClusterParams

type AddSchedulerClusterToSeedPeerClusterParams struct {
	ID                 uint `uri:"id" binding:"required"`
	SchedulerClusterID uint `uri:"scheduler_cluster_id" binding:"required"`
}

type AddSchedulerToSchedulerClusterParams

type AddSchedulerToSchedulerClusterParams struct {
	ID          uint `uri:"id" binding:"required"`
	SchedulerID uint `uri:"scheduler_id" binding:"required"`
}

type AddSeedPeerToSeedPeerClusterParams

type AddSeedPeerToSeedPeerClusterParams struct {
	ID         uint `uri:"id" binding:"required"`
	SeedPeerID uint `uri:"seed_peer_id" binding:"required"`
}

type ApplicationParams

type ApplicationParams struct {
	ID uint `uri:"id" binding:"required"`
}

type BucketParams

type BucketParams struct {
	ID string `uri:"id" binding:"required"`
}

type ClusterParams

type ClusterParams struct {
	ID uint `uri:"id" binding:"required"`
}

type ConfigParams

type ConfigParams struct {
	ID uint `uri:"id" binding:"required"`
}

type CreateApplicationRequest

type CreateApplicationRequest struct {
	Name     string          `json:"name" binding:"required"`
	URL      string          `json:"url" binding:"required"`
	BIO      string          `json:"bio" binding:"omitempty"`
	Priority *PriorityConfig `json:"priority" binding:"required"`
	UserID   uint            `json:"user_id" binding:"required"`
}

type CreateBucketRequest

type CreateBucketRequest struct {
	Name string `json:"name" binding:"required"`
}

type CreateClusterRequest

type CreateClusterRequest struct {
	Name                   string                        `json:"name" binding:"required"`
	BIO                    string                        `json:"bio" binding:"omitempty"`
	Scopes                 *SchedulerClusterScopes       `json:"scopes" binding:"omitempty"`
	SchedulerClusterConfig *SchedulerClusterConfig       `json:"scheduler_cluster_config" binding:"required"`
	SeedPeerClusterConfig  *SeedPeerClusterConfig        `json:"seed_peer_cluster_config" binding:"required"`
	PeerClusterConfig      *SchedulerClusterClientConfig `json:"peer_cluster_config" binding:"required"`
	IsDefault              bool                          `json:"is_default" binding:"omitempty"`
}

type CreateClusterResponse

type CreateClusterResponse struct {
	ID                     uint                          `json:"id"`
	Name                   string                        `json:"name"`
	BIO                    string                        `json:"bio"`
	Scopes                 *SchedulerClusterScopes       `json:"scopes"`
	SchedulerClusterID     uint                          `json:"scheduler_cluster_id"`
	SeedPeerClusterID      uint                          `json:"seed_peer_cluster_id"`
	SchedulerClusterConfig *SchedulerClusterConfig       `json:"scheduler_cluster_config"`
	SeedPeerClusterConfig  *SeedPeerClusterConfig        `json:"seed_peer_cluster_config"`
	PeerClusterConfig      *SchedulerClusterClientConfig `json:"peer_cluster_config"`
	CreatedAt              time.Time                     `json:"created_at"`
	UpdatedAt              time.Time                     `json:"updated_at"`
	IsDefault              bool                          `json:"is_default"`
}

type CreateConfigRequest

type CreateConfigRequest struct {
	Name   string `json:"name" binding:"required"`
	Value  string `json:"value" binding:"required"`
	BIO    string `json:"bio" binding:"omitempty"`
	UserID uint   `json:"user_id" binding:"required"`
}

type CreateJobRequest

type CreateJobRequest struct {
	BIO                 string         `json:"bio" binding:"omitempty"`
	Type                string         `json:"type" binding:"required"`
	Args                map[string]any `json:"args" binding:"omitempty"`
	Result              map[string]any `json:"result" binding:"omitempty"`
	UserID              uint           `json:"user_id" binding:"omitempty"`
	SeedPeerClusterIDs  []uint         `json:"seed_peer_cluster_ids" binding:"omitempty"`
	SchedulerClusterIDs []uint         `json:"scheduler_cluster_ids" binding:"omitempty"`
}

type CreateOauthRequest

type CreateOauthRequest struct {
	Name         string `json:"name" binding:"required,oneof=github google"`
	BIO          string `json:"bio" binding:"omitempty"`
	ClientID     string `json:"client_id" binding:"required"`
	ClientSecret string `json:"client_secret" binding:"required"`
	RedirectURL  string `json:"redirect_url" binding:"omitempty,url"`
}

type CreatePersonalAccessTokenRequest

type CreatePersonalAccessTokenRequest struct {
	Name      string    `json:"name" binding:"required"`
	BIO       string    `json:"bio" binding:"omitempty"`
	Scopes    []string  `json:"scopes" binding:"omitempty"`
	ExpiredAt time.Time `json:"expired_at" binding:"required"`
	UserID    uint      `json:"user_id" binding:"required"`
}

type CreatePreheatJobRequest

type CreatePreheatJobRequest struct {
	BIO                 string         `json:"bio" binding:"omitempty"`
	Type                string         `json:"type" binding:"required"`
	Args                PreheatArgs    `json:"args" binding:"omitempty"`
	Result              map[string]any `json:"result" binding:"omitempty"`
	UserID              uint           `json:"user_id" binding:"omitempty"`
	SchedulerClusterIDs []uint         `json:"scheduler_cluster_ids" binding:"omitempty"`
}

type CreateRoleRequest

type CreateRoleRequest struct {
	Role        string            `json:"role" binding:"required"`
	Permissions []rbac.Permission `json:"permissions" binding:"required"`
}

type CreateSchedulerClusterRequest

type CreateSchedulerClusterRequest struct {
	Name              string                        `json:"name" binding:"required"`
	BIO               string                        `json:"bio" binding:"omitempty"`
	Config            *SchedulerClusterConfig       `json:"config" binding:"required"`
	ClientConfig      *SchedulerClusterClientConfig `json:"client_config" binding:"required"`
	Scopes            *SchedulerClusterScopes       `json:"scopes" binding:"omitempty"`
	IsDefault         bool                          `json:"is_default" binding:"omitempty"`
	SeedPeerClusterID uint                          `json:"seed_peer_cluster_id" binding:"omitempty"`
}

type CreateSchedulerRequest

type CreateSchedulerRequest struct {
	Hostname           string   `json:"host_name" binding:"required"`
	IDC                string   `json:"idc" binding:"omitempty"`
	Location           string   `json:"location" binding:"omitempty"`
	IP                 string   `json:"ip" binding:"required"`
	Port               int32    `json:"port" binding:"required"`
	Features           []string `json:"features" binding:"omitempty"`
	SchedulerClusterID uint     `json:"scheduler_cluster_id" binding:"required"`
}

type CreateSeedPeerClusterRequest

type CreateSeedPeerClusterRequest struct {
	Name   string                 `json:"name" binding:"required"`
	BIO    string                 `json:"bio" binding:"omitempty"`
	Config *SeedPeerClusterConfig `json:"config" binding:"required"`
}

type CreateSeedPeerRequest

type CreateSeedPeerRequest struct {
	Hostname          string `json:"host_name" binding:"required"`
	Type              string `json:"type" binding:"required,oneof=super strong weak"`
	IDC               string `json:"idc" binding:"omitempty"`
	Location          string `json:"location" binding:"omitempty"`
	IP                string `json:"ip" binding:"required"`
	Port              int32  `json:"port" binding:"required"`
	DownloadPort      int32  `json:"download_port" binding:"required"`
	ObjectStoragePort int32  `json:"object_storage_port" binding:"omitempty"`
	SeedPeerClusterID uint   `json:"seed_peer_cluster_id" binding:"required"`
}

type CreateV1PreheatRequest

type CreateV1PreheatRequest struct {
	Type    string            `json:"type" binding:"required,oneof=image file"`
	URL     string            `json:"url" binding:"required"`
	Filter  string            `json:"filter" binding:"omitempty"`
	Headers map[string]string `json:"headers" binding:"omitempty"`
}

type CreateV1PreheatResponse

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

type DeletePermissionForRoleRequest

type DeletePermissionForRoleRequest struct {
	rbac.Permission `json:",inline" binding:"required"`
}

type DeleteRoleForUserParams

type DeleteRoleForUserParams struct {
	ID   uint   `uri:"id" binding:"required"`
	Role string `uri:"role" binding:"required"`
}

type GetApplicationsQuery

type GetApplicationsQuery struct {
	Name    string `form:"name" binding:"omitempty"`
	Page    int    `form:"page" binding:"omitempty,gte=1"`
	PerPage int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type GetClusterResponse

type GetClusterResponse struct {
	ID                     uint                          `json:"id"`
	Name                   string                        `json:"name"`
	BIO                    string                        `json:"bio"`
	Scopes                 *SchedulerClusterScopes       `json:"scopes"`
	SchedulerClusterID     uint                          `json:"scheduler_cluster_id"`
	SeedPeerClusterID      uint                          `json:"seed_peer_cluster_id"`
	SchedulerClusterConfig *SchedulerClusterConfig       `json:"scheduler_cluster_config"`
	SeedPeerClusterConfig  *SeedPeerClusterConfig        `json:"seed_peer_cluster_config"`
	PeerClusterConfig      *SchedulerClusterClientConfig `json:"peer_cluster_config"`
	CreatedAt              time.Time                     `json:"created_at"`
	UpdatedAt              time.Time                     `json:"updated_at"`
	IsDefault              bool                          `json:"is_default"`
}

type GetClustersQuery

type GetClustersQuery struct {
	Name    string `form:"name" binding:"omitempty"`
	Page    int    `form:"page" binding:"omitempty,gte=1"`
	PerPage int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type GetConfigsQuery

type GetConfigsQuery struct {
	Name    string `form:"name" binding:"omitempty"`
	Value   string `form:"value" binding:"omitempty"`
	UserID  uint   `form:"user_id" binding:"omitempty"`
	Page    int    `form:"page" binding:"omitempty,gte=1"`
	PerPage int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type GetJobsQuery

type GetJobsQuery struct {
	Type    string `form:"type" binding:"omitempty"`
	State   string `form:"state" binding:"omitempty,oneof=PENDING RECEIVED STARTED RETRY SUCCESS FAILURE"`
	UserID  uint   `form:"user_id" binding:"omitempty"`
	Page    int    `form:"page" binding:"omitempty,gte=1"`
	PerPage int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type GetModelsQuery

type GetModelsQuery struct {
	Name        string `json:"name" binding:"omitempty"`
	Type        string `json:"type" binding:"omitempty"`
	Version     string `json:"version"  binding:"omitempty"`
	SchedulerID uint   `json:"scheduler_id" binding:"omitempty"`
	Page        int    `form:"page" binding:"omitempty,gte=1"`
	PerPage     int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type GetOauthsQuery

type GetOauthsQuery struct {
	Page     int    `form:"page" binding:"omitempty,gte=1"`
	PerPage  int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
	Name     string `form:"name" binding:"omitempty,oneof=github google"`
	ClientID string `form:"client_id" binding:"omitempty"`
}

type GetPersonalAccessTokensQuery

type GetPersonalAccessTokensQuery struct {
	Type    string `form:"type" binding:"omitempty"`
	State   string `form:"state" binding:"omitempty,oneof=active inactive"`
	UserID  uint   `form:"user_id" binding:"omitempty"`
	Page    int    `form:"page" binding:"omitempty,gte=1"`
	PerPage int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type GetSchedulerClustersQuery

type GetSchedulerClustersQuery struct {
	Name    string `form:"name" binding:"omitempty"`
	Page    int    `form:"page" binding:"omitempty,gte=1"`
	PerPage int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type GetSchedulersQuery

type GetSchedulersQuery struct {
	Page               int    `form:"page" binding:"omitempty,gte=1"`
	PerPage            int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
	Hostname           string `form:"host_name" binding:"omitempty"`
	IDC                string `form:"idc" binding:"omitempty"`
	Location           string `form:"location" binding:"omitempty"`
	IP                 string `form:"ip" binding:"omitempty"`
	State              string `form:"state" binding:"omitempty,oneof=active inactive"`
	SchedulerClusterID uint   `form:"scheduler_cluster_id" binding:"omitempty"`
}

type GetSeedPeerClustersQuery

type GetSeedPeerClustersQuery struct {
	Name    string `form:"name" binding:"omitempty"`
	Page    int    `form:"page" binding:"omitempty,gte=1"`
	PerPage int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type GetSeedPeersQuery

type GetSeedPeersQuery struct {
	Hostname          string `form:"host_name" binding:"omitempty"`
	Type              string `form:"type" binding:"omitempty,oneof=super strong weak"`
	IDC               string `form:"idc" binding:"omitempty"`
	Location          string `form:"location" binding:"omitempty"`
	IP                string `form:"ip" binding:"omitempty"`
	Port              int32  `form:"port" binding:"omitempty"`
	DownloadPort      int32  `form:"download_port" binding:"omitempty"`
	ObjectStoragePort int32  `form:"object_storage_port" binding:"omitempty"`
	SeedPeerClusterID uint   `form:"seed_peer_cluster_id" binding:"omitempty"`
	Page              int    `form:"page" binding:"omitempty,gte=1"`
	PerPage           int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
	State             string `form:"state" binding:"omitempty,oneof=active inactive"`
}

type GetUsersQuery

type GetUsersQuery struct {
	Name     string `form:"name" binding:"omitempty"`
	Email    string `form:"email" binding:"omitempty"`
	Location string `form:"location" binding:"omitempty"`
	State    string `form:"state" binding:"omitempty"`
	Page     int    `form:"page" binding:"omitempty,gte=1"`
	PerPage  int    `form:"per_page" binding:"omitempty,gte=1,lte=1000"`
}

type GetV1PreheatResponse

type GetV1PreheatResponse struct {
	ID         string `json:"id"`
	Status     string `json:"status"`
	StartTime  string `json:"startTime,omitempty"`
	FinishTime string `json:"finishTime,omitempty"`
}

type JobParams

type JobParams struct {
	ID uint `uri:"id" binding:"required"`
}

type ModelEvaluation

type ModelEvaluation struct {
	Recall    float64 `json:"recall" binding:"omitempty,gte=0,lte=1"`
	Precision float64 `json:"precision" binding:"omitempty,gte=0,lte=1"`
	F1Score   float64 `json:"f1_score" binding:"omitempty,gte=0,lte=1"`
	MSE       float64 `json:"mse" binding:"omitempty,gte=0"`
	MAE       float64 `json:"mae" binding:"omitempty,gte=0"`
}

type ModelParams

type ModelParams struct {
	ID uint `uri:"id" binding:"required"`
}

type OauthParams

type OauthParams struct {
	ID uint `uri:"id" binding:"required"`
}

type OauthSigninCallbackParams

type OauthSigninCallbackParams struct {
	Name string `uri:"name" binding:"required"`
}

type OauthSigninCallbackQuery

type OauthSigninCallbackQuery struct {
	Code string `form:"code" binding:"required"`
}

type OauthSigninParams

type OauthSigninParams struct {
	Name string `uri:"name" binding:"required"`
}

type Peer

type Peer struct {
	ID       string `json:"id" binding:"required"`
	Hostname string `json:"hostname" binding:"required"`
	IP       string `json:"ip" binding:"required"`
}

func (Peer) MarshalBinary

func (p Peer) MarshalBinary() ([]byte, error)

type PersonalAccessTokenParams

type PersonalAccessTokenParams struct {
	ID uint `uri:"id" binding:"required"`
}

type PreheatArgs

type PreheatArgs struct {
	Type    string            `json:"type" binding:"required,oneof=image file"`
	URL     string            `json:"url" binding:"required"`
	Tag     string            `json:"tag" binding:"omitempty"`
	Filter  string            `json:"filter" binding:"omitempty"`
	Headers map[string]string `json:"headers" binding:"omitempty"`
}

type PriorityConfig

type PriorityConfig struct {
	Value *int                `yaml:"value" mapstructure:"value" json:"value" binding:"required,gte=0,lte=20"`
	URLs  []URLPriorityConfig `yaml:"urls" mapstructure:"urls" json:"urls" binding:"omitempty"`
}

type ResetPasswordRequest

type ResetPasswordRequest struct {
	OldPassword string `json:"old_password" binding:"required,min=8,max=20"`
	NewPassword string `json:"new_password" binding:"required,min=8,max=20"`
}

type RoleParams

type RoleParams struct {
	Role string `uri:"role" binding:"required"`
}

type SchedulerClusterClientConfig

type SchedulerClusterClientConfig struct {
	LoadLimit            uint32 `yaml:"loadLimit" mapstructure:"loadLimit" json:"load_limit" binding:"omitempty,gte=1,lte=2000"`
	ConcurrentPieceCount uint32 `` /* 126-byte string literal not displayed */
}

type SchedulerClusterConfig

type SchedulerClusterConfig struct {
	CandidateParentLimit uint32 `` /* 126-byte string literal not displayed */
	FilterParentLimit    uint32 `yaml:"filterParentLimit" mapstructure:"filterParentLimit" json:"filter_parent_limit" binding:"omitempty,gte=10,lte=1000"`
}

type SchedulerClusterParams

type SchedulerClusterParams struct {
	ID uint `uri:"id" binding:"required"`
}

type SchedulerClusterScopes

type SchedulerClusterScopes struct {
	IDC      string   `yaml:"idc" mapstructure:"idc" json:"idc" binding:"omitempty"`
	Location string   `yaml:"location" mapstructure:"location" json:"location" binding:"omitempty"`
	CIDRs    []string `yaml:"cidrs" mapstructure:"cidrs" json:"cidrs" binding:"omitempty"`
}

type SchedulerParams

type SchedulerParams struct {
	ID uint `uri:"id" binding:"required"`
}

type SeedPeerClusterConfig

type SeedPeerClusterConfig struct {
	LoadLimit uint32 `yaml:"loadLimit" mapstructure:"loadLimit" json:"load_limit" binding:"omitempty,gte=1,lte=5000"`
}

type SeedPeerClusterParams

type SeedPeerClusterParams struct {
	ID uint `uri:"id" binding:"required"`
}

type SeedPeerParams

type SeedPeerParams struct {
	ID uint `uri:"id" binding:"required"`
}

type SignInRequest

type SignInRequest struct {
	Name     string `json:"name" binding:"required,min=3,max=10"`
	Password string `json:"password" binding:"required,min=8,max=20"`
}

type SignUpRequest

type SignUpRequest struct {
	SignInRequest
	Email    string `json:"email" binding:"required,email"`
	Phone    string `json:"phone" binding:"omitempty"`
	Avatar   string `json:"avatar" binding:"omitempty"`
	Location string `json:"location" binding:"omitempty"`
	BIO      string `json:"bio" binding:"omitempty"`
}

type URLPriorityConfig

type URLPriorityConfig struct {
	Regex string `yaml:"regex" mapstructure:"regex" json:"regex" binding:"required"`
	Value int    `yaml:"value" mapstructure:"value" json:"value" binding:"required,gte=0,lte=20"`
}

type UpdateApplicationRequest

type UpdateApplicationRequest struct {
	Name     string          `json:"name" binding:"omitempty"`
	URL      string          `json:"url" binding:"omitempty"`
	BIO      string          `json:"bio" binding:"omitempty"`
	Priority *PriorityConfig `json:"priority" binding:"omitempty"`
	UserID   uint            `json:"user_id" binding:"required"`
}

type UpdateClusterRequest

type UpdateClusterRequest struct {
	Name                   string                        `json:"name" binding:"omitempty"`
	BIO                    string                        `json:"bio" binding:"omitempty"`
	Scopes                 *SchedulerClusterScopes       `json:"scopes" binding:"omitempty"`
	SchedulerClusterConfig *SchedulerClusterConfig       `json:"scheduler_cluster_config" binding:"omitempty"`
	SeedPeerClusterConfig  *SeedPeerClusterConfig        `json:"seed_peer_cluster_config" binding:"omitempty"`
	PeerClusterConfig      *SchedulerClusterClientConfig `json:"peer_cluster_config" binding:"omitempty"`
	IsDefault              bool                          `json:"is_default" binding:"omitempty"`
}

type UpdateClusterResponse

type UpdateClusterResponse struct {
	ID                     uint                          `json:"id"`
	Name                   string                        `json:"name"`
	BIO                    string                        `json:"bio"`
	Scopes                 *SchedulerClusterScopes       `json:"scopes"`
	SchedulerClusterID     uint                          `json:"scheduler_cluster_id"`
	SeedPeerClusterID      uint                          `json:"seed_peer_cluster_id"`
	SchedulerClusterConfig *SchedulerClusterConfig       `json:"scheduler_cluster_config"`
	SeedPeerClusterConfig  *SeedPeerClusterConfig        `json:"seed_peer_cluster_config"`
	PeerClusterConfig      *SchedulerClusterClientConfig `json:"peer_cluster_config"`
	CreatedAt              time.Time                     `json:"created_at"`
	UpdatedAt              time.Time                     `json:"updated_at"`
	IsDefault              bool                          `json:"is_default"`
}

type UpdateConfigRequest

type UpdateConfigRequest struct {
	Name   string `json:"name" binding:"omitempty"`
	Value  string `json:"value" binding:"omitempty"`
	BIO    string `json:"bio" binding:"omitempty"`
	UserID uint   `json:"user_id" binding:"omitempty"`
}

type UpdateJobRequest

type UpdateJobRequest struct {
	BIO    string `json:"bio" binding:"omitempty"`
	UserID uint   `json:"user_id" binding:"omitempty"`
}

type UpdateModelRequest

type UpdateModelRequest struct {
	BIO   string `json:"BIO" binding:"omitempty"`
	State string `json:"state" binding:"omitempty,oneof=active"`
}

type UpdateOauthRequest

type UpdateOauthRequest struct {
	Name         string `json:"name" binding:"omitempty,oneof=github google"`
	BIO          string `json:"bio" binding:"omitempty"`
	ClientID     string `json:"client_id" binding:"omitempty"`
	ClientSecret string `json:"client_secret" binding:"omitempty"`
	RedirectURL  string `json:"redirect_url" binding:"omitempty,url"`
}

type UpdatePersonalAccessTokenRequest

type UpdatePersonalAccessTokenRequest struct {
	BIO       string    `json:"bio" binding:"omitempty"`
	Scopes    []string  `json:"scopes" binding:"omitempty"`
	State     string    `json:"state" binding:"omitempty,oneof=active inactive"`
	ExpiredAt time.Time `json:"expired_at" binding:"omitempty"`
	UserID    uint      `json:"user_id" binding:"omitempty"`
}

type UpdateSchedulerClusterRequest

type UpdateSchedulerClusterRequest struct {
	Name              string                        `json:"name" binding:"omitempty"`
	BIO               string                        `json:"bio" binding:"omitempty"`
	Config            *SchedulerClusterConfig       `json:"config" binding:"omitempty"`
	ClientConfig      *SchedulerClusterClientConfig `json:"client_config" binding:"omitempty"`
	Scopes            *SchedulerClusterScopes       `json:"scopes" binding:"omitempty"`
	IsDefault         bool                          `json:"is_default" binding:"omitempty"`
	SeedPeerClusterID uint                          `json:"seed_peer_cluster_id" binding:"omitempty"`
}

type UpdateSchedulerRequest

type UpdateSchedulerRequest struct {
	IDC                string   `json:"idc" binding:"omitempty"`
	Location           string   `json:"location" binding:"omitempty"`
	IP                 string   `json:"ip" binding:"omitempty"`
	Port               int32    `json:"port" binding:"omitempty"`
	SchedulerID        uint     `json:"scheduler_id" binding:"omitempty"`
	Features           []string `json:"features" binding:"omitempty"`
	SchedulerClusterID uint     `json:"scheduler_cluster_id" binding:"omitempty"`
}

type UpdateSeedPeerClusterRequest

type UpdateSeedPeerClusterRequest struct {
	Name   string                 `json:"name" binding:"omitempty"`
	BIO    string                 `json:"bio" binding:"omitempty"`
	Config *SeedPeerClusterConfig `json:"config" binding:"omitempty"`
}

type UpdateSeedPeerRequest

type UpdateSeedPeerRequest struct {
	Type              string `json:"type" binding:"omitempty,oneof=super strong weak"`
	IDC               string `json:"idc" binding:"omitempty"`
	Location          string `json:"location" binding:"omitempty"`
	IP                string `json:"ip" binding:"omitempty"`
	Port              int32  `json:"port" binding:"omitempty"`
	DownloadPort      int32  `json:"download_port" binding:"omitempty"`
	ObjectStoragePort int32  `json:"object_storage_port" binding:"omitempty"`
	SeedPeerClusterID uint   `json:"seed_peer_cluster_id" binding:"omitempty"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	Email    string `json:"email" binding:"omitempty"`
	Phone    string `json:"phone" binding:"omitempty"`
	Avatar   string `json:"avatar" binding:"omitempty"`
	Location string `json:"location" binding:"omitempty"`
	BIO      string `json:"bio" binding:"omitempty"`
}

type UserParams

type UserParams struct {
	ID uint `uri:"id" binding:"required"`
}

type V1PreheatParams

type V1PreheatParams struct {
	ID string `uri:"id" binding:"required"`
}

Jump to

Keyboard shortcuts

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