common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigHandler added in v1.0.9

func ConfigHandler(c *gin.Context)

func DebugMode

func DebugMode() bool

DebugMode returns if gin is running in debug mode

func GetAuthMiddleware

func GetAuthMiddleware() *jwt.GinJWTMiddleware

GetAuthMiddleware returns a gin middleware for JWT with cookie based auth

func GetUserName

func GetUserName(c *gin.Context) string

GetUserName returns the username based of the gin.Context

func ValidateIntInput

func ValidateIntInput(maxValue string, input string) error

ValidateIntInput checks if a the value is bigger than the specified maxValue

Types

type ApiResponse added in v1.0.9

type ApiResponse struct {
	Message string `json:"message"`
}

type Assignment added in v1.0.9

type Assignment struct {
	Results []AssignmentResult
}

type AssignmentResult added in v1.0.9

type AssignmentResult struct {
	Latest string
}

type Costs added in v1.0.9

type Costs struct {
	QuotaCPU        float64
	QuotaMemory     float64
	Storage         float64
	RequestedCPU    float64
	RequestedMemory float64
	UsedCPU         float64
	UsedMemory      float64
	Total           float64
}

type DDCBilling added in v1.0.9

type DDCBilling struct {
	Rows []DDCBillingRow `json:"rows"`
	CSV  string          `json:"csv"`
}

type DDCBillingRow added in v1.1.0

type DDCBillingRow struct {
	Sender              string  `json:"sender"`
	Art                 string  `json:"art"`
	Project             string  `json:"project"`
	Host                string  `json:"host"`
	ReceptionAssignment string  `json:"receptionAssignment"`
	OrderReception      string  `json:"orderReception"`
	PspElement          string  `json:"pspElement"`
	TotalCPU            float64 `json:"totalCpu"`
	TotalMemory         float64 `json:"totalMemory"`
	TotalStorage        float64 `json:"totalStorage"`
	Total               float64 `json:"total"`
}

type EditBillingDataCommand added in v1.0.9

type EditBillingDataCommand struct {
	ProjectName
	Billing string `json:"billing"`
}

type EditQuotasCommand added in v1.0.9

type EditQuotasCommand struct {
	ProjectName
	CPU    string `json:"cpu"`
	Memory string `json:"memory"`
}

type FeatureToggleResponse added in v1.0.9

type FeatureToggleResponse struct {
	Gluster bool `json:"gluster"`
	DDC     bool `json:"ddc"`
}

type FixVolumeCommand added in v1.0.9

type FixVolumeCommand struct {
	ProjectName
}

type GrowVolumeCommand added in v1.0.9

type GrowVolumeCommand struct {
	ProjectName
	NewSize string `json:"newSize"`
	PvName  string `json:"pvName"`
}

type NewProjectCommand added in v1.0.9

type NewProjectCommand struct {
	ProjectName
	Billing string `json:"billing"`
	MegaId  string `json:"megaId"`
}

type NewServiceAccountCommand added in v1.0.9

type NewServiceAccountCommand struct {
	ProjectName
	ServiceAccount string `json:"serviceAccount"`
}

type NewTestProjectCommand added in v1.0.9

type NewTestProjectCommand struct {
	ProjectName
}

type NewVolumeCommand added in v1.0.9

type NewVolumeCommand struct {
	ProjectName
	Size    string `json:"size"`
	PvcName string `json:"pvcName"`
	Mode    string `json:"mode"`
}

type ProjectName added in v1.0.9

type ProjectName struct {
	Project string `json:"project"`
}

type Quota added in v1.0.9

type Quota struct {
	Results []QuotaResult
}

type QuotaResult added in v1.0.9

type QuotaResult struct {
	Average float64
}

type Resources added in v1.0.9

type Resources struct {
	Project           string
	Start             time.Time
	End               time.Time
	AccountAssignment string
	QuotaCPU          float64
	QuotaMemory       float64
	RequestedCPU      float64
	RequestedMemory   float64
	Storage           float64
	TotalUsedCPU      float64
	TotalUsedMemory   float64
	UsageDataPoints   []UsageDataPoint
	Costs             Costs
}

type UnitPrices added in v1.0.9

type UnitPrices struct {
	// contains filtered or unexported fields
}

type Usage added in v1.0.9

type Usage struct {
	Results []UsageResult
	End     time.Time
}

type UsageDataPoint added in v1.0.9

type UsageDataPoint struct {
	UsedCPU    float64
	UsedMemory float64
	End        time.Time
}

type UsageResult added in v1.0.9

type UsageResult struct {
	Result float64
}

Jump to

Keyboard shortcuts

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