common

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigNotSetError = "Funktion deaktiviert oder falsch konfiguriert. Kontaktieren Sie bitte das CLP Team"

Variables

This section is empty.

Functions

func ContainsEmptyString added in v1.3.21

func ContainsEmptyString(ss ...string) bool

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 GetUserMail added in v1.2.0

func GetUserMail(c *gin.Context) string

GetUserMail returns the users mail address based of the gin.Context

func GetUserName

func GetUserName(c *gin.Context) string

GetUserName returns the username based of the gin.Context

func RandomString added in v1.3.21

func RandomString(length int) string

func RemoveDuplicates added in v1.3.9

func RemoveDuplicates(elements []string) []string

Types

type AdminList added in v1.1.5

type AdminList struct {
	Admins []string `json:"admins"`
}

type ApiResponse added in v1.0.9

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

type Bucket added in v1.1.6

type Bucket struct {
	Name    string `json:"name"`
	Account string `json:"account"`
}

type BucketListResponse added in v1.1.6

type BucketListResponse struct {
	Buckets []Bucket `json:"buckets"`
}

type CreateLogseneAppCommand added in v1.2.0

type CreateLogseneAppCommand struct {
	AppName      string `json:"appName"`
	DiscountCode string `json:"discountCode"`
	EditSematextPlanCommand
	EditBillingDataCommand
}

type CreateSnapshotCommand added in v1.3.0

type CreateSnapshotCommand struct {
	InstanceId  string `json:"instanceId"`
	VolumeId    string `json:"volumeId"`
	Description string `json:"description"`
	Account     string `json:"account"`
}

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"`
	Text                string  `json:"text"`
	Art                 string  `json:"art"`
	Project             string  `json:"project"`
	Host                string  `json:"host"`
	Backup              bool    `json:"backup"`
	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 {
	OpenshiftBase
	Billing string `json:"billing"`
}

type EditQuotasCommand added in v1.0.9

type EditQuotasCommand struct {
	OpenshiftBase
	CPU    int `json:"cpu"`
	Memory int `json:"memory"`
}

type EditSematextPlanCommand added in v1.2.0

type EditSematextPlanCommand struct {
	PlanId int `json:"planId"`
	Limit  int `json:"limit"`
}

type FixVolumeCommand added in v1.0.9

type FixVolumeCommand struct {
	OpenshiftBase
}

type GrowVolumeCommand added in v1.0.9

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

type Instance added in v1.2.5

type Instance struct {
	Name             string          `json:"name"`
	InstanceId       string          `json:"instanceId"`
	InstanceType     string          `json:"instanceType"`
	ImageId          string          `json:"imageId"`
	ImageName        string          `json:"imageName"`
	LaunchTime       *time.Time      `json:"launchTime"`
	State            string          `json:"state"`
	PrivateIpAddress string          `json:"privateIpAddress"`
	Account          string          `json:"account"`
	Snapshots        []*ec2.Snapshot `json:"snapshots"`
	Volumes          []Volume        `json:"volumes"`
	Tags             []*ec2.Tag      `json:"tags"`
}

type InstanceListResponse added in v1.2.5

type InstanceListResponse struct {
	Instances []Instance `json:"instances"`
}

type JsonPatch added in v1.3.21

type JsonPatch struct {
	Operation string      `json:"op"`
	Path      string      `json:"path"`
	Value     interface{} `json:"value"`
}

type NewProjectCommand added in v1.0.9

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

type NewPullSecretCommand added in v1.3.21

type NewPullSecretCommand struct {
	OpenshiftBase
	Username string
	Password string
}

type NewS3BucketCommand added in v1.1.6

type NewS3BucketCommand struct {
	ProjectName
	BucketName string `json:"bucketname"`
	Billing    string `json:"billing"`
	Stage      string `json:"stage"`
}

type NewS3UserCommand added in v1.1.6

type NewS3UserCommand struct {
	UserName   string `json:"username"`
	IsReadonly bool   `json:"isReadonly"`
}

type NewServiceAccountCommand added in v1.0.9

type NewServiceAccountCommand struct {
	OpenshiftBase
	ServiceAccount  string `json:"serviceAccount"`
	OrganizationKey string `json:"organizationKey"`
}

type NewTestProjectCommand added in v1.0.9

type NewTestProjectCommand struct {
	OpenshiftBase
}

type NewVolumeApiResponse added in v1.3.2

type NewVolumeApiResponse struct {
	Message string            `json:"message"`
	Data    NewVolumeResponse `json:"data"`
}

type NewVolumeCommand added in v1.0.9

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

type NewVolumeResponse added in v1.3.2

type NewVolumeResponse struct {
	PvName string
	Server string
	Path   string
	JobId  int
}

type OpenshiftBase added in v1.4.0

type OpenshiftBase struct {
	Project   string `json:"project"`
	ClusterId string `json:"clusterid"`
}

type ProjectName added in v1.0.9

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

type S3CredentialsResponse added in v1.1.6

type S3CredentialsResponse struct {
	Username    string `json:"username"`
	AccessKeyID string `json:"accesskeyid"`
	SecretKey   string `json:"secretkey"`
	Password    string `json:"password"`
}

type SematextAppList added in v1.2.0

type SematextAppList struct {
	AppId         int     `json:"appId"`
	Name          string  `json:"name"`
	PlanName      string  `json:"planName"`
	UserRole      string  `json:"userRole"`
	IsFree        bool    `json:"isFree"`
	PricePerMonth float64 `json:"pricePerMonth"`
	BillingInfo   string  `json:"billingInfo"`
}

type SematextLogsenePlan added in v1.2.0

type SematextLogsenePlan struct {
	PlanId                     int     `json:"planId"`
	Name                       string  `json:"name"`
	IsFree                     bool    `json:"isFree"`
	PricePerMonth              float64 `json:"pricePerMonth"`
	DefaultDailyMaxLimitSizeMb float64 `json:"defaultDailyMaxLimitSizeMb"`
}

type SnapshotApiResponse added in v1.3.0

type SnapshotApiResponse struct {
	Message  string       `json:"message"`
	Snapshot ec2.Snapshot `json:"snapshot"`
}

type User added in v1.3.6

type User struct {
	UserId string
	Email  string
}

type Volume added in v1.3.0

type Volume struct {
	DeviceName string `json:"deviceName"`
	VolumeId   string `json:"volumeId"`
}

type WorkflowCommand added in v1.3.2

type WorkflowCommand struct {
	UserInputValues []WorkflowKeyValue `json:"userInputValues"`
}

type WorkflowExecutionProgress added in v1.3.2

type WorkflowExecutionProgress struct {
	CurrentCommandIndex float64 `json:"current-command-index"`
	CommandsNumber      float64 `json:"commands-number"`
}

type WorkflowJob added in v1.3.2

type WorkflowJob struct {
	JobId     int               `json:"jobId"`
	JobStatus WorkflowJobStatus `json:"jobStatus"`
}

type WorkflowJobStatus added in v1.3.2

type WorkflowJobStatus struct {
	JobStatus                 string                    `json:"jobStatus"`
	ErrorMessage              string                    `json:"errorMessage"`
	ReturnParameters          []WorkflowKeyValue        `json:"returnParameters"`
	WorkflowExecutionProgress WorkflowExecutionProgress `json:"workflow-execution-progress"`
}

type WorkflowKeyValue added in v1.3.2

type WorkflowKeyValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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