api

package
v0.0.0-...-4f441f0 Latest Latest
Warning

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

Go to latest
Published: May 5, 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 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 ResponseV2

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

global response body used across api

type RestHandler

type RestHandler interface {
	TelemetryEventReceiver(w http.ResponseWriter, r *http.Request)
}

type RestHandlerImpl

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

func NewRestHandlerImpl

func NewRestHandlerImpl(logger *zap.SugaredLogger) *RestHandlerImpl

func (*RestHandlerImpl) TelemetryEventReceiver

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

Jump to

Keyboard shortcuts

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