http

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RequestType           = types.NewObjectType("http.CheckRequest")
	RequestAttributesType = types.NewObjectType("http.CheckRequestAttributes")
	ResponseType          = types.NewObjectType("http.CheckResponse")
	ResponseOkType        = types.NewObjectType("http.CheckResponseOk")
	ResponseDeniedType    = types.NewObjectType("http.CheckResponseDenied")
)

Functions

func Lib

func Lib() cel.EnvOption

Types

type CheckRequest

type CheckRequest struct {
	Attributes CheckRequestAttributes `cel:"attributes"`
}

func NewRequest

func NewRequest(r *http.Request) (CheckRequest, error)

type CheckRequestAttributes

type CheckRequestAttributes struct {
	Method        string `cel:"method"`
	Header        header `cel:"header"`
	Host          string `cel:"host"`
	Protocol      string `cel:"protocol"`
	ContentLength int64  `cel:"contentLength"`
	Body          []byte `cel:"body"`
	Scheme        string `cel:"scheme"`
	Path          string `cel:"path"`
	Query         query  `cel:"query"`
	Fragment      string `cel:"fragment"`
}

type CheckResponse

type CheckResponse struct {
	Ok     *CheckResponseOk     `cel:"ok"`
	Denied *CheckResponseDenied `cel:"denied"`
}

type CheckResponseDenied

type CheckResponseDenied struct {
	Reason string `cel:"reason"`
}

type CheckResponseOk

type CheckResponseOk struct{}

Jump to

Keyboard shortcuts

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