types

package
v2.0.1-rc.9 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCDNClusterToApplicationParams added in v2.0.1

type AddCDNClusterToApplicationParams struct {
	ID           uint `uri:"id" binding:"required"`
	CDNClusterID uint `uri:"cdn_cluster_id" binding:"required"`
}

type AddCDNClusterToSecurityGroupParams

type AddCDNClusterToSecurityGroupParams struct {
	ID           uint `uri:"id" binding:"required"`
	CDNClusterID uint `uri:"cdn_cluster_id" binding:"required"`
}

type AddCDNToCDNClusterParams

type AddCDNToCDNClusterParams struct {
	ID    uint `uri:"id" binding:"required"`
	CDNID uint `uri:"cdn_id" binding:"required"`
}

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 AddSchedulerClusterToApplicationParams added in v2.0.1

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

type AddSchedulerClusterToCDNClusterParams

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

type AddSchedulerClusterToSecurityGroupParams

type AddSchedulerClusterToSecurityGroupParams 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 AddSecurityRuleToSecurityGroupParams added in v2.0.1

type AddSecurityRuleToSecurityGroupParams struct {
	ID             uint `uri:"id" binding:"required"`
	SecurityRuleID uint `uri:"security_rule_id" binding:"required"`
}

type ApplicationParams added in v2.0.1

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

type CDNClusterConfig added in v2.0.1

type CDNClusterConfig struct {
	LoadLimit   uint32 `yaml:"loadLimit" mapstructure:"loadLimit" json:"load_limit" binding:"omitempty,gte=1,lte=5000"`
	NetTopology string `yaml:"netTopology" mapstructure:"netTopology" json:"net_topology"`
}

type CDNClusterParams

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

type CDNParams

type CDNParams 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"`
	BIO               string `json:"bio" binding:"omitempty"`
	URL               string `json:"url" binding:"omitempty"`
	DownloadRateLimit uint   `json:"download_rate_limit" binding:"omitempty"`
	State             string `json:"state" binding:"omitempty,oneof=enable disable"`
	UserID            uint   `json:"user_id" binding:"required"`
}

type CreateCDNClusterRequest

type CreateCDNClusterRequest struct {
	Name      string            `json:"name" binding:"required"`
	BIO       string            `json:"bio" binding:"omitempty"`
	Config    *CDNClusterConfig `json:"config" binding:"required"`
	IsDefault bool              `json:"is_default" binding:"omitempty"`
}

type CreateCDNRequest

type CreateCDNRequest struct {
	HostName     string `json:"host_name" binding:"required"`
	IDC          string `json:"idc" binding:"required"`
	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"`
	CDNClusterID uint   `json:"cdn_cluster_id" binding:"required"`
}

type CreateConfigRequest added in v2.0.1

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 added in v2.0.1

type CreateJobRequest struct {
	BIO                 string                 `json:"bio" binding:"omitempty"`
	Type                string                 `json:"type" binding:"required"`
	Args                map[string]interface{} `json:"args" binding:"omitempty"`
	Result              map[string]interface{} `json:"result" binding:"omitempty"`
	UserID              uint                   `json:"user_id" binding:"omitempty"`
	CDNClusterIDs       []uint                 `json:"cdn_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 CreatePreheatJobRequest added in v2.0.1

type CreatePreheatJobRequest struct {
	BIO                 string                 `json:"bio" binding:"omitempty"`
	Type                string                 `json:"type" binding:"required"`
	Args                PreheatArgs            `json:"args" binding:"omitempty"`
	Result              map[string]interface{} `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"`
	CDNClusterID uint                          `json:"cdn_cluster_id" binding:"omitempty"`
}

type CreateSchedulerRequest

type CreateSchedulerRequest struct {
	HostName           string                 `json:"host_name" binding:"required"`
	VIPs               string                 `json:"vips" binding:"omitempty"`
	IDC                string                 `json:"idc" binding:"required"`
	Location           string                 `json:"location" binding:"omitempty"`
	NetConfig          map[string]interface{} `json:"net_config" binding:"omitempty"`
	IP                 string                 `json:"ip" binding:"required"`
	Port               int32                  `json:"port" binding:"required"`
	SchedulerClusterID uint                   `json:"scheduler_cluster_id" binding:"required"`
}

type CreateSecurityGroupRequest

type CreateSecurityGroupRequest struct {
	Name string `json:"name" binding:"required"`
	BIO  string `json:"bio" binding:"omitempty"`
}

type CreateSecurityRuleRequest added in v2.0.1

type CreateSecurityRuleRequest struct {
	Name        string `json:"name" binding:"required"`
	BIO         string `json:"bio" binding:"omitempty"`
	Domain      string `json:"domain" binding:"required"`
	ProxyDomain string `json:"proxy_domain" binding:"omitempty"`
}

type CreateV1PreheatRequest added in v2.0.1

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 added in v2.0.1

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

type DeleteCDNClusterToApplicationParams added in v2.0.1

type DeleteCDNClusterToApplicationParams struct {
	ID           uint `uri:"id" binding:"required"`
	CDNClusterID uint `uri:"cdn_cluster_id" binding:"required"`
}

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 DeleteSchedulerClusterToApplicationParams added in v2.0.1

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

