util

package
v0.0.0-...-ea7eeef Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const BadRequestCode int = 400

Variables

This section is empty.

Functions

func BackupConfigModelToResource

func BackupConfigModelToResource(model *models.BackupConfig) *v1.Secret

func BackupConfigResourceToModel

func BackupConfigResourceToModel(resource *v1.Secret) *models.BackupConfig

func CreateBackupResource

func CreateBackupResource(client rest.Interface, ns, name, schedule string) error

TODO: Should be moved into operator's package/repo

func CreateBackupRestoreResource

func CreateBackupRestoreResource(client rest.Interface, ns, name, backup, database string) error

func DeleteBackupResource

func DeleteBackupResource(client rest.Interface, ns, name string) error

func GetBackupResource

func GetBackupResource(client rest.Interface, ns, name string) (*kuberlogicv1.KuberLogicBackupSchedule, error)

func JoinID

func JoinID(ns, name string) (string, error)

func SplitID

func SplitID(str string) (string, string, error)

func UpdateBackupResource

func UpdateBackupResource(client rest.Interface, ns, name, schedule string) error

Types

type BadRequest

type BadRequest struct {
	Payload *models.Error `json:"body,omitempty"`
}

func BadRequestFromError

func BadRequestFromError(err error) *BadRequest

func (*BadRequest) SetPayload

func (o *BadRequest) SetPayload(payload *models.Error)

SetPayload sets the payload to the kuberlogic add bad request response

func (*BadRequest) WithPayload

func (o *BadRequest) WithPayload(payload *models.Error) *BadRequest

WithPayload adds the payload to the kuberlogic add bad request response

func (*BadRequest) WriteResponse

func (o *BadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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