Documentation
¶
Index ¶
Constants ¶
View Source
const ( HeaderServerAcceptEncoding = "X-AlpineBits-Server-Accept-Encoding" HeaderClientID = "X-AlpineBits-ClientID" HeaderClientProtocolVersion = "X-AlpineBits-ClientProtocolVersion" )
Variables ¶
This section is empty.
Functions ¶
func WithRouteContext ¶
func WithRouteContext(ctx context.Context, rctx RouteContext) context.Context
Types ¶
type HandlerFunc ¶
type HandshakeClient ¶
type HandshakeClient struct {
// contains filtered or unexported fields
}
func NewHandshakeClient ¶
func NewHandshakeClient(config HandshakeClientConfig) (*HandshakeClient, error)
func (*HandshakeClient) Ping ¶
func (c *HandshakeClient) Ping(ctx context.Context) (HandshakeData, *http.Response, error)
type HandshakeClientConfig ¶
type HandshakeClientConfig struct { URL string Username string Password string ClientID string HandshakeData HandshakeData }
type HandshakeData ¶
func NewHandshakeDataFromRouter ¶
func NewHandshakeDataFromRouter(r Router) HandshakeData
func (HandshakeData) Intersect ¶
func (h HandshakeData) Intersect(other HandshakeData) HandshakeData
func (HandshakeData) MarshalJSON ¶
func (h HandshakeData) MarshalJSON() ([]byte, error)
func (HandshakeData) NegotiatedVersion ¶
func (h HandshakeData) NegotiatedVersion() (string, map[string][]string)
func (*HandshakeData) UnmarshalJSON ¶
func (h *HandshakeData) UnmarshalJSON(data []byte) error
type Request ¶
type Request struct { Context context.Context ClientID string Data any Capabilities []string // contains filtered or unexported fields }
func (Request) HandshakeData ¶
func (r Request) HandshakeData() HandshakeData
type RouteContext ¶
type RouteContext struct {
HandshakeDataOverride HandshakeData
}
func RouteContextFrom ¶
func RouteContextFrom(ctx context.Context) (RouteContext, bool)
type RouteFunc ¶
type RouteFunc func(*Route)
func WithCapabilities ¶
func WithExcludeFromHandshake ¶
func WithExcludeFromHandshake() RouteFunc
Click to show internal directories.
Click to hide internal directories.