Documentation
¶
Index ¶
- Constants
- Variables
- type AddPermissionForRoleRequest
- type AddRoleForUserParams
- type AddSchedulerClusterToSeedPeerClusterParams
- type AddSchedulerToSchedulerClusterParams
- type AddSeedPeerToSeedPeerClusterParams
- type ApplicationParams
- type BucketParams
- type ClusterParams
- type ConfigParams
- type CreateApplicationRequest
- type CreateAuditRequest
- type CreateBucketRequest
- type CreateClusterRequest
- type CreateClusterResponse
- type CreateConfigRequest
- type CreateDeleteTaskJobRequest
- type CreateGCJobRequest
- type CreateGetImageDistributionJobRequest
- type CreateGetImageDistributionJobResponse
- type CreateGetTaskJobRequest
- type CreateJobRequest
- type CreateOauthRequest
- type CreatePeerRequest
- type CreatePersonalAccessTokenRequest
- type CreatePreheatJobRequest
- type CreateRoleRequest
- type CreateSchedulerClusterRequest
- type CreateSchedulerRequest
- type CreateSeedPeerClusterRequest
- type CreateSeedPeerRequest
- type CreateSyncPeersJobRequest
- type CreateV1PreheatRequest
- type CreateV1PreheatResponse
- type DeletePermissionForRoleRequest
- type DeleteRoleForUserParams
- type DeleteTaskArgs
- type DestroyPersistentCacheTaskQuery
- type GCArgs
- type GetApplicationsQuery
- type GetAuditsQuery
- type GetClusterResponse
- type GetClustersQuery
- type GetConfigsQuery
- type GetImageDistributionArgs
- type GetJobsQuery
- type GetOauthsQuery
- type GetPeersQuery
- type GetPersistentCacheTaskQuery
- type GetPersistentCacheTasksQuery
- type GetPersonalAccessTokensQuery
- type GetSchedulerClustersQuery
- type GetSchedulersQuery
- type GetSeedPeerClustersQuery
- type GetSeedPeersQuery
- type GetTaskArgs
- type GetUsersQuery
- type GetV1PreheatResponse
- type Image
- type JobParams
- type Layer
- type OauthParams
- type OauthSigninCallbackParams
- type OauthSigninCallbackQuery
- type OauthSigninParams
- type Peer
- type PeerParams
- type PersistentCacheHost
- type PersistentCachePeer
- type PersistentCacheTask
- type PersistentCacheTaskParams
- type PersonalAccessTokenParams
- type PreheatArgs
- type PriorityConfig
- type ResetPasswordRequest
- type RoleParams
- type SchedulerClusterClientConfig
- type SchedulerClusterConfig
- type SchedulerClusterParams
- type SchedulerClusterScopes
- type SchedulerConfig
- type SchedulerParams
- type SeedPeerClusterConfig
- type SeedPeerClusterParams
- type SeedPeerParams
- type SignInRequest
- type SignUpRequest
- type URLPriorityConfig
- type UpdateApplicationRequest
- type UpdateClusterRequest
- type UpdateClusterResponse
- type UpdateConfigRequest
- type UpdateJobRequest
- type UpdateOauthRequest
- type UpdatePersonalAccessTokenRequest
- type UpdateSchedulerClusterRequest
- type UpdateSchedulerRequest
- type UpdateSeedPeerClusterRequest
- type UpdateSeedPeerRequest
- type UpdateUserRequest
- type UserParams
- type V1PreheatParams
Constants ¶
View Source
const ( // SingleSeedPeerScope represents the scope that only single seed peer will be preheated. SingleSeedPeerScope = "single_seed_peer" // AllSeedPeersScope represents the scope that all seed peers will be preheated. AllSeedPeersScope = "all_seed_peers" // AllPeersScope represents the scope that all peers will be preheated. AllPeersScope = "all_peers" )
View Source
const ( // DefaultPreheatConcurrentPeerCount is the default concurrent peer count for preheating all peers. DefaultPreheatConcurrentPeerCount = 500 // DefaultPreheatConcurrentTaskCount is the default concurrent task count for preheating all peers. DefaultPreheatConcurrentTaskCount = 8 // DefaultPreheatConcurrentLayerCount is the default concurrent layer count for getting image distribution. DefaultPreheatConcurrentLayerCount = 8 // DefaultGetTaskConcurrentPeerCount is the default concurrent peer count for getting task. DefaultGetTaskConcurrentPeerCount = 500 // DefaultJobTimeout is the default timeout for executing job. DefaultJobTimeout = 60 * time.Minute )
View Source
const ( // PersonalAccessTokenScopeJob represents the personal access token whose scope is job. PersonalAccessTokenScopeJob = "job" // PersonalAccessTokenScopeCluster represents the personal access token whose scope is cluster. PersonalAccessTokenScopeCluster = "cluster" )
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 represents the default scopes of personal access token. DefaultPersonalAccessTokenScopes = []string{PersonalAccessTokenScopeJob, PersonalAccessTokenScopeCluster} )
View Source
var ( // DefaultSchedulerFeatures is the default features of scheduler. DefaultSchedulerFeatures = []string{SchedulerFeatureSchedule, SchedulerFeaturePreheat} )
Functions ¶
This section is empty.
Types ¶
type AddPermissionForRoleRequest ¶
type AddPermissionForRoleRequest struct {
rbac.Permission `json:",inline" binding:"required"`
}
type AddRoleForUserParams ¶
type AddSchedulerClusterToSeedPeerClusterParams ¶ added in v2.0.3
type AddSeedPeerToSeedPeerClusterParams ¶ added in v2.0.3
type ApplicationParams ¶ added in v2.0.1
type ApplicationParams struct {
ID uint `uri:"id" binding:"required"`
}
type BucketParams ¶ added in v2.0.4
type BucketParams struct {
ID string `uri:"id" binding:"required"`
}
type ClusterParams ¶ added in v2.0.30
type ClusterParams struct {
ID uint `uri:"id" binding:"required"`
}
type ConfigParams ¶ added in v2.0.1
type ConfigParams struct {
ID uint `uri:"id" binding:"required"`
}
type CreateApplicationRequest ¶ added in v2.0.1
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 CreateAuditRequest ¶ added in v2.2.2
type CreateAuditRequest struct {
ActorType string `json:"actor_type" binding:"required"`
ActorName string `json:"actor_name" binding:"required"`
EventType string `json:"event_type" binding:"required"`
Operation string `json:"operation" binding:"required"`
OperatedAt time.Time `json:"operated_at" binding:"required"`
State string `json:"status" binding:"required"`
Path string `json:"path" binding:"omitempty"`
StatusCode int `json:"status_code" binding:"omitempty"`
}
type CreateBucketRequest ¶ added in v2.0.4
type CreateBucketRequest struct {
Name string `json:"name" binding:"required"`
}
type CreateClusterRequest ¶ added in v2.0.30
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 ¶ added in v2.0.30
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 ¶ added in v2.0.1
type CreateDeleteTaskJobRequest ¶ added in v2.1.55
type CreateDeleteTaskJobRequest struct {
// BIO is the description of the job.
BIO string `json:"bio" binding:"omitempty"`
// Type is the type of the job.
Type string `json:"type" binding:"required"`
// Args is the arguments of the job.
Args DeleteTaskArgs `json:"args" binding:"omitempty"`
// UserID is the user id of the job.
UserID uint `json:"user_id" binding:"omitempty"`
// SchedulerClusterIDs is the scheduler cluster ids of the job.
SchedulerClusterIDs []uint `json:"scheduler_cluster_ids" binding:"omitempty"`
}
type CreateGCJobRequest ¶ added in v2.2.4
type CreateGCJobRequest struct {
// BIO is the description of the job.
BIO string `json:"bio" binding:"omitempty"`
// Type is the type of the job.
Type string `json:"type" binding:"required"`
// Args is the arguments of the gc.
Args GCArgs `json:"args" binding:"required"`
// UserID is the user id of the job.
UserID uint `json:"user_id" binding:"omitempty"`
}
type CreateGetImageDistributionJobRequest ¶ added in v2.2.4
type CreateGetImageDistributionJobRequest struct {
// BIO is the description of the job.
BIO string `json:"bio" binding:"omitempty"`
// Type is the type of the job.
Type string `json:"type" binding:"required"`
// Args is the arguments of the job.
Args GetImageDistributionArgs `json:"args" binding:"omitempty"`
// UserID is the user id of the job.
UserID uint `json:"user_id" binding:"omitempty"`
// SchedulerClusterIDs is the scheduler cluster ids of the job.
SchedulerClusterIDs []uint `json:"scheduler_cluster_ids" binding:"omitempty"`
}
type CreateGetImageDistributionJobResponse ¶ added in v2.2.4
type CreateGetImageDistributionJobResponse struct {
// Image is the image information.
Image Image `json:"image"`
// Peers is the peers that have downloaded the image.
Peers []Peer `json:"peers"`
}
CreateGetImageDistributionJobResponse is the response for creating a get image job.
type CreateGetTaskJobRequest ¶ added in v2.1.55
type CreateGetTaskJobRequest struct {
// BIO is the description of the job.
BIO string `json:"bio" binding:"omitempty"`
// Type is the type of the job.
Type string `json:"type" binding:"required"`
// Args is the arguments of the job.
Args GetTaskArgs `json:"args" binding:"omitempty"`
// UserID is the user id of the job.
UserID uint `json:"user_id" binding:"omitempty"`
// SchedulerClusterIDs is the scheduler cluster ids of the job.
SchedulerClusterIDs []uint `json:"scheduler_cluster_ids" binding:"omitempty"`
}
type CreateJobRequest ¶ added in v2.0.1
type CreateJobRequest struct {
// BIO is the description of the job.
BIO string `json:"bio" binding:"omitempty"`
// Type is the type of the job.
Type string `json:"type" binding:"required"`
// Args is the arguments of the job.
Args map[string]any `json:"args" binding:"omitempty"`
// UserID is the user id of the job.
UserID uint `json:"user_id" binding:"omitempty"`
// SeedPeerClusterIDs is the seed peer cluster ids of the job.
SeedPeerClusterIDs []uint `json:"seed_peer_cluster_ids" binding:"omitempty"`
// SchedulerClusterIDs is the scheduler cluster ids of the job.
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 CreatePeerRequest ¶ added in v2.0.30
type CreatePeerRequest struct {
Hostname string `json:"host_name" binding:"required"`
Type string `json:"type" binding:"required,oneof=super normal"`
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"`
ProxyPort int32 `json:"proxy_port" binding:"required"`
ObjectStoragePort int32 `json:"object_storage_port" binding:"omitempty"`
State string `json:"state" binding:"omitempty,oneof=active inactive"`
OS string `json:"os" binding:"omitempty"`
Platform string `json:"platform" binding:"omitempty"`
PlatformFamily string `json:"platform_family" binding:"omitempty"`
PlatformVersion string `json:"platform_version" binding:"omitempty"`
KernelVersion string `json:"kernel_version" binding:"omitempty"`
GitVersion string `json:"git_version" binding:"omitempty"`
GitCommit string `json:"git_commit" binding:"omitempty"`
BuildPlatform string `json:"build_platform" binding:"omitempty"`
SchedulerClusterID uint `json:"scheduler_cluster_id" binding:"required"`
}
type CreatePersonalAccessTokenRequest ¶ added in v2.0.30
type CreatePreheatJobRequest ¶ added in v2.0.1
type CreatePreheatJobRequest struct {
// BIO is the description of the job.
BIO string `json:"bio" binding:"omitempty"`
// Type is the type of the job.
Type string `json:"type" binding:"required"`
// Args is the arguments of the preheating job.
Args PreheatArgs `json:"args" binding:"omitempty"`
// UserID is the user id of the job.
UserID uint `json:"user_id" binding:"omitempty"`
// SchedulerClusterIDs is the scheduler cluster ids of the job.
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 {
Config *SchedulerConfig `json:"config" binding:"omitempty"`
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 ¶ added in v2.0.3
type CreateSeedPeerClusterRequest struct {
Name string `json:"name" binding:"required"`
BIO string `json:"bio" binding:"omitempty"`
Config *SeedPeerClusterConfig `json:"config" binding:"required"`
}
type CreateSeedPeerRequest ¶ added in v2.0.3
type CreateSeedPeerRequest struct {
Hostname string `json:"host_name" binding:"required"`
Type string `json:"type" binding:"required,oneof=super"`
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 CreateSyncPeersJobRequest ¶ added in v2.1.65
type CreateSyncPeersJobRequest struct {
// BIO is the description of the job.
BIO string `json:"bio" binding:"omitempty"`
// Type is the type of the job.
Type string `json:"type" binding:"required"`
// UserID is the user id of the job.
UserID uint `json:"user_id" binding:"omitempty"`
// SchedulerClusterIDs is the scheduler cluster ids of the job.
SchedulerClusterIDs []uint `json:"scheduler_cluster_ids" binding:"omitempty"`
}
type CreateV1PreheatRequest ¶ added in v2.0.1
type CreateV1PreheatResponse ¶ added in v2.0.1
type CreateV1PreheatResponse struct {
ID string `json:"id"`
}
type DeletePermissionForRoleRequest ¶
type DeletePermissionForRoleRequest struct {
rbac.Permission `json:",inline" binding:"required"`
}
type DeleteRoleForUserParams ¶
type DeleteTaskArgs ¶ added in v2.1.55
type DeleteTaskArgs struct {
// TaskID is the task id for deleting.
TaskID string `json:"task_id" binding:"omitempty"`
// URL is the download url of the task.
URL string `json:"url" binding:"omitempty"`
// PieceLength is the piece length(bytes) for downloading file. The value needs to
// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
// the piece length will be calculated according to the file size.
PieceLength *uint64 `json:"piece_length" binding:"omitempty,gte=4194304,lte=67108864"`
// Tag is the tag of the task.
Tag string `json:"tag" binding:"omitempty"`
// Application is the application of the task.
Application string `json:"application" binding:"omitempty"`
// FilteredQueryParams is the filtered query params of the task.
FilteredQueryParams string `json:"filtered_query_params" binding:"omitempty"`
// Timeout is the timeout for deleting, default is 60 minutes.
Timeout time.Duration `json:"timeout" binding:"omitempty"`
// ContentForCalculatingTaskID is the content used to calculate the task id.
// If ContentForCalculatingTaskID is set, use its value to calculate the task ID.
// Otherwise, calculate the task ID based on url, piece_length, tag, application, and filtered_query_params.
ContentForCalculatingTaskID *string `json:"content_for_calculating_task_id" binding:"omitempty"`
}
type DestroyPersistentCacheTaskQuery ¶ added in v2.2.2
type DestroyPersistentCacheTaskQuery struct {
// SchedulerClusterID is the scheduler cluster id of the persistent cache.
SchedulerClusterID uint `form:"scheduler_cluster_id" binding:"required"`
}
type GCArgs ¶ added in v2.2.4
type GCArgs struct {
// Type is the type of the job.
Type string `json:"type" binding:"required,oneof=audit job"`
}
type GetApplicationsQuery ¶ added in v2.0.1
type GetAuditsQuery ¶ added in v2.2.2
type GetAuditsQuery struct {
ActorType string `form:"actor_type" binding:"omitempty,oneof=UNKNOWN USER PAT"`
ActorName string `form:"actor_name" binding:"omitempty"`
EventType string `form:"event_type" binding:"omitempty,oneof=API"`
Operation string `form:"operation" binding:"omitempty"`
State string `form:"state" binding:"omitempty,oneof=SUCCESS FAILURE"`
Path string `form:"path" binding:"omitempty"`
StatusCode int `form:"status_code" binding:"omitempty"`
Page int `form:"page" binding:"omitempty,gte=1"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"`
}
type GetClusterResponse ¶ added in v2.0.30
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 ¶ added in v2.0.30
type GetConfigsQuery ¶ added in v2.0.1
type GetImageDistributionArgs ¶ added in v2.2.4
type GetImageDistributionArgs struct {
// URL is the image manifest url of the task.
URL string `json:"url" binding:"required"`
// PieceLength is the piece length(bytes) for downloading image blobs. The value needs to
// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
// the piece length will be calculated according to the file size.
PieceLength *uint64 `json:"piece_length" binding:"omitempty,gte=4194304,lte=67108864"`
// Tag is the tag of the task.
Tag string `json:"tag" binding:"omitempty"`
// Application is the application of the task.
Application string `json:"application" binding:"omitempty"`
// FilteredQueryParams is the filtered query params of the task.
FilteredQueryParams string `json:"filtered_query_params" binding:"omitempty"`
// Headers is the http headers for authentication.
Headers map[string]string `json:"headers" binding:"omitempty"`
// Username is the username for authentication.
Username string `json:"username" binding:"omitempty"`
// Password is the password for authentication.
Password string `json:"password" binding:"omitempty"`
// The image type preheating task can specify the image architecture type. eg: linux/amd64.
Platform string `json:"platform" binding:"omitempty"`
// ConcurrentLayerCount specifies the maximum number of layers to get concurrently.
ConcurrentLayerCount int64 `json:"concurrent_layer_count" binding:"omitempty,gte=1,lte=100"`
// ConcurrentPeerCount specifies the maximum number of peers stat concurrently for a single task (e.g., an image layer).
// For example, if stat a layer with ConcurrentPeerCount set to 10, up to 10 peers process that layer simultaneously.
// Default is 500, maximum is 1000.
ConcurrentPeerCount int64 `json:"concurrent_peer_count" binding:"omitempty,gte=1,lte=1000"`
// Timeout is the timeout for getting image distribution, default is 60 minutes.
Timeout time.Duration `json:"timeout" binding:"omitempty"`
}
type GetJobsQuery ¶ added in v2.0.1
type GetJobsQuery struct {
// Type is the type of the job.
Type string `form:"type" binding:"omitempty"`
// State is the state of the job.
State string `form:"state" binding:"omitempty,oneof=PENDING RECEIVED STARTED RETRY SUCCESS FAILURE"`
// UserID is the user id of the job.
UserID uint `form:"user_id" binding:"omitempty"`
// Page is the page number of the job list.
Page int `form:"page" binding:"omitempty,gte=1"`
// PerPage is the item count per page of the job list.
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"`
}
type GetOauthsQuery ¶
type GetPeersQuery ¶ added in v2.0.30
type GetPeersQuery struct {
Hostname string `form:"host_name" binding:"omitempty"`
Type string `form:"type" binding:"omitempty,oneof=super"`
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"`
ProxyPort int32 `form:"proxy_port" binding:"omitempty"`
ObjectStoragePort int32 `form:"object_storage_port" binding:"omitempty"`
State string `form:"state" binding:"omitempty,oneof=active inactive"`
OS string `form:"os" binding:"omitempty"`
Platform string `form:"platform" binding:"omitempty"`
PlatformFamily string `form:"platform_family" binding:"omitempty"`
PlatformVersion string `form:"platform_version" binding:"omitempty"`
KernelVersion string `form:"kernel_version" binding:"omitempty"`
GitVersion string `form:"git_version" binding:"omitempty"`
GitCommit string `form:"git_commit" binding:"omitempty"`
BuildPlatform string `form:"build_platform" binding:"omitempty"`
SchedulerClusterID uint `form:"scheduler_cluster_id" binding:"omitempty"`
Page int `form:"page" binding:"omitempty,gte=1"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"`
}
type GetPersistentCacheTaskQuery ¶ added in v2.2.2
type GetPersistentCacheTaskQuery struct {
// SchedulerClusterID is the scheduler cluster id of the persistent cache.
SchedulerClusterID uint `form:"scheduler_cluster_id" binding:"required"`
}
type GetPersistentCacheTasksQuery ¶ added in v2.2.2
type GetPersistentCacheTasksQuery struct {
// SchedulerClusterID is the scheduler cluster id of the persistent cache.
SchedulerClusterID uint `form:"scheduler_cluster_id" binding:"required"`
// Page is the page number of the persistent cache list.
Page int `form:"page" binding:"omitempty,gte=1"`
// PerPage is the item count per page of the persistent cache list.
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"`
}
type GetPersonalAccessTokensQuery ¶ added in v2.0.30
type GetSchedulersQuery ¶
type GetSchedulersQuery struct {
Page int `form:"page" binding:"omitempty,gte=1"`
PerPage int `form:"per_page" binding:"omitempty,gte=1,lte=10000000"`
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 ¶ added in v2.0.3
type GetSeedPeersQuery ¶ added in v2.0.3
type GetSeedPeersQuery struct {
Hostname string `form:"host_name" binding:"omitempty"`
Type string `form:"type" binding:"omitempty,oneof=super"`
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=10000000"`
State string `form:"state" binding:"omitempty,oneof=active inactive"`
}
type GetTaskArgs ¶ added in v2.1.55
type GetTaskArgs struct {
// TaskID is the task id for getting.
TaskID string `json:"task_id" binding:"omitempty"`
// URL is the download url of the task.
URL string `json:"url" binding:"omitempty"`
// PieceLength is the piece length(bytes) for downloading file. The value needs to
// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
// the piece length will be calculated according to the file size.
PieceLength *uint64 `json:"piece_length" binding:"omitempty,gte=4194304,lte=67108864"`
// Tag is the tag of the task.
Tag string `json:"tag" binding:"omitempty"`
// Application is the application of the task.
Application string `json:"application" binding:"omitempty"`
// FilteredQueryParams is the filtered query params of the task.
FilteredQueryParams string `json:"filtered_query_params" binding:"omitempty"`
// ContentForCalculatingTaskID is the content used to calculate the task id.
// If ContentForCalculatingTaskID is set, use its value to calculate the task ID.
// Otherwise, calculate the task ID based on url, piece_length, tag, application, and filtered_query_params.
ContentForCalculatingTaskID *string `json:"content_for_calculating_task_id" binding:"omitempty"`
// ConcurrentPeerCount specifies the maximum number of peers stat concurrently for a single task (e.g., an image layer).
// For example, if stat a layer with ConcurrentPeerCount set to 10, up to 10 peers process that layer simultaneously.
// Default is 500, maximum is 1000.
ConcurrentPeerCount int64 `json:"concurrent_peer_count" binding:"omitempty,gte=1,lte=1000"`
// Timeout is the timeout for getting task, default is 60 minutes.
Timeout time.Duration `json:"timeout" binding:"omitempty"`
}
type GetUsersQuery ¶ added in v2.0.1
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=10000000"`
}
type GetV1PreheatResponse ¶ added in v2.0.1
type Image ¶ added in v2.2.4
type Image struct {
// Layers is the list of layers of the image.
Layers []Layer `json:"layers"`
}
Image represents the image information.
type JobParams ¶ added in v2.0.1
type JobParams struct {
// Type is the type of the job.
ID uint `uri:"id" binding:"required"`
}
type Layer ¶ added in v2.2.4
type Layer struct {
// URL is the URL of the layer.
URL string `json:"url"`
}
Layer represents a layer of the image.
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 ¶ added in v2.0.3
type Peer struct {
// IP is the IP address of the peer.
IP string `json:"ip"`
// Hostname is the hostname of the peer.
Hostname string `json:"hostname"`
// CachedLayers is the list of layers that the peer has downloaded.
CachedLayers []Layer `json:"cached_layers"`
// SchedulerClusterID is the scheduler cluster id of the peer.
SchedulerClusterID uint `json:"scheduler_cluster_id"`
}
Peer represents a peer in the get image job.
type PeerParams ¶ added in v2.0.30
type PeerParams struct {
ID uint `uri:"id" binding:"required"`
}
type PersistentCacheHost ¶ added in v2.2.2
type PersistentCacheHost struct {
// ID is host id.
ID string `json:"id" binding:"omitempty"`
// Type is host type.
Type string `json:"type" binding:"omitempty"`
// Hostname is host name.
Hostname string `json:"hostname" binding:"omitempty"`
// IP is host ip.
IP string `json:"ip" binding:"omitempty"`
// Port is grpc service port.
Port int32 `json:"port" binding:"omitempty"`
// DownloadPort is piece downloading port.
DownloadPort int32 `json:"download_port" binding:"omitempty"`
DisableShared bool `json:"disable_shared" binding:"omitempty"`
// OS is host OS.
OS string `json:"os" binding:"omitempty"`
// Platform is host platform.
Platform string `json:"platform" binding:"omitempty"`
// PlatformFamily is host platform family.
PlatformFamily string `json:"platform_family" binding:"omitempty"`
// PlatformVersion is host platform version.
PlatformVersion string `json:"platform_version" binding:"omitempty"`
// KernelVersion is host kernel version.
KernelVersion string `json:"kernel_version" binding:"omitempty"`
// CPU contains cpu information.
CPU struct {
// LogicalCount is cpu logical count.
LogicalCount uint32 `json:"logical_count" binding:"omitempty"`
// PhysicalCount is cpu physical count.
PhysicalCount uint32 `json:"physical_count" binding:"omitempty"`
// Percent is cpu usage percent.
Percent float64 `json:"percent" binding:"omitempty"`
// ProcessPercent is process cpu usage percent.
ProcessPercent float64 `json:"process_percent" binding:"omitempty"`
// Times contains cpu times information.
Times struct {
// User is user cpu time.
User float64 `json:"user" binding:"omitempty"`
// System is system cpu time.
System float64 `json:"system" binding:"omitempty"`
// Idle is idle cpu time.
Idle float64 `json:"idle" binding:"omitempty"`
// Nice is nice cpu time.
Nice float64 `json:"nice" binding:"omitempty"`
// Iowait is iowait cpu time.
Iowait float64 `json:"iowait" binding:"omitempty"`
// Irq is irq cpu time.
Irq float64 `json:"irq" binding:"omitempty"`
// Softirq is softirq cpu time.
Softirq float64 `json:"softirq" binding:"omitempty"`
// Steal is steal cpu time.
Steal float64 `json:"steal" binding:"omitempty"`
// Guest is guest cpu time.
Guest float64 `json:"guest" binding:"omitempty"`
// GuestNice is guest nice cpu time.
GuestNice float64 `json:"guest_nice" binding:"omitempty"`
} `json:"times" binding:"omitempty"`
} `json:"cpu" binding:"omitempty"`
// Memory contains memory information.
Memory struct {
// Total is total memory.
Total uint64 `json:"total" binding:"omitempty"`
// Available is available memory.
Available uint64 `json:"available" binding:"omitempty"`
// Used is used memory.
Used uint64 `json:"used" binding:"omitempty"`
// UsedPercent is memory usage percent.
UsedPercent float64 `json:"used_percent" binding:"omitempty"`
// ProcessUsedPercent is process memory usage percent.
ProcessUsedPercent float64 `json:"process_used_percent" binding:"omitempty"`
// Free is free memory.
Free uint64 `json:"free" binding:"omitempty"`
} `json:"memory" binding:"omitempty"`
// Network contains network information.
Network struct {
// TCPConnectionCount is tcp connection count.
TCPConnectionCount uint32 `json:"tcp_connection_count" binding:"omitempty"`
// UploadTCPConnectionCount is upload tcp connection count.
UploadTCPConnectionCount uint32 `json:"upload_tcp_connection_count" binding:"omitempty"`
// Location is network location.
Location string `json:"location" binding:"omitempty"`
// IDC is network idc.
IDC string `json:"idc" binding:"omitempty"`
// RxBandwidth is download rate.
RxBandwidth uint64 `json:"rx_bandwidth" binding:"omitempty"`
// MaxRxBandwidth is download rate limit.
MaxRxBandwidth uint64 `json:"max_rx_bandwidth" binding:"omitempty"`
// TxBandwidth is upload rate.
TxBandwidth uint64 `json:"tx_bandwidth" binding:"omitempty"`
// MaxTxBandwidth is upload rate limit.
MaxTxBandwidth uint64 `json:"max_tx_bandwidth" binding:"omitempty"`
} `json:"network" binding:"omitempty"`
// Disk contains disk information.
Disk struct {
// Total is total disk space.
Total uint64 `json:"total" binding:"omitempty"`
// Free is free disk space.
Free uint64 `json:"free" binding:"omitempty"`
// Used is used disk space.
Used uint64 `json:"used" binding:"omitempty"`
// UsedPercent is disk usage percent.
UsedPercent float64 `json:"used_percent" binding:"omitempty"`
// InodesTotal is total inodes.
InodesTotal uint64 `json:"inodes_total" binding:"omitempty"`
// InodesUsed is used inodes.
InodesUsed uint64 `json:"inodes_used" binding:"omitempty"`
// InodesFree is free inodes.
InodesFree uint64 `json:"inodes_free" binding:"omitempty"`
// InodesUsedPercent is inodes usage percent.
InodesUsedPercent float64 `json:"inodes_used_percent" binding:"omitempty"`
// WriteBandwidth is write bandwidth.
WriteBandwidth uint64 `json:"write_bandwidth" binding:"omitempty"`
// ReadBandwidth is read bandwidth.
ReadBandwidth uint64 `json:"read_bandwidth" binding:"omitempty"`
} `json:"disk" binding:"omitempty"`
// Build contains build information.
Build struct {
// GitVersion is git version.
GitVersion string `json:"git_version" binding:"omitempty"`
// GitCommit is git commit.
GitCommit string `json:"git_commit" binding:"omitempty"`
// GoVersion is go version.
GoVersion string `json:"go_version" binding:"omitempty"`
// Platform is build platform.
Platform string `json:"platform" binding:"omitempty"`
} `json:"build" binding:"omitempty"`
// SchedulerClusterID is the scheduler cluster id matched by scopes.
SchedulerClusterID uint `json:"scheduler_cluster_id" binding:"omitempty"`
// AnnounceInterval is the interval between host announces to scheduler.
AnnounceInterval time.Duration `json:"announce_interval" binding:"omitempty"`
// CreatedAt is host create time.
CreatedAt time.Time `json:"created_at" binding:"omitempty"`
// UpdatedAt is host update time.
UpdatedAt time.Time `json:"updated_at" binding:"omitempty"`
}
type PersistentCachePeer ¶ added in v2.2.2
type PersistentCachePeer struct {
// ID is persistent cache peer id.
ID string `json:"id" binding:"omitempty"`
// Persistent is whether the peer is persistent.
Persistent bool `json:"persistent" binding:"omitempty"`
// FinishedPieces is finished pieces bitset.
FinishedPieces *bitset.BitSet `json:"finished_pieces" binding:"omitempty"`
// State is persistent cache peer state.
State string `json:"state" binding:"omitempty"`
// BlockParents is bad parents ids.
BlockParents []string `json:"block_parents" binding:"omitempty"`
// Cost is the cost of downloading.
Cost time.Duration `json:"cost" binding:"omitempty"`
// CreatedAt is persistent cache peer create time.
CreatedAt time.Time `json:"created_at" binding:"omitempty"`
// UpdatedAt is persistent cache peer update time.
UpdatedAt time.Time `json:"updated_at" binding:"omitempty"`
// Host is the peer host.
Host *PersistentCacheHost `json:"host" binding:"omitempty"`
}
type PersistentCacheTask ¶ added in v2.2.2
type PersistentCacheTask struct {
// ID is task id.
ID string `json:"id" binding:"omitempty"`
// PersistentReplicaCount is replica count of the persistent cache task.
PersistentReplicaCount uint64 `json:"persistent_replica_count" binding:"omitempty"`
// Tag is used to distinguish different persistent cache tasks.
Tag string `json:"tag" binding:"omitempty"`
// Application of persistent cache task.
Application string `json:"application" binding:"omitempty"`
// PieceLength is persistent cache task piece length.
PieceLength uint64 `json:"piece_length" binding:"omitempty"`
// ContentLength is persistent cache task total content length.
ContentLength uint64 `json:"content_length" binding:"omitempty"`
// TotalPieceCount is total piece count.
TotalPieceCount uint32 `json:"total_piece_count" binding:"omitempty"`
// State is persistent cache task state.
State string `json:"state" binding:"omitempty"`
// TTL is persistent cache task time to live.
TTL time.Duration `json:"ttl" binding:"omitempty"`
// CreatedAt is persistent cache task create time.
CreatedAt time.Time `json:"created_at" binding:"omitempty"`
// UpdatedAt is persistent cache task update time.
UpdatedAt time.Time `json:"updated_at" binding:"omitempty"`
// PersistentCachePeers is the list of persistent cache peers.
Peers []*PersistentCachePeer `json:"peers" binding:"omitempty"`
}
type PersistentCacheTaskParams ¶ added in v2.2.2
type PersistentCacheTaskParams struct {
// ID is the task id of the persistent cache.
ID string `uri:"id" binding:"required"`
}
type PersonalAccessTokenParams ¶ added in v2.0.30
type PersonalAccessTokenParams struct {
ID uint `uri:"id" binding:"required"`
}
type PreheatArgs ¶ added in v2.0.1
type PreheatArgs struct {
// Type is the preheating type, support image and file.
Type string `json:"type" binding:"required,oneof=image file"`
// URL is the image manifest url for preheating.
URL string `json:"url" binding:"omitempty"`
// URLs is the file urls for preheating, only support file type.
URLs []string `json:"urls" binding:"omitempty"`
// PieceLength is the piece length(bytes) for downloading file. The value needs to
// be greater than 4MiB (4,194,304 bytes) and less than 64MiB (67,108,864 bytes),
// for example: 4194304(4mib), 8388608(8mib). If the piece length is not specified,
// the piece length will be calculated according to the file size.
PieceLength *uint64 `json:"piece_length" binding:"omitempty,gte=4194304,lte=67108864"`
// Tag is the tag for preheating.
Tag string `json:"tag" binding:"omitempty"`
// Application is the application string for preheating.
Application string `json:"application" binding:"omitempty"`
// FilteredQueryParams is the filtered query params for preheating.
FilteredQueryParams string `json:"filtered_query_params" binding:"omitempty"`
// Headers is the http headers for authentication.
Headers map[string]string `json:"headers" binding:"omitempty"`
// Username is the username for authentication.
Username string `json:"username" binding:"omitempty"`
// Password is the password for authentication.
Password string `json:"password" binding:"omitempty"`
// The image type preheating task can specify the image architecture type. eg: linux/amd64.
Platform string `json:"platform" binding:"omitempty"`
// Scope is the scope for preheating, default is single_seed_peer.
Scope string `json:"scope" binding:"omitempty"`
// IPs is a list of specific peer IPs for preheating.
// This field has the highest priority: if provided, both 'Count' and 'Percentage' will be ignored.
// Applies to 'all_peers' and 'all_seed_peers' scopes.
IPs []string `json:"ips" binding:"omitempty,gte=1,lte=100"`
// Percentage is the percentage of available peers to preheat.
// This field has the lowest priority and is only used if both 'IPs' and 'Count' are not provided.
// It must be a value between 1 and 100 (inclusive) if provided.
// Applies to 'all_peers' and 'all_seed_peers' scopes.
Percentage *uint32 `json:"percentage" binding:"omitempty,gte=1,lte=100"`
// Count is the desired number of peers to preheat.
// This field is used only when 'IPs' is not specified. It has priority over 'Percentage'.
// It must be a value between 1 and 200 (inclusive) if provided.
// Applies to 'all_peers' and 'all_seed_peers' scopes.
Count *uint32 `json:"count" binding:"omitempty,gte=1,lte=200"`
// ConcurrentTaskCount specifies the maximum number of tasks (e.g., image layers) to preheat concurrently.
// For example, if preheating 100 layers with ConcurrentTaskCount set to 10, up to 10 layers are processed simultaneously.
// If ConcurrentPeerCount is 10 for 1000 peers, each layer is preheated by 10 peers concurrently.
// Default is 8, maximum is 100.
ConcurrentTaskCount int64 `json:"concurrent_task_count" binding:"omitempty,gte=1,lte=100"`
// ConcurrentPeerCount specifies the maximum number of peers to preheat concurrently for a single task (e.g., an image layer).
// For example, if preheating a layer with ConcurrentPeerCount set to 10, up to 10 peers process that layer simultaneously.
// Default is 500, maximum is 1000.
ConcurrentPeerCount int64 `json:"concurrent_peer_count" binding:"omitempty,gte=1,lte=1000"`
// Timeout is the timeout for preheating, default is 60 minutes.
Timeout time.Duration `json:"timeout" binding:"omitempty"`
}
type PriorityConfig ¶ added in v2.0.9
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 RoleParams ¶
type RoleParams struct {
Role string `uri:"role" binding:"required"`
}
type SchedulerClusterClientConfig ¶ added in v2.0.1
type SchedulerClusterClientConfig struct {
LoadLimit uint32 `yaml:"loadLimit" mapstructure:"loadLimit" json:"load_limit" binding:"omitempty,gte=1,lte=2000"`
}
type SchedulerClusterConfig ¶ added in v2.0.1
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"`
JobRateLimit uint32 `yaml:"jobRateLimit" mapstructure:"jobRateLimit" json:"job_rate_limit" binding:"omitempty,gte=1,lte=1000000"`
}
type SchedulerClusterParams ¶
type SchedulerClusterParams struct {
ID uint `uri:"id" binding:"required"`
}
type SchedulerClusterScopes ¶ added in v2.0.1
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"`
Hostnames []string `yaml:"hostnames" mapstructure:"hostnames" json:"hostnames" binding:"omitempty"`
}
type SchedulerConfig ¶ added in v2.3.1
type SchedulerParams ¶
type SchedulerParams struct {
ID uint `uri:"id" binding:"required"`
}
type SeedPeerClusterConfig ¶ added in v2.0.3
type SeedPeerClusterConfig struct {
LoadLimit uint32 `yaml:"loadLimit" mapstructure:"loadLimit" json:"load_limit" binding:"omitempty,gte=1,lte=50000"`
}
type SeedPeerClusterParams ¶ added in v2.0.3
type SeedPeerClusterParams struct {
ID uint `uri:"id" binding:"required"`
}
type SeedPeerParams ¶ added in v2.0.3
type SeedPeerParams struct {
ID uint `uri:"id" binding:"required"`
}
type SignInRequest ¶
type SignUpRequest ¶
type URLPriorityConfig ¶ added in v2.0.9
type UpdateApplicationRequest ¶ added in v2.0.1
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 ¶ added in v2.0.30
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 ¶ added in v2.0.30
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 ¶ added in v2.0.1
type UpdateJobRequest ¶ added in v2.0.1
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 ¶ added in v2.0.30
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 {
Config *SchedulerConfig `json:"config" binding:"omitempty"`
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 ¶ added in v2.0.3
type UpdateSeedPeerClusterRequest struct {
Name string `json:"name" binding:"omitempty"`
BIO string `json:"bio" binding:"omitempty"`
Config *SeedPeerClusterConfig `json:"config" binding:"omitempty"`
}
type UpdateSeedPeerRequest ¶ added in v2.0.3
type UpdateSeedPeerRequest struct {
Type string `json:"type" binding:"omitempty,oneof=super"`
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 ¶ added in v2.0.2
type UserParams ¶
type UserParams struct {
ID uint `uri:"id" binding:"required"`
}
type V1PreheatParams ¶ added in v2.0.1
type V1PreheatParams struct {
ID string `uri:"id" binding:"required"`
}
Click to show internal directories.
Click to hide internal directories.