Documentation ¶
Index ¶
- func Len(i uint64) int64
- func Read(b io.ByteReader) (uint64, error)
- func UnmarshalBinaryRequest(data []byte) (*http.Request, error)
- func UnmarshalBinaryResponse(data []byte) (*http.Response, error)
- func UnmarshalFrameIndicator(b io.ByteReader) (frameIndicator, error)
- func UnmarshalRequestControlData(b *bytes.Buffer) (requestControlData, error)
- func UnmarshalResponseControlData(b *bytes.Buffer) (responseControlData, error)
- func Write(b *bytes.Buffer, i uint64)
- func WriteWithLen(b *bytes.Buffer, i uint64, length int64)
- type BinaryRequest
- type BinaryResponse
- type Client
- type ConfigCipherSuite
- type DecapsulateRequestContext
- type EncapsulatedRequest
- type EncapsulatedRequestContext
- type EncapsulatedResponse
- type EncapsulatedResponseContext
- type Gateway
- func (g Gateway) Client(keyID uint8) (Client, error)
- func (g Gateway) Config(keyID uint8) (PublicConfig, error)
- func (s Gateway) DecapsulateRequest(req EncapsulatedRequest) ([]byte, DecapsulateRequestContext, error)
- func (s Gateway) MarshalConfigs() []byte
- func (s Gateway) MatchesConfig(req EncapsulatedRequest) bool
- type PrivateConfig
- type PublicConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Read ¶
func Read(b io.ByteReader) (uint64, error)
Read reads a number in the QUIC varint format
func UnmarshalFrameIndicator ¶
func UnmarshalFrameIndicator(b io.ByteReader) (frameIndicator, error)
Types ¶
type BinaryRequest ¶
func (*BinaryRequest) Marshal ¶
func (r *BinaryRequest) Marshal() ([]byte, error)
Request with Known-Length { Framing Indicator (i) = 0, Request Control Data (..), Known-Length Field Section (..), Known-Length Content (..), Known-Length Field Section (..), Padding (..), }
type BinaryResponse ¶
func CreateBinaryResponse ¶
func CreateBinaryResponse(resp *http.Response) BinaryResponse
func (*BinaryResponse) Marshal ¶
func (r *BinaryResponse) Marshal() ([]byte, error)
Response with Known-Length { Framing Indicator (i) = 1, Known-Length Informational Response (..) ..., Final Response Control Data (..), Known-Length Field Section (..), Known-Length Content (..), Known-Length Field Section (..), Padding (..), }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewCustomClient ¶
func NewCustomClient(config PublicConfig, requestLabel, responseLabel string) Client
func NewDefaultClient ¶
func NewDefaultClient(config PublicConfig) Client
func (Client) EncapsulateRequest ¶
func (c Client) EncapsulateRequest(request []byte) (EncapsulatedRequest, EncapsulatedRequestContext, error)
type DecapsulateRequestContext ¶
type DecapsulateRequestContext struct {
// contains filtered or unexported fields
}
func (DecapsulateRequestContext) EncapsulateResponse ¶
func (c DecapsulateRequestContext) EncapsulateResponse(response []byte) (EncapsulatedResponse, error)
type EncapsulatedRequest ¶
type EncapsulatedRequest struct { KeyID uint8 // contains filtered or unexported fields }
func UnmarshalEncapsulatedRequest ¶
func UnmarshalEncapsulatedRequest(enc []byte) (EncapsulatedRequest, error)
func (EncapsulatedRequest) Marshal ¶
func (r EncapsulatedRequest) Marshal() []byte
Encapsulated Request { Key Identifier (8), KEM Identifier (16), KDF Identifier (16), AEAD Identifier (16), Encapsulated KEM Shared Secret (8*Nenc), AEAD-Protected Request (..), }
type EncapsulatedRequestContext ¶
type EncapsulatedRequestContext struct {
// contains filtered or unexported fields
}
func (EncapsulatedRequestContext) DecapsulateResponse ¶
func (c EncapsulatedRequestContext) DecapsulateResponse(response EncapsulatedResponse) ([]byte, error)
type EncapsulatedResponse ¶
type EncapsulatedResponse struct {
// contains filtered or unexported fields
}
func UnmarshalEncapsulatedResponse ¶
func UnmarshalEncapsulatedResponse(enc []byte) (EncapsulatedResponse, error)
func (EncapsulatedResponse) Marshal ¶
func (r EncapsulatedResponse) Marshal() []byte
Encapsulated Response { Nonce (Nk), AEAD-Protected Response (..), }
type EncapsulatedResponseContext ¶
type EncapsulatedResponseContext struct { }
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
func NewCustomGateway ¶
func NewCustomGateway(configs []PrivateConfig, requestLabel, responseLabel string) Gateway
func NewDefaultGateway ¶
func NewDefaultGateway(configs []PrivateConfig) Gateway
func (Gateway) DecapsulateRequest ¶
func (s Gateway) DecapsulateRequest(req EncapsulatedRequest) ([]byte, DecapsulateRequestContext, error)
func (Gateway) MarshalConfigs ¶
func (Gateway) MatchesConfig ¶
func (s Gateway) MatchesConfig(req EncapsulatedRequest) bool
type PrivateConfig ¶
type PrivateConfig struct {
// contains filtered or unexported fields
}
func NewConfigFromSeed ¶
func (PrivateConfig) Config ¶
func (c PrivateConfig) Config() PublicConfig
func (PrivateConfig) PrivateKey ¶
func (c PrivateConfig) PrivateKey() kem.PrivateKey
type PublicConfig ¶
type PublicConfig struct { ID uint8 KEMID hpke.KEM Suites []ConfigCipherSuite PublicKeyBytes []byte }
func UnmarshalPublicConfig ¶
func UnmarshalPublicConfig(data []byte) (PublicConfig, error)
func (PublicConfig) IsEqual ¶
func (c PublicConfig) IsEqual(o PublicConfig) bool
func (PublicConfig) Marshal ¶
func (c PublicConfig) Marshal() []byte
Click to show internal directories.
Click to hide internal directories.