api

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 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 ApiError

type ApiError struct {
	HttpStatusCode    int         `json:"-"`
	Code              string      `json:"code,omitempty"`
	InternalMessage   string      `json:"internalMessage,omitempty"`
	UserMessage       interface{} `json:"userMessage,omitempty"`
	UserDetailMessage string      `json:"userDetailMessage,omitempty"`
}

type MuxRouter

type MuxRouter struct {
	Router *mux.Router
	// contains filtered or unexported fields
}

func NewMuxRouter

func NewMuxRouter(logger *zap.SugaredLogger, restHandler RestHandler) *MuxRouter

func (MuxRouter) Init

func (r MuxRouter) Init()

type ResetRequest

type ResetRequest struct {
	AppId         int `json:"appId"`
	EnvironmentId int `json:"environmentId"`
}

type Response

type Response struct {
	Code   int         `json:"code,omitempty"`
	Status string      `json:"status,omitempty"`
	Result interface{} `json:"result,omitempty"`
	Errors []*ApiError `json:"errors,omitempty"`
}

type RestHandler

type RestHandler interface {
	GetDeploymentMetrics(w http.ResponseWriter, r *http.Request)
	ProcessDeploymentEvent(w http.ResponseWriter, r *http.Request)
	ResetApplication(w http.ResponseWriter, r *http.Request)
}

type RestHandlerImpl

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

func NewRestHandlerImpl

func NewRestHandlerImpl(logger *zap.SugaredLogger,
	deploymentMetricService pkg.DeploymentMetricService,
	ingestionService pkg.IngestionService) *RestHandlerImpl

func (*RestHandlerImpl) GetDeploymentMetrics

func (impl *RestHandlerImpl) GetDeploymentMetrics(w http.ResponseWriter, r *http.Request)

func (*RestHandlerImpl) ProcessDeploymentEvent

func (impl *RestHandlerImpl) ProcessDeploymentEvent(w http.ResponseWriter, r *http.Request)

func (*RestHandlerImpl) ResetApplication

func (impl *RestHandlerImpl) ResetApplication(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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