session

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGatewayErrorCode

func IsGatewayErrorCode(err error, code ErrorCode) bool

Types

type ConnectArtifactIssuer

type ConnectArtifactIssuer interface {
	IssueGatewayConnectArtifact(ctx context.Context, req protocol.OpenSessionRequest) (GatewayConnectArtifactIssue, error)
}

type ErrorCode

type ErrorCode string
const (
	ErrorCodeInvalidRequest        ErrorCode = "INVALID_REQUEST"
	ErrorCodeNotFound              ErrorCode = "NOT_FOUND"
	ErrorCodeCapabilityUnsupported ErrorCode = "CAPABILITY_UNSUPPORTED"
	ErrorCodeNotImplemented        ErrorCode = "NOT_IMPLEMENTED"
)

type GatewayConnectArtifactIssue

type GatewayConnectArtifactIssue struct {
	GatewayID        string
	GatewaySessionID string
	ConnectArtifact  protocol.GatewayConnectArtifact
	DiagnosticsHint  *protocol.DiagnosticsHint
}

func NewSignedDesktopBridgeIssue

func NewSignedDesktopBridgeIssue(input struct {
	GatewayID           string
	GatewayEnvID        string
	BindingAudience     string
	RequestedCapability protocol.RequestedCapability
	ClientNonce         string
	BridgeSessionID     string
	RouteID             string
	GatewayPrivateKey   string
	TTL                 time.Duration
}) (GatewayConnectArtifactIssue, error)

func NewSignedLocalDirectIssue

func NewSignedLocalDirectIssue(input struct {
	GatewayID           string
	GatewayEnvID        string
	BindingAudience     string
	RequestedCapability protocol.RequestedCapability
	ClientNonce         string
	URL                 string
	GatewayPrivateKey   string
	TTL                 time.Duration
}) (GatewayConnectArtifactIssue, error)

type GatewayError

type GatewayError struct {
	Code    ErrorCode
	Message string
}

func (*GatewayError) Error

func (e *GatewayError) Error() string

type Service

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

func NewService

func NewService(options ...ServiceOption) *Service

func (*Service) OpenSession

type ServiceOption

type ServiceOption func(*Service)

func WithConnectArtifactIssuer

func WithConnectArtifactIssuer(issuer ConnectArtifactIssuer) ServiceOption

Jump to

Keyboard shortcuts

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