handlers

package
v2.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handlers

type Handlers struct {
	Service service.REST
}

func New

func New(service service.REST) *Handlers

func (*Handlers) AddCDNClusterToSecurityGroup

func (h *Handlers) AddCDNClusterToSecurityGroup(ctx *gin.Context)

@Summary Add CDN to SecurityGroup @Description Add CDN to SecurityGroup @Tags SecurityGroup @Accept json @Produce json @Param id path string true "id" @Param instance_id path string true "instance id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /security-groups/{id}/cdn-clusters/{cdn_cluster_id} [put]

func (*Handlers) AddCDNToCDNCluster

func (h *Handlers) AddCDNToCDNCluster(ctx *gin.Context)

@Summary Add Instance to CDNCluster @Description Add CDN to CDNCluster @Tags CDNCluster @Accept json @Produce json @Param id path string true "id" @Param cdn_id path string true "cdn id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdn-clusters/{id}/cdns/{cdn_id} [put]

func (*Handlers) AddSchedulerClusterToCDNCluster

func (h *Handlers) AddSchedulerClusterToCDNCluster(ctx *gin.Context)

@Summary Add SchedulerCluster to CDNCluster @Description Add SchedulerCluster to CDNCluster @Tags CDNCluster @Accept json @Produce json @Param id path string true "id" @Param scheduler_cluster_id path string true "scheduler cluster id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdn-clusters/{id}/scheduler-clusters/{scheduler_cluster_id} [put]

func (*Handlers) AddSchedulerClusterToSecurityGroup

func (h *Handlers) AddSchedulerClusterToSecurityGroup(ctx *gin.Context)

@Summary Add Scheduler to SecurityGroup @Description Add Scheduler to SecurityGroup @Tags SecurityGroup @Accept json @Produce json @Param id path string true "id" @Param instance_id path string true "instance id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /security-groups/{id}/scheduler-clusters/{scheduler_cluster_id} [put]

func (*Handlers) AddSchedulerToSchedulerCluster

func (h *Handlers) AddSchedulerToSchedulerCluster(ctx *gin.Context)

@Summary Add Scheduler to schedulerCluster @Description Add Scheduler to schedulerCluster @Tags SchedulerCluster @Accept json @Produce json @Param id path string true "id" @Param scheduler_id path string true "scheduler id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /scheduler-clusters/{id}/schedulers/{scheduler_id} [put]

func (*Handlers) CreateCDN

func (h *Handlers) CreateCDN(ctx *gin.Context)

@Summary Create CDN @Description create by json config @Tags CDN @Accept json @Produce json @Param CDN body types.CreateCDNRequest true "CDN" @Success 200 {object} model.CDN @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdns [post]

func (*Handlers) CreateCDNCluster

func (h *Handlers) CreateCDNCluster(ctx *gin.Context)

@Summary Create CDNCluster @Description create by json config @Tags CDNCluster @Accept json @Produce json @Param CDNCluster body types.CreateCDNClusterRequest true "DNCluster" @Success 200 {object} model.DNCluster @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdn-clusters [post]

func (*Handlers) CreateScheduler

func (h *Handlers) CreateScheduler(ctx *gin.Context)

@Summary Create Scheduler @Description create by json config @Tags Scheduler @Accept json @Produce json @Param Scheduler body types.CreateSchedulerRequest true "Scheduler" @Success 200 {object} model.Scheduler @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /schedulers [post]

func (*Handlers) CreateSchedulerCluster

func (h *Handlers) CreateSchedulerCluster(ctx *gin.Context)

@Summary Create SchedulerCluster @Description create by json config @Tags SchedulerCluster @Accept json @Produce json @Param SchedulerCluster body types.CreateSchedulerClusterRequest true "SchedulerCluster" @Success 200 {object} model.SchedulerCluster @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /scheduler-clusters [post]

func (*Handlers) CreateSecurityGroup

func (h *Handlers) CreateSecurityGroup(ctx *gin.Context)

