common

package
v0.0.0-...-40a75d2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package common provides primitives to interact the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Package common provides primitives to interact the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.

Index

Constants

View Source
const (
	JwtAuthScopes = "jwtAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (*openapi3.Swagger, error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file.

Types

type AdminCreateTemplateJSONBody

type AdminCreateTemplateJSONBody Template

AdminCreateTemplateJSONBody defines parameters for AdminCreateTemplate.

type AdminCreateTemplateJSONRequestBody

type AdminCreateTemplateJSONRequestBody AdminCreateTemplateJSONBody

AdminCreateTemplateJSONRequestBody defines body for AdminCreateTemplate for application/json ContentType.

type AdminSetGroupQuotaJSONBody

type AdminSetGroupQuotaJSONBody Quota

AdminSetGroupQuotaJSONBody defines parameters for AdminSetGroupQuota.

type AdminSetGroupQuotaJSONRequestBody

type AdminSetGroupQuotaJSONRequestBody AdminSetGroupQuotaJSONBody

AdminSetGroupQuotaJSONRequestBody defines body for AdminSetGroupQuota for application/json ContentType.

type AdminSetUserQuotaJSONBody

type AdminSetUserQuotaJSONBody Quota

AdminSetUserQuotaJSONBody defines parameters for AdminSetUserQuota.

type AdminSetUserQuotaJSONRequestBody

type AdminSetUserQuotaJSONRequestBody AdminSetUserQuotaJSONBody

AdminSetUserQuotaJSONRequestBody defines body for AdminSetUserQuota for application/json ContentType.

type CreateServerJSONBody

type CreateServerJSONBody CreateServerRequest

CreateServerJSONBody defines parameters for CreateServer.

type CreateServerJSONRequestBody

type CreateServerJSONRequestBody CreateServerJSONBody

CreateServerJSONRequestBody defines body for CreateServer for application/json ContentType.

type CreateServerRequest

type CreateServerRequest struct {
	Description string `json:"description"`
	Flavor      Flavor `json:"flavor"`
	Name        string `json:"name"`
	TemplateId  int    `json:"template_id"`

	// custom variables of this server
	TemplateVariables TemplateVariables `json:"template_variables"`
}

CreateServerRequest defines model for CreateServerRequest.

func (*CreateServerRequest) Bind

func (v *CreateServerRequest) Bind(r *http.Request) error

type Flavor

type Flavor struct {

	// cpu size in micro cores (mcore), 1000mcore = 1core
	Cpu int `json:"cpu"`

	// memory size in MiB, 1024MiB = 1GiB
	Memory int `json:"memory"`

	// gpu unit
	NvidiaGpu int `json:"nvidia_gpu"`
}

Flavor defines model for Flavor.

func (*Flavor) Bind

func (v *Flavor) Bind(r *http.Request) error

type LoginRequest

type LoginRequest struct {
	Id string `json:"id"`
	Pw string `json:"pw"`
}

LoginRequest defines model for LoginRequest.

func (*LoginRequest) Bind

func (v *LoginRequest) Bind(r *http.Request) error

type LoginUserJSONBody

type LoginUserJSONBody LoginRequest

LoginUserJSONBody defines parameters for LoginUser.

type LoginUserJSONRequestBody

type LoginUserJSONRequestBody LoginUserJSONBody

LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType.

type Quota

type Quota struct {

	// cpu size in micro cores (mcore), 1000mcore = 1core
	Cpu int `json:"cpu"`

	// instance count
	Instance int `json:"instance"`

	// memory size in MiB, 1024MiB = 1GiB
	Memory int `json:"memory"`

	// gpu unit
	NvidiaGpu int `json:"nvidia_gpu"`

	// storage size in GiB, 1024GiB = 1TiB
	Storage int `json:"storage"`
}

Quota defines model for Quota.

func (*Quota) Bind

func (v *Quota) Bind(r *http.Request) error

type Reason

type Reason struct {
	Reason string `json:"reason"`
}

Reason defines model for Reason.

func GetReason

func GetReason(msg string) *Reason

GetReason Create Reason Message

func GetReasonf

func GetReasonf(format string, a ...interface{}) *Reason

GetReasonf Create Reason Message with formatting

type ServerObject

type ServerObject struct {

	// Creation date and time
	CreatedAt time.Time `json:"created_at"`

	// description of this server
	Description string `json:"description"`
	Flavor      Flavor `json:"flavor"`

	// id of this server
	Id int `json:"id"`

	// timestamp of last health check time
	LastProbeTime time.Time `json:"last_probe_time"`

	// timestamp of last transition of this server
	LastTransitionTime time.Time `json:"last_transition_time"`

	// show last event of this server. error message will be shown here.
	Message string `json:"message"`

	// name of this server
	Name  string   `json:"name"`
	Owner []string `json:"owner"`

	// show current status of this server
	Status   string   `json:"status"`
	Template Template `json:"template"`
}

ServerObject defines model for ServerObject.

type Template

type Template struct {

	// kubernetes corev1/pod yaml based template
	Body        string `json:"body"`
	Description string `json:"description"`
	Id          int    `json:"id"`
	Name        string `json:"name"`

	// custom variables of this server
	Variables TemplateVariables `json:"variables"`
}

Template defines model for Template.

func (*Template) Bind

func (v *Template) Bind(r *http.Request) error

type TemplateVariable

type TemplateVariable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

TemplateVariable defines model for TemplateVariable.

type TemplateVariables

type TemplateVariables []TemplateVariable

TemplateVariables defines model for TemplateVariables.

type UpdateUserInfoJSONBody

type UpdateUserInfoJSONBody struct {
	NewPassword *string `json:"new_password,omitempty"`
	Password    *string `json:"password,omitempty"`
}

UpdateUserInfoJSONBody defines parameters for UpdateUserInfo.

type UpdateUserInfoJSONRequestBody

type UpdateUserInfoJSONRequestBody UpdateUserInfoJSONBody

UpdateUserInfoJSONRequestBody defines body for UpdateUserInfo for application/json ContentType.

type UserInfo

type UserInfo struct {
	GroupQuota Quota  `json:"group_quota"`
	Id         string `json:"id"`
	UserQuota  Quota  `json:"user_quota"`
}

UserInfo defines model for UserInfo.

Jump to

Keyboard shortcuts

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