http

package
v0.1.3-beta Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTTP

func GetHTTP() *http.Server

func Http

func Http(opts ...Option) plugin.Plugin

func ResponseEncoder

func ResponseEncoder(w http.ResponseWriter, r *http.Request, data interface{}) error

func ResponsePack

func ResponsePack() middleware.Middleware

Types

type Option

type Option func(h *ServiceHttp)

func Config

func Config(c *conf.Http) Option

func Weight

func Weight(w int) Option

type Response

type Response struct {
	Code    int         `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string      `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Data    interface{} `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

type ServiceHttp

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

func (*ServiceHttp) ConfPrefix

func (h *ServiceHttp) ConfPrefix() string

func (*ServiceHttp) DependsOn

func (h *ServiceHttp) DependsOn(b config.Value) []string

func (*ServiceHttp) Load

func (h *ServiceHttp) Load(b config.Value) (plugin.Plugin, error)

func (*ServiceHttp) Name

func (h *ServiceHttp) Name() string

func (*ServiceHttp) Unload

func (h *ServiceHttp) Unload() error

func (*ServiceHttp) Weight

func (h *ServiceHttp) Weight() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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