@Summary Create SecurityGroup @Description create by json config @Tags SecurityGroup @Accept json @Produce json @Param SecurityGroup body types.CreateSecurityGroupRequest true "SecurityGroup" @Success 200 {object} model.SecurityGroup @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /security-groups [post]

func (*Handlers) DestroyCDN

func (h *Handlers) DestroyCDN(ctx *gin.Context)

@Summary Destroy CDN @Description Destroy by id @Tags CDN @Accept json @Produce text @Param id path string true "id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdns/{id} [delete]

func (*Handlers) DestroyCDNCluster

func (h *Handlers) DestroyCDNCluster(ctx *gin.Context)

@Summary Destroy CDNCluster @Description Destroy by id @Tags CDNCluster @Accept json @Produce json @Param id path string true "id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdn-clusters/{id} [delete]

func (*Handlers) DestroyScheduler

func (h *Handlers) DestroyScheduler(ctx *gin.Context)

@Summary Destroy Scheduler @Description Destroy by id @Tags Scheduler @Accept json @Produce json @Param id path string true "id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /schedulers/{id} [delete]

func (*Handlers) DestroySchedulerCluster

func (h *Handlers) DestroySchedulerCluster(ctx *gin.Context)

@Summary Destroy SchedulerCluster @Description Destroy by id @Tags SchedulerCluster @Accept json @Produce json @Param id path string true "id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /scheduler-clusters/{id} [delete]

func (*Handlers) DestroySecurityGroup

func (h *Handlers) DestroySecurityGroup(ctx *gin.Context)

@Summary Destroy SecurityGroup @Description Destroy by id @Tags SecurityGroup @Accept json @Produce json @Param id path string true "id" @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /securityGroups/{id} [delete]

func (*Handlers) GetCDN

func (h *Handlers) GetCDN(ctx *gin.Context)

@Summary Get CDN @Description Get CDN by id @Tags CDN @Accept json @Produce json @Param id path string true "id" @Success 200 {object} model.CDN @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdns/{id} [get]

func (*Handlers) GetCDNCluster

func (h *Handlers) GetCDNCluster(ctx *gin.Context)

@Summary Get CDNCluster @Description Get CDNCluster by id @Tags CDNCluster @Accept json @Produce json @Param id path string true "id" @Success 200 {object} model.CDNCluster @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdn-clusters/{id} [get]

func (*Handlers) GetCDNClusters

func (h *Handlers) GetCDNClusters(ctx *gin.Context)

@Summary Get CDNClusters @Description Get CDNClusters @Tags CDNCluster @Accept json @Produce json @Param page query int true "current page" default(0) @Param per_page query int true "return max item count, default 10, max 50" default(10) minimum(2) maximum(50) @Success 200 {object} []model.CDNCluster @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdn-clusters [get]

func (*Handlers) GetCDNs

func (h *Handlers) GetCDNs(ctx *gin.Context)

@Summary Get CDNs @Description Get CDNs @Tags CDN @Accept json @Produce json @Param page query int true "current page" default(0) @Param per_page query int true "return max item count, default 10, max 50" default(10) minimum(2) maximum(50) @Success 200 {object} []model.CDN @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdns [get]

func (*Handlers) GetHealth

func (h *Handlers) GetHealth(ctx *gin.Context)

@Summary Get Health @Description Get app health @Tags Health @Accept json @Produce json @Success 200 @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /healthy/*action [get]

func (*Handlers) GetScheduler

func (h *Handlers) GetScheduler(ctx *gin.Context)

@Summary Get Scheduler @Description Get Scheduler by id @Tags Scheduler @Accept json @Produce json @Param id path string true "id" @Success 200 {object} model.Scheduler @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /schedulers/{id} [get]

func (*Handlers) GetSchedulerCluster

func (h *Handlers) GetSchedulerCluster(ctx *gin.Context)

@Summary Get SchedulerCluster @Description Get SchedulerCluster by id @Tags SchedulerCluster @Accept json @Produce json @Param id path string true "id" @Success 200 {object} model.SchedulerCluster @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /scheduler-clusters/{id} [get]

func (*Handlers) GetSchedulerClusters

func (h *Handlers) GetSchedulerClusters(ctx *gin.Context)

@Summary Get SchedulerClusters @Description Get SchedulerClusters @Tags SchedulerCluster @Accept json @Produce json @Param page query int true "current page" default(0) @Param per_page query int true "return max item count, default 10, max 50" default(10) minimum(2) maximum(50) @Success 200 {object} []model.SchedulerCluster @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /scheduler-clusters [get]

func (*Handlers) GetSchedulers

func (h *Handlers) GetSchedulers(ctx *gin.Context)

@Summary Get Schedulers @Description Get Schedulers @Tags Scheduler @Accept json @Produce json @Param page query int true "current page" default(0) @Param per_page query int true "return max item count, default 10, max 50" default(10) minimum(2) maximum(50) @Success 200 {object} []model.Scheduler @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /schedulers [get]

func (*Handlers) GetSecurityGroup

func (h *Handlers) GetSecurityGroup(ctx *gin.Context)

@Summary Get SecurityGroup @Description Get SecurityGroup by id @Tags SecurityGroup @Accept json @Produce json @Param id path string true "id" @Success 200 {object} model.SecurityGroup @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /security-groups/{id} [get]

func (*Handlers) GetSecurityGroups

func (h *Handlers) GetSecurityGroups(ctx *gin.Context)

@Summary Get SecurityGroups @Description Get SecurityGroups @Tags SecurityGroup @Accept json @Produce json @Param page query int true "current page" default(0) @Param per_page query int true "return max item count, default 10, max 50" default(10) minimum(2) maximum(50) @Success 200 {object} []model.SecurityGroup @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /security-groups[get]

func (*Handlers) Register

func (h *Handlers) Register(ctx *gin.Context)

@Summary Register user @Description Register user by json config @Tags User @Accept json @Produce json @Param User body types.RegisterRequest true "User" @Success 200 {object} model.User @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Router /auth/register [post]

func (*Handlers) UpdateCDN

func (h *Handlers) UpdateCDN(ctx *gin.Context)

@Summary Update CDN @Description Update by json config @Tags CDN @Accept json @Produce json @Param id path string true "id" @Param CDN body types.UpdateCDNRequest true "CDN" @Success 200 {object} model.CDN @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdns/{id} [patch]

func (*Handlers) UpdateCDNCluster

func (h *Handlers) UpdateCDNCluster(ctx *gin.Context)

@Summary Update CDNCluster @Description Update by json config @Tags CDNCluster @Accept json @Produce json @Param id path string true "id" @Param CDNCluster body types.UpdateCDNClusterRequest true "CDNCluster" @Success 200 {object} model.CDNCluster @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /cdn-clusters/{id} [patch]

func (*Handlers) UpdateScheduler

func (h *Handlers) UpdateScheduler(ctx *gin.Context)

@Summary Update Scheduler @Description Update by json config @Tags Scheduler @Accept json @Produce json @Param id path string true "id" @Param Scheduler body types.UpdateSchedulerRequest true "Scheduler" @Success 200 {object} model.Scheduler @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /schedulers/{id} [patch]

func (*Handlers) UpdateSchedulerCluster

func (h *Handlers) UpdateSchedulerCluster(ctx *gin.Context)

@Summary Update SchedulerCluster @Description Update by json config @Tags SchedulerCluster @Accept json @Produce json @Param id path string true "id" @Param SchedulerCluster body types.UpdateSchedulerClusterRequest true "SchedulerCluster" @Success 200 {object} model.SchedulerCluster @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /scheduler-clusters/{id} [patch]

func (*Handlers) UpdateSecurityGroup

func (h *Handlers) UpdateSecurityGroup(ctx *gin.Context)

@Summary Update SecurityGroup @Description Update by json config @Tags SecurityGroup @Accept json @Produce json @Param id path string true "id" @Param SecurityGroup body types.UpdateSecurityGroupRequest true "SecurityGroup" @Success 200 {object} model.SecurityGroup @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /security-groups/{id} [patch]

Jump to

Keyboard shortcuts

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