http_ns

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HTTP_REQUEST_PROPNAMES = []string{"method", "url", "path", "body", "headers"}
	ANY_HTTP_REQUEST       = &Request{}
)
View Source
var (
	HTTP_RESP_WRITER_PROPNAMES = []string{
		"write_text", "write_binary", "write_html", "write_json", "set_cookie", "write_headers", "write_error",
		"add_header", "set_status",
	}

	ANY_HTTP_RESP_WRITER = &ResponseWriter{}
)
View Source
var (
	ANY_RESP = &Response{}

	HTTP_RESPONSE_PROPNAMES = []string{"body", "status", "status-code", "cookies"}
)
View Source
var (
	STATUS_PROPNAMES = []string{"code", "full-text"}
	ANY_STATUS       = &Status{}
	ANY_STATUS_CODE  = &StatusCode{}

	STATUS_CODE_INT_VALUE = symbolic.ANY_INT.
							WithMatchingPattern(symbolic.NewIntRangePattern(symbolic.NewIntRange(symbolic.NewInt(100), symbolic.NewInt(599), false)))
)
View Source
var (
	ANY_CSP = NewCSP()
)
View Source
var (
	ANY_REQUEST_PATTERN = &RequestPattern{}
)
View Source
var (
	ANY_RESULT = &Result{}
)
View Source
var (
	HTTP_CLIENT_PROPNAMES = []string{"get_host_cookies"}
)
View Source
var (
	HTTP_SERVER_PROPNAMES = []string{"wait_closed", "close"}
)
View Source
var (
	SSE_SOURCE_PROPNAMES = []string{"close"}
)

Functions

func NewCookieObject

func NewCookieObject() *symbolic.Object

Types

type Client

type Client struct {
	symbolic.UnassignablePropsMixin
	// contains filtered or unexported fields
}

func (*Client) GetGoMethod

func (c *Client) GetGoMethod(name string) (*symbolic.GoFunction, bool)

func (*Client) GetHostCookies

func (c *Client) GetHostCookies(h *symbolic.Host) *symbolic.List

func (*Client) IsMutable

func (c *Client) IsMutable() bool

func (*Client) PrettyPrint

func (c *Client) PrettyPrint(w prettyprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Client) Prop

func (c *Client) Prop(name string) symbolic.Value

func (*Client) PropertyNames

func (*Client) PropertyNames() []string

func (*Client) Schemes

func (*Client) Schemes() []string

func (*Client) Test

func (c *Client) Test(v symbolic.Value, state symbolic.RecTestCallState) bool

func (*Client) WidestOfType

func (c *Client) WidestOfType() symbolic.Value

type ContentSecurityPolicy

type ContentSecurityPolicy struct {
	symbolic.SerializableMixin
	// contains filtered or unexported fields
}

func NewCSP

func NewCSP() *ContentSecurityPolicy

func (*ContentSecurityPolicy) IsMutable

func (*ContentSecurityPolicy) IsMutable() bool

func (*ContentSecurityPolicy) PrettyPrint

func (*ContentSecurityPolicy) Test

func (*ContentSecurityPolicy) WidestOfType

func (r *ContentSecurityPolicy) WidestOfType() symbolic.Value

type HttpsServer

type HttpsServer struct {
	symbolic.UnassignablePropsMixin
	// contains filtered or unexported fields
}

func (*HttpsServer) GetGoMethod

func (serv *HttpsServer) GetGoMethod(name string) (*symbolic.GoFunction, bool)

func (*HttpsServer) IsMutable

func (serv *HttpsServer) IsMutable() bool

func (*HttpsServer) PrettyPrint

func (*HttpsServer) Prop

func (s *HttpsServer) Prop(name string) symbolic.Value

func (*HttpsServer) PropertyNames

func (*HttpsServer) PropertyNames() []string

func (*HttpsServer) Test

func (*HttpsServer) WidestOfType

func (r *HttpsServer) WidestOfType() symbolic.Value

type Request

func (*Request) GetGoMethod

func (req *Request) GetGoMethod(name string) (*symbolic.GoFunction, bool)

func (Request) IsMutable

func (req Request) IsMutable() bool

func (*Request) IsSharable

func (req *Request) IsSharable() (bool, string)

func (*Request) IsShared

func (req *Request) IsShared() bool

func (*Request) PrettyPrint

func (r *Request) PrettyPrint(w prettyprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Request) Prop

func (req *Request) Prop(name string) symbolic.Value

func (Request) PropertyNames

func (Request) PropertyNames() []string

func (*Request) Share

func (req *Request) Share(originState *symbolic.State) symbolic.PotentiallySharable

func (*Request) Test

func (r *Request) Test(v symbolic.Value, state symbolic.RecTestCallState) bool

func (*Request) WidestOfType

func (r *Request) WidestOfType() symbolic.Value

type RequestPattern

type RequestPattern struct {
	symbolic.UnassignablePropsMixin
	symbolic.SerializableMixin
	symbolic.NotCallablePatternMixin
	// contains filtered or unexported fields
}

func (*RequestPattern) HasUnderlyingPattern

func (r *RequestPattern) HasUnderlyingPattern() bool

func (*RequestPattern) IsMutable

func (*RequestPattern) IsMutable() bool

func (*RequestPattern) IteratorElementKey

func (r *RequestPattern) IteratorElementKey() symbolic.Value

func (*RequestPattern) IteratorElementValue

func (r *RequestPattern) IteratorElementValue() symbolic.Value

func (*RequestPattern) PrettyPrint

func (*RequestPattern) StringPattern

func (r *RequestPattern) StringPattern() (symbolic.StringPattern, bool)

func (*RequestPattern) SymbolicValue