type GetApplicationsQuery added in v2.0.1

type GetApplicationsQuery struct {
	Name    string `form:"name" binding:"omitempty"`
	State   string `form:"state" binding:"omitempty,oneof=enable disable"`
	Page    int    `form:"page" binding:"omitempty,gte=1"`
	PerPage int    `form:"per_page" binding:"omitempty,gte=1,lte=50"`
}

type GetCDNClustersQuery

type GetCDNClustersQuery 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=50"`
}

type GetCDNsQuery

type GetCDNsQuery struct {
	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"`
	Port         int32  `form:"port" binding:"omitempty"`
	DownloadPort int32  `form:"download_port" binding:"omitempty"`
	CDNClusterID uint   `form:"cdn_cluster_id" binding:"omitempty"`
	Page         int    `form:"page" binding:"omitempty,gte=1"`
	PerPage      int    `form:"per_page" binding:"omitempty,gte=1,lte=50"`
	State        string `form:"state" binding:"omitempty,oneof=active inactive"`
}

type GetConfigsQuery added in v2.0.1

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=50"`
}

type GetJobsQuery added in v2.0.1

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=50"`
}

type GetOauthsQuery

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

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=50"`
}

type GetSchedulersQuery

type GetSchedulersQuery struct {
	Page               int    `form:"page" binding:"omitempty,gte=1"`
	PerPage            int    `form:"per_page" binding:"omitempty,gte=1,lte=50"`
	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 GetSecurityGroupsQuery

type GetSecurityGroupsQuery 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=50"`
}

type GetSecurityRulesQuery added in v2.0.1

type GetSecurityRulesQuery struct {
	Page        int    `form:"page" binding:"omitempty,gte=1"`
	PerPage     int    `form:"per_page" binding:"omitempty,gte=1,lte=50"`
	Name        string `form:"name" binding:"omitempty"`
	Domain      string `form:"domain" binding:"omitempty"`
	ProxyDomain string `form:"proxy_domain" 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=50"`
}

type GetV1PreheatResponse added in v2.0.1

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

type JobParams added in v2.0.1

type JobParams 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 PreheatArgs added in v2.0.1

type PreheatArgs 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 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 added in v2.0.1

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

type SchedulerClusterConfig added in v2.0.1

type SchedulerClusterConfig struct {
}

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"`
	NetTopology string `yaml:"net_topology" mapstructure:"net_topology" json:"net_topology" binding:"omitempty"`
	Location    string `yaml:"location" mapstructure:"location" json:"location" binding:"omitempty"`
}

type SchedulerParams

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

type SecurityGroupParams

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

type SecurityRuleParams added in v2.0.1

type SecurityRuleParams 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 UpdateApplicationRequest added in v2.0.1

type UpdateApplicationRequest struct {
	Name              string `json:"name" binding:"omitempty"`
	BIO               string `json:"bio" binding:"omitempty"`
	URL               string `json:"url" binding:"omitempty"`
	DownloadRateLimit uint   `json:"download_rate_limit" binding:"omitempty"`
	State             string `json:"state" binding:"omitempty,oneof=enable disable"`
	UserID            uint   `json:"user_id" binding:"required"`
}

type UpdateCDNClusterRequest

type UpdateCDNClusterRequest struct {
	Name      string            `json:"name" binding:"omitempty"`
	BIO       string            `json:"bio" binding:"omitempty"`
	Config    *CDNClusterConfig `json:"config" binding:"omitempty"`
	IsDefault bool              `json:"is_default" binding:"omitempty"`
}

type UpdateCDNRequest

type UpdateCDNRequest 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"`
	DownloadPort int32  `json:"download_port" binding:"omitempty"`
	CDNClusterID uint   `json:"cdn_cluster_id" binding:"omitempty"`
}

type UpdateConfigRequest added in v2.0.1

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 added in v2.0.1

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

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 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"`
	CDNClusterID uint                          `json:"cdn_cluster_id" binding:"omitempty"`
}

type UpdateSchedulerRequest

type UpdateSchedulerRequest struct {
	VIPs               string                 `json:"vips" binding:"omitempty"`
	IDC                string                 `json:"idc" binding:"omitempty"`
	Location           string                 `json:"location" binding:"omitempty"`
	NetConfig          map[string]interface{} `json:"net_config" binding:"omitempty"`
	IP                 string                 `json:"ip" binding:"omitempty"`
	Port               int32                  `json:"port" binding:"omitempty"`
	SchedulerID        uint                   `json:"scheduler_id" binding:"omitempty"`
	SchedulerClusterID uint                   `json:"scheduler_cluster_id" binding:"omitempty"`
}

type UpdateSecurityGroupRequest

type UpdateSecurityGroupRequest struct {
	Name string `json:"name" binding:"omitempty"`
	BIO  string `json:"bio" binding:"omitempty"`
}

type UpdateSecurityRuleRequest added in v2.0.1

type UpdateSecurityRuleRequest struct {
	Name        string `json:"name" binding:"omitempty"`
	BIO         string `json:"bio" binding:"omitempty"`
	Domain      string `json:"domain" binding:"omitempty"`
	ProxyDomain string `json:"proxy_domain" binding:"omitempty"`
}

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"`
}

Jump to

Keyboard shortcuts

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