helper

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToCloudAccountList

func ConvertToCloudAccountList(accounts []*model.Account) []response.CloudAccount

ConvertToCloudAccountList convert to account list display format

func ConvertToClusterTags added in v0.1.5

func ConvertToClusterTags(tags []model.ClusterTag) map[string]map[string]string

func ConvertToClusterThumbList

func ConvertToClusterThumbList(clusters []model.Cluster, countMap map[string]int64, tagMap map[string]map[string]string) []response.ClusterThumb

func ConvertToClusterThumbListWithTag added in v0.1.5

func ConvertToClusterThumbListWithTag(clusters []model.Cluster, tags map[string]map[string]string) []response.ClusterThumbWithTag

func ConvertToCustomClusterDetail added in v0.4.0

func ConvertToCustomClusterDetail(cluster *model.Cluster) *response.CustomClusterResponse

func ConvertToCustomInstanceList added in v0.4.0

func ConvertToCustomInstanceList(instances []model.Instance) []response.CustomClusterInstance

func ConvertToInstanceDetail

func ConvertToInstanceDetail(ctx context.Context, instance *model.Instance) (*response.InstanceDetail, error)

func ConvertToInstanceThumbList

func ConvertToInstanceThumbList(ctx context.Context, instances []model.Instance, clusters []model.Cluster) []response.InstanceThumb

func ConvertToInstanceUsageList

func ConvertToInstanceUsageList(ctx context.Context, instances []model.Instance) []response.InstanceUsage

func ConvertToKeyPairInfo added in v0.7.0

func ConvertToKeyPairInfo(keyPair *model.KeyPair) response.KeyPairInfo

func ConvertToKeyPairList added in v0.7.0

func ConvertToKeyPairList(keyPairs []*model.KeyPair) []response.KeyPair

func ConvertToOrgInfo added in v0.5.1

func ConvertToOrgInfo(org *model.Org) response.OrgInfo

func ConvertToReadableStr

func ConvertToReadableStr(userType int8) string

func ConvertToTaskDetail

func ConvertToTaskDetail(instances []model.Instance, task *model.Task) *response.TaskDetailResponse

func ConvertToTaskDetailList

func ConvertToTaskDetailList(ctx context.Context, tasks []model.Task) ([]*response.TaskDetailResponse, error)

func ConvertToTaskThumbList

func ConvertToTaskThumbList(tasks []model.Task) []response.TaskThumb

func ConvertToUserThumbList

func ConvertToUserThumbList(users []model.User) []response.UserThumb

func ConvertUserTypeToInt added in v0.5.1

func ConvertUserTypeToInt(userType string) int8

func ExtractTaskInfo added in v0.2.0

func ExtractTaskInfo(task *model.Task) model.TaskInfo

func GetInstanceTypeDesc added in v0.5.0

func GetInstanceTypeDesc(cluster *model.Cluster) string

func GetPagerParamFromQuery added in v0.2.0

func GetPagerParamFromQuery(c *gin.Context) (pageNumber int, pageSize int)

func GetUserClaims

func GetUserClaims(ctx *gin.Context) *authorization.CustomClaims

func GetUserToken added in v0.2.0

func GetUserToken(c *gin.Context) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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