Versions in this module Expand all Collapse all v1 v1.0.1 Jun 28, 2021 Changes in this version + const ChunkTypeError + const ChunkTypeFinal + const ChunkTypeIntermediate + const MaxTimeout + const MessageTypeCloseSecureChannel + const MessageTypeMessage + const MessageTypeOpenSecureChannel + type AsymmetricSecurityHeader struct + ReceiverCertificateThumbprint []byte + SecurityPolicyURI string + SenderCertificate []byte + func NewAsymmetricSecurityHeader(uri string, cert, thumbprint []byte) *AsymmetricSecurityHeader + func (a *AsymmetricSecurityHeader) String() string + func (h *AsymmetricSecurityHeader) Decode(b []byte) (int, error) + func (h *AsymmetricSecurityHeader) Encode() ([]byte, error) + func (h *AsymmetricSecurityHeader) Len() int + type Config struct + AutoReconnect bool + Certificate []byte + Lifetime uint32 + LocalKey *rsa.PrivateKey + ReconnectInterval time.Duration + RemoteCertificate []byte + RequestIDSeed uint32 + RequestTimeout time.Duration + SecurityMode ua.MessageSecurityMode + SecurityPolicyURI string + Thumbprint []byte + type Header struct + ChunkType byte + MessageSize uint32 + MessageType string + SecureChannelID uint32 + func NewHeader(msgType string, chunkType byte, chanID uint32) *Header + func (h *Header) Decode(b []byte) (int, error) + func (h *Header) Encode() ([]byte, error) + func (h *Header) String() string + type Message struct + Service interface{} + TypeID *ua.ExpandedNodeID + func (m *Message) Decode(b []byte) (int, error) + func (m *Message) Encode() ([]byte, error) + type MessageAbort struct + ErrorCode uint32 + Reason string + func (m *MessageAbort) Decode(b []byte) (int, error) + func (m *MessageAbort) Encode() ([]byte, error) + func (m *MessageAbort) MessageAbort() string + type MessageChunk struct + Data []byte + func (m *MessageChunk) Decode(b []byte) (int, error) + type MessageHeader struct + func (m *MessageHeader) Decode(b []byte) (int, error) + type SecureChannel struct + func NewSecureChannel(endpoint string, c *uacp.Conn, cfg *Config, errCh chan<- error) (*SecureChannel, error) + func (s *SecureChannel) Close() error + func (s *SecureChannel) EncryptUserPassword(policyURI, password string, cert, nonce []byte) ([]byte, string, error) + func (s *SecureChannel) LocalEndpoint() string + func (s *SecureChannel) NewSessionSignature(cert, nonce []byte) ([]byte, string, error) + func (s *SecureChannel) NewUserTokenSignature(policyURI string, cert, nonce []byte) ([]byte, string, error) + func (s *SecureChannel) Open(ctx context.Context) error + func (s *SecureChannel) Renew(ctx context.Context) error + func (s *SecureChannel) SendRequest(req ua.Request, authToken *ua.NodeID, h func(interface{}) error) error + func (s *SecureChannel) SendRequestWithTimeout(req ua.Request, authToken *ua.NodeID, timeout time.Duration, ...) error + func (s *SecureChannel) VerifySessionSignature(cert, nonce, signature []byte) error + type SequenceHeader struct + RequestID uint32 + SequenceNumber uint32 + func NewSequenceHeader(seq, req uint32) *SequenceHeader + func (h *SequenceHeader) Decode(b []byte) (int, error) + func (h *SequenceHeader) Encode() ([]byte, error) + func (s *SequenceHeader) String() string + type SessionConfig struct + AuthPassword string + AuthPolicyURI string + AuthenticationToken *ua.NodeID + ClientDescription *ua.ApplicationDescription + LocaleIDs []string + ServerEndpoints []*ua.EndpointDescription + SessionName string + SessionTimeout time.Duration + UserIdentityToken interface{} + UserTokenSignature *ua.SignatureData + type SymmetricSecurityHeader struct + TokenID uint32 + func NewSymmetricSecurityHeader(token uint32) *SymmetricSecurityHeader + func (h *SymmetricSecurityHeader) Decode(b []byte) (int, error) + func (h *SymmetricSecurityHeader) Encode() ([]byte, error) + func (h *SymmetricSecurityHeader) Len() int + func (h *SymmetricSecurityHeader) String() string