api

package
v0.0.0-...-6ac6f58 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionV1 = "v1"

	PathV1 = prefix + VersionV1
)

define vars

Variables

This section is empty.

Functions

func ReturnRest

func ReturnRest(resp *RestResponse)

ReturnRest : return http response

Types

type HTTPHandle

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

HTTPHandle : http handle

func NewHTTPHandle

func NewHTTPHandle(conf *config.ServerConfig) (*HTTPHandle, error)

NewHTTPHandle : return new http handle

func (*HTTPHandle) GetActions

func (a *HTTPHandle) GetActions() []*httpserver.Action

GetActions : Get V1 actions

type RestResponse

type RestResponse struct {
	Resp     *restful.Response
	HTTPCode int

	Data    interface{}
	ErrCode commonTypes.ServerErrCode
	Message string
	Extra   map[string]interface{}

	WrapFunc func([]byte) []byte
}

RestResponse : data struct for http response

Jump to

Keyboard shortcuts

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