Versions in this module Expand all Collapse all v0 v0.0.2 Mar 27, 2024 Changes in this version + var DefaultCapabilities = []string + var ErrClosed = errors.New("closed connection") + func ExpandCapability(s string) string + func WithPersistID(id string) persistID + type CancelCommitOption interface + type CancelCommitReq struct + PersistID string + XMLName xml.Name + type CommitOption interface + func WithConfirmed() CommitOption + func WithConfirmedTimeout(timeout time.Duration) CommitOption + func WithPersist(id string) CommitOption + type CommitReq struct + ConfirmTimeout int64 + Confirmed ExtantBool + Persist string + PersistID string + XMLName xml.Name + type CopyConfigReq struct + Source any + Target any + XMLName xml.Name + type CreateSubscriptionOption interface + func WithEndTimeOption(et time.Time) CreateSubscriptionOption + func WithStartTimeOption(st time.Time) CreateSubscriptionOption + func WithStreamOption(s string) CreateSubscriptionOption + type CreateSubscriptionReq struct + EndTime string + StartTime string + Stream string + XMLName xml.Name + type Datastore string + const Candidate + const Running + const Startup + func (s Datastore) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type DeleteConfigReq struct + Target Datastore + XMLName xml.Name + type EditConfigOption interface + func WithDefaultMergeStrategy(op MergeStrategy) EditConfigOption + func WithErrorStrategy(opt ErrorStrategy) EditConfigOption + func WithTestStrategy(op TestStrategy) EditConfigOption + type EditConfigReq struct + Config any + DefaultMergeStrategy MergeStrategy + ErrorStrategy ErrorStrategy + Target Datastore + TestStrategy TestStrategy + URL string + XMLName xml.Name + type ErrSeverity string + const SevError + const SevWarning + type ErrTag string + const ErrAccesDenied + const ErrBadAttribute + const ErrBadElement + const ErrDataExists + const ErrDataMissing + const ErrInUse + const ErrInvalidValue + const ErrLockDenied + const ErrMalformedMessage + const ErrMissingAttribute + const ErrMissingElement + const ErrOperationFailed + const ErrOperationNotSupported + const ErrPartialOperation + const ErrResourceDenied + const ErrRollbackFailed + const ErrTooBig + const ErrUnknownAttribute + const ErrUnknownElement + const ErrUnknownNamespace + type ErrType string + const ErrTypeApp + const ErrTypeProtocol + const ErrTypeRPC + const ErrTypeTransport + type ErrorStrategy string + const ContinueOnError + const RollbackOnError + const StopOnError + type ExtantBool bool + func (b *ExtantBool) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (b ExtantBool) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type GetConfigReply struct + Config []byte + XMLName xml.Name + type GetConfigReq struct + Source Datastore + XMLName xml.Name + type KillSessionReq struct + SessionID uint32 + XMLName xml.Name + type LockReq struct + Target Datastore + XMLName xml.Name + type MergeStrategy string + const CreateConfig + const DeleteConfig + const MergeConfig + const NoMergeStrategy + const RemoveConfig + const ReplaceConfig + type Notification struct + Body []byte + EventTime time.Time + XMLName xml.Name + func (r Notification) Decode(v interface{}) error + type NotificationHandler func(msg Notification) + type OKResp struct + OK ExtantBool + type RPCError struct + AppTag string + Info RawXML + Message string + Path string + Severity ErrSeverity + Tag ErrTag + Type ErrType + func (e RPCError) Error() string + type RPCErrors []RPCError + func (errs RPCErrors) Error() string + func (errs RPCErrors) Filter(severity ...ErrSeverity) RPCErrors + func (errs RPCErrors) Unwrap() []error + type RawXML []byte + func (x *RawXML) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (x *RawXML) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type Reply struct + Body []byte + Errors RPCErrors + MessageID uint64 + XMLName xml.Name + func (r Reply) Decode(v interface{}) error + func (r Reply) Err(severity ...ErrSeverity) error + type Session struct + func Open(transport transport.Transport, opts ...SessionOption) (*Session, error) + func (s *Session) Call(ctx context.Context, req any, resp any) error + func (s *Session) CancelCommit(ctx context.Context, opts ...CancelCommitOption) error + func (s *Session) ClientCapabilities() []string + func (s *Session) Close(ctx context.Context) error + func (s *Session) Commit(ctx context.Context, opts ...CommitOption) error + func (s *Session) CopyConfig(ctx context.Context, source, target any) error + func (s *Session) CreateSubscription(ctx context.Context, opts ...CreateSubscriptionOption) error + func (s *Session) DeleteConfig(ctx context.Context, target Datastore) error + func (s *Session) Do(ctx context.Context, req any) (*Reply, error) + func (s *Session) EditConfig(ctx context.Context, target Datastore, config any, opts ...EditConfigOption) error + func (s *Session) GetConfig(ctx context.Context, source Datastore) ([]byte, error) + func (s *Session) KillSession(ctx context.Context, sessionID uint32) error + func (s *Session) Lock(ctx context.Context, target Datastore) error + func (s *Session) ServerCapabilities() []string + func (s *Session) SessionID() uint64 + func (s *Session) Unlock(ctx context.Context, target Datastore) error + func (s *Session) Validate(ctx context.Context, source any) error + type SessionOption interface + func WithCapability(capabilities ...string) SessionOption + func WithNotificationHandler(nh NotificationHandler) SessionOption + type TestStrategy string + const SetOnly + const TestOnly + const TestThenSet + type URL string + func (u URL) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type ValidateReq struct + Source any + XMLName xml.Name