api

package
v0.0.16 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewError

func NewError(gc *gin.Context, status int, err error)

Types

type Controller

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

Controller api controller

func NewRestfulController

func NewRestfulController(options model.RestServiceOptions) *Controller

NewRestfulController create new controller

func (*Controller) Healthz

func (c *Controller) Healthz(gc *gin.Context)

Healthz health check api @Produce json @Summary health check @Description check status @Success 200 {object} model.StatusResponse @Failure 400 {object} model.HTTPError @Failure 503 {object} model.HTTPError @Router /healthz [get]

func (*Controller) Start

func (c *Controller) Start(ctx context.Context)

Start start http controller

func (*Controller) Stop

func (c *Controller) Stop(ctx context.Context)

Stop stop API controller

type HealthAPIManager added in v0.0.2

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

func (*HealthAPIManager) Build added in v0.0.2

func (h *HealthAPIManager) Build(engine *gin.Engine)

func (*HealthAPIManager) OnInService added in v0.0.2

func (h *HealthAPIManager) OnInService(gc *gin.Context)

OnInService inservice @Produce json @Summary inservice @Description check status @Success 200 {object} model.StatusResponse @Failure 400 {object} model.HTTPError @Failure 503 {object} model.HTTPError @Router /inservice [post]

func (*HealthAPIManager) OnInServiceProbe added in v0.0.2

func (h *HealthAPIManager) OnInServiceProbe(gc *gin.Context)

OnInServiceProbe inservice probe @Produce text @Summary inservice probe @Description check status @Success 200 {object} model.StatusResponse @Failure 400 {object} model.HTTPError @Failure 503 {object} model.HTTPError @Router /inservice [get]

func (*HealthAPIManager) OnLivenessProbe added in v0.0.2

func (h *HealthAPIManager) OnLivenessProbe(gc *gin.Context)

OnLivenessProbe liveness probe @Produce json @Summary liveness probe @Description check status @Success 200 {object} model.StatusResponse @Failure 400 {object} model.HTTPError @Failure 503 {object} model.HTTPError @Router /liveness [get]

func (*HealthAPIManager) OnOutOfService added in v0.0.2

func (h *HealthAPIManager) OnOutOfService(gc *gin.Context)

OnOutOfService out of service @Produce json @Summary out of service @Description check status @Success 200 {object} model.StatusResponse @Failure 400 {object} model.HTTPError @Failure 503 {object} model.HTTPError @Router /outofservice [post]

func (*HealthAPIManager) OnReadinessProbe added in v0.0.2

func (h *HealthAPIManager) OnReadinessProbe(gc *gin.Context)

TODO add logic handle dependency health check OnReadinessProbe readiness probe @Produce json @Summary rediness probe @Description check status @Success 200 {object} model.StatusResponse @Failure 400 {object} model.HTTPError @Failure 503 {object} model.HTTPError @Router /readiness [get]

type HelloAPIManager added in v0.0.3

type HelloAPIManager struct {
}

func (*HelloAPIManager) Build added in v0.0.3

func (h *HelloAPIManager) Build(engine *gin.Engine)

func (*HelloAPIManager) OnPing added in v0.0.3

func (h *HelloAPIManager) OnPing(gc *gin.Context)

OnPing ping @Produce json @Summary ping @Description check status @Success 200 {object} model.StatusResponse @Failure 400 {object} model.HTTPError @Failure 500 {object} model.HTTPError @Failure 503 {object} model.HTTPError @Router /ping [get]

type Route53APIManager added in v0.0.7

type Route53APIManager struct {
	Provider *Route53Provider
}

func NewRoute53APIManager added in v0.0.7

func NewRoute53APIManager(provider *Route53Provider) *Route53APIManager

func (*Route53APIManager) Build added in v0.0.7

func (m *Route53APIManager) Build(engine *gin.Engine)

func (*Route53APIManager) OnList added in v0.0.7

func (m *Route53APIManager) OnList(gc *gin.Context)

OnPing ping @Produce json @Summary ping @Description check status @Success 200 {object} model.StatusResponse @Failure 400 {object} model.HTTPError @Failure 500 {object} model.HTTPError @Failure 503 {object} model.HTTPError @Router /ping [get]

type Route53Provider added in v0.0.7

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

func NewRoute53Provider added in v0.0.7

func NewRoute53Provider() *Route53Provider

func (*Route53Provider) GetCallerIdentity added in v0.0.11

func (p *Route53Provider) GetCallerIdentity() error

func (*Route53Provider) ListHostedZones added in v0.0.7

func (p *Route53Provider) ListHostedZones() ([]model.HostedZone, error)

Jump to

Keyboard shortcuts

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