api

package
v2.0.0-alpha.68 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RawJSONBody

func RawJSONBody(mode bool)

func SetGzipLevel

func SetGzipLevel(level int)

Types

type API

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

func ListAPIs

func ListAPIs(endPoint string, nr *hap.NetRange) *API

func New

func New(endPoint string) *API

func (*API) AllowCORS

func (a *API) AllowCORS(sites ...string) *API

func (*API) EnableGZIP

func (a *API) EnableGZIP() *API

func (*API) Endpoint

func (a *API) Endpoint() string

func (*API) ServeHTTP

func (a *API) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*API) Spec

func (a *API) Spec(f *message.Printer) []hap.ApiSpec

func (*API) WithCorsHeaders

func (a *API) WithCorsHeaders(heads ...string) *API

func (*API) WithCorsMethods

func (a *API) WithCorsMethods(verbs ...string) *API

func (*API) WithHandlers

func (a *API) WithHandlers(hs ...*handler.Handler) *API

func (*API) WithRawJSONBody

func (a *API) WithRawJSONBody() *API

Jump to

Keyboard shortcuts

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