func (r *RequestPattern) SymbolicValue() symbolic.Value

func (*RequestPattern) Test

func (*RequestPattern) TestValue

func (r *RequestPattern) TestValue(v symbolic.Value, state symbolic.RecTestCallState) bool

func (*RequestPattern) WidestOfType

func (r *RequestPattern) WidestOfType() symbolic.Value

type Response

type Response struct {
	symbolic.UnassignablePropsMixin
	// contains filtered or unexported fields
}

func (*Response) GetGoMethod

func (resp *Response) GetGoMethod(name string) (*symbolic.GoFunction, bool)

func (*Response) IsMutable

func (resp *Response) IsMutable() bool

func (*Response) PrettyPrint

func (r *Response) PrettyPrint(w prettyprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Response) Prop

func (resp *Response) Prop(name string) symbolic.Value

func (*Response) PropertyNames

func (*Response) PropertyNames() []string

func (*Response) Test

func (*Response) WidestOfType

func (r *Response) WidestOfType() symbolic.Value

type ResponseWriter

type ResponseWriter struct {
	symbolic.UnassignablePropsMixin
	// contains filtered or unexported fields
}

func (*ResponseWriter) AddHeader

func (rw *ResponseWriter) AddHeader(ctx *symbolic.Context, k, v *symbolic.String)

func (*ResponseWriter) Finish

func (rw *ResponseWriter) Finish(ctx *symbolic.Context)

func (*ResponseWriter) GetGoMethod

func (rw *ResponseWriter) GetGoMethod(name string) (*symbolic.GoFunction, bool)

func (*ResponseWriter) IsMutable

func (resp *ResponseWriter) IsMutable() bool

func (*ResponseWriter) PrettyPrint

func (*ResponseWriter) Prop

func (rw *ResponseWriter) Prop(name string) symbolic.Value

func (*ResponseWriter) PropertyNames

func (*ResponseWriter) PropertyNames() []string

func (*ResponseWriter) SetCookie

func (rw *ResponseWriter) SetCookie(ctx *symbolic.Context, obj *symbolic.Object) *symbolic.Error

func (*ResponseWriter) SetStatus

func (rw *ResponseWriter) SetStatus(ctx *symbolic.Context, status *StatusCode)

func (*ResponseWriter) Test

func (*ResponseWriter) WidestOfType

func (r *ResponseWriter) WidestOfType() symbolic.Value

func (*ResponseWriter) WriteBinary

func (rw *ResponseWriter) WriteBinary(ctx *symbolic.Context, v *symbolic.ByteSlice) (*symbolic.Int, *symbolic.Error)

func (*ResponseWriter) WriteError

func (rw *ResponseWriter) WriteError(ctx *symbolic.Context, err *symbolic.Error, status *StatusCode)

func (*ResponseWriter) WriteHTML

func (rw *ResponseWriter) WriteHTML(ctx *symbolic.Context, v symbolic.Value) (*symbolic.Int, *symbolic.Error)

func (*ResponseWriter) WriteHeaders

func (rw *ResponseWriter) WriteHeaders(ctx *symbolic.Context, status *symbolic.OptionalParam[*StatusCode])

func (*ResponseWriter) WriteJSON

func (*ResponseWriter) WritePlainText

func (rw *ResponseWriter) WritePlainText(ctx *symbolic.Context, v *symbolic.ByteSlice) (*symbolic.Int, *symbolic.Error)

type Result

type Result struct {
	symbolic.UnassignablePropsMixin
	// contains filtered or unexported fields
}

func (*Result) IsMutable

func (resp *Result) IsMutable() bool

func (*Result) PrettyPrint

func (r *Result) PrettyPrint(w prettyprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Result) Test

func (r *Result) Test(v symbolic.Value, state symbolic.RecTestCallState) bool

func (*Result) WidestOfType

func (r *Result) WidestOfType() symbolic.Value

type ServerSentEventSource

type ServerSentEventSource struct {
	symbolic.UnassignablePropsMixin
	// contains filtered or unexported fields
}

func (*ServerSentEventSource) GetGoMethod

func (serv *ServerSentEventSource) GetGoMethod(name string) (*symbolic.GoFunction, bool)

func (*ServerSentEventSource) IsMutable

func (*ServerSentEventSource) IsMutable() bool

func (*ServerSentEventSource) PrettyPrint

func (*ServerSentEventSource) Prop

func (*ServerSentEventSource) PropertyNames

func (*ServerSentEventSource) PropertyNames() []string

func (*ServerSentEventSource) Test

func (*ServerSentEventSource) WidestOfType

func (r *ServerSentEventSource) WidestOfType() symbolic.Value

type Status

func (*Status) GetGoMethod

func (*Status) GetGoMethod(name string) (*symbolic.GoFunction, bool)

func (*Status) IsMutable

func (s *Status) IsMutable() bool

func (*Status) PrettyPrint

func (r *Status) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*Status) Prop

func (s *Status) Prop(name string) symbolic.Value

func (Status) PropertyNames

func (Status) PropertyNames() []string

func (*Status) Test

func (s *Status) Test(v symbolic.Value, state symbolic.RecTestCallState) bool

func (*Status) WidestOfType

func (s *Status) WidestOfType() symbolic.Value

type StatusCode

type StatusCode struct {
	symbolic.SerializableMixin
}

func (*StatusCode) IsMutable

func (c *StatusCode) IsMutable() bool

func (*StatusCode) PrettyPrint

func (c *StatusCode) PrettyPrint(w pprint.PrettyPrintWriter, config *pprint.PrettyPrintConfig)

func (*StatusCode) Test

func (*StatusCode) WidestOfType

func (c *StatusCode) WidestOfType() symbolic.Value

Jump to

Keyboard shortcuts

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