Versions in this module Expand all Collapse all v1 v1.0.2 Nov 29, 2021 Changes in this version type Client + func (client *Client) ConnectToPersistentSubscriptionToAll(ctx context.Context, groupName string, ...) (*PersistentSubscription, error) v1.0.1 Nov 10, 2021 v1.0.0 Oct 15, 2021 Changes in this version + const EventFilterType + const MAX_ACK_COUNT + const NoMaxSearchWindow + const SUBSCRIBER_COUNT_UNLIMITED + const SchemaHostsSeparator + const SchemeDefaultPort + const SchemeName + const SchemeNameWithDiscover + const SchemePathSeparator + const SchemePortSeparator + const SchemeQuerySeparator + const SchemeSeparator + const SchemeSettingSeparator + const SchemeUserInfoSeparator + const StreamFilterType + const SystemStreamAcl + const UserStreamAcl + var ErrPermissionDenied = errors.New("PermissionDenied") + var ErrStreamNotFound = errors.New("Failed to perform read because the stream was not found") + var ErrUnauthenticated = errors.New("Unauthenticated") + var ErrWrongExpectedStreamRevision = errors.New("WrongExpectedStreamRevision") + var PersistentSubscriptionExceedsMaxMessageCountError = PersistentSubscriptionError + var PersistentSubscriptionToAllCanSetOnlyRegexOrPrefixError = PersistentSubscriptionError + var PersistentSubscriptionToAllMustProvideRegexOrPrefixError = PersistentSubscriptionError + func EventIDFromProto(recordedEvent *api.ReadResp_ReadEvent_RecordedEvent) uuid.UUID + func NewGrpcClient(config Configuration) *grpcClient + func PersistentSubscriptionDeletionFailedError(err error) error + func PersistentSubscriptionFailedCreationError(err error) error + func PersistentSubscriptionFailedReceiveStreamInitError(err error) error + func PersistentSubscriptionFailedSendStreamInitError(err error) error + func PersistentSubscriptionFailedToInitClientError(err error) error + func PersistentSubscriptionNoConfirmationError(err error) error + func PersistentSubscriptionUpdateFailedError(err error) error + type Acl struct + func AclFromMap(props map[string]interface{}) (Acl, error) + func (a *Acl) AddDeleteRoles(roles ...string) + func (a *Acl) AddMetaReadRoles(roles ...string) + func (a *Acl) AddMetaWriteRoles(roles ...string) + func (a *Acl) AddReadRoles(roles ...string) + func (a *Acl) AddWriteRoles(roles ...string) + func (a *Acl) DeleteRoles() []string + func (a *Acl) MetaReadRoles() []string + func (a *Acl) MetaWriteRoles() []string + func (a *Acl) ReadRoles() []string + func (a *Acl) WriteRoles() []string + func (a Acl) ToMap() map[string]interface{} + type AllPosition interface + type Any struct + type AppendToStreamOptions struct + Authenticated *Credentials + ExpectedRevision ExpectedRevision + type Client struct + Config *Configuration + func NewClient(configuration *Configuration) (*Client, error) + func (client *Client) AppendToStream(context context.Context, streamID string, opts AppendToStreamOptions, ...) (*WriteResult, error) + func (client *Client) Close() error + func (client *Client) ConnectToPersistentSubscription(ctx context.Context, streamName string, groupName string, ...) (*PersistentSubscription, error) + func (client *Client) CreatePersistentSubscription(ctx context.Context, streamName string, groupName string, ...) error + func (client *Client) CreatePersistentSubscriptionAll(ctx context.Context, groupName string, ...) error + func (client *Client) DeletePersistentSubscription(ctx context.Context, streamName string, groupName string, ...) error + func (client *Client) DeletePersistentSubscriptionAll(ctx context.Context, groupName string, ...) error + func (client *Client) DeleteStream(context context.Context, streamID string, opts DeleteStreamOptions) (*DeleteResult, error) + func (client *Client) GetStreamMetadata(context context.Context, streamID string, opts ReadStreamOptions) (*StreamMetadata, error) + func (client *Client) ReadAll(context context.Context, opts ReadAllOptions, count uint64) (*ReadStream, error) + func (client *Client) ReadStream(context context.Context, streamID string, opts ReadStreamOptions, count uint64) (*ReadStream, error) + func (client *Client) SetStreamMetadata(context context.Context, streamID string, opts AppendToStreamOptions, ...) (*WriteResult, error) + func (client *Client) SubscribeToAll(ctx context.Context, opts SubscribeToAllOptions) (*Subscription, error) + func (client *Client) SubscribeToStream(ctx context.Context, streamID string, opts SubscribeToStreamOptions) (*Subscription, error) + func (client *Client) TombstoneStream(context context.Context, streamID string, opts TombstoneStreamOptions) (*DeleteResult, error) + func (client *Client) UpdatePersistentStreamSubscription(ctx context.Context, streamName string, groupName string, ...) error + func (client *Client) UpdatePersistentSubscriptionAll(ctx context.Context, groupName string, ...) error + type Configuration struct + Address string + DisableTLS bool + DiscoveryInterval int + DnsDiscover bool + GossipSeeds []*EndPoint + GossipTimeout int + KeepAliveInterval time.Duration + KeepAliveTimeout time.Duration + MaxDiscoverAttempts int + NodePreference NodePreference + Password string + RootCAs *x509.CertPool + SkipCertificateVerification bool + Username string + func ParseConnectionString(connectionString string) (*Configuration, error) + type ConnectToPersistentSubscriptionOptions struct + Authenticated *Credentials + BatchSize uint32 + type ConsumerStrategy int32 + const ConsumerStrategy_DispatchToSingle + const ConsumerStrategy_Pinned + const ConsumerStrategy_PinnedByCorrelation + const ConsumerStrategy_RoundRobin + type ContentType int + const BinaryContentType + const JsonContentType + type Credentials struct + Login string + Password string + type DeletePersistentSubscriptionOptions struct + Authenticated *Credentials + type DeleteResult struct + Position Position + type DeleteStreamOptions struct + Authenticated *Credentials + ExpectedRevision ExpectedRevision + type Direction int + const Backwards + const Forwards + type End struct + type EndPoint struct + Host string + Port uint16 + func ParseEndPoint(s string) (*EndPoint, error) + func (e *EndPoint) String() string + type EventData struct + ContentType ContentType + Data []byte + EventID uuid.UUID + EventType string + Metadata []byte + type ExpectedRevision interface + type FilterType int + type Nack_Action int32 + const Nack_Park + const Nack_Retry + const Nack_Skip + const Nack_Stop + const Nack_Unknown + type NoStream struct + type NodePreference string + const NodePreference_Follower + const NodePreference_Leader + const NodePreference_Random + const NodePreference_ReadOnlyReplica + func (nodePreference NodePreference) String() string + type PersistentAllSubscriptionOptions struct + Authenticated *Credentials + CheckpointInterval int + Filter *SubscriptionFilter + From AllPosition + MaxSearchWindow int + Settings *SubscriptionSettings + type PersistentStreamSubscriptionOptions struct + Authenticated *Credentials + From StreamPosition + Settings *SubscriptionSettings + type PersistentSubscription struct + func NewPersistentSubscription(client persistent.PersistentSubscriptions_ReadClient, subscriptionId string, ...) *PersistentSubscription + func (connection *PersistentSubscription) Ack(messages ...*ResolvedEvent) error + func (connection *PersistentSubscription) Close() error + func (connection *PersistentSubscription) Nack(reason string, action Nack_Action, messages ...*ResolvedEvent) error + func (connection *PersistentSubscription) Recv() *SubscriptionEvent + type PersistentSubscriptionError struct + Code int + Err error + func (e *PersistentSubscriptionError) Error() string + func (e *PersistentSubscriptionError) Is(target error) bool + func (e *PersistentSubscriptionError) Unwrap() error + type Position struct + Commit uint64 + Prepare uint64 + var EmptyPosition Position = Position{ ... } + var EndPosition Position = Position{ ... } + var StartPosition Position = Position{ ... } + type ReadAllOptions struct + Authenticated *Credentials + Direction Direction + From AllPosition + ResolveLinkTos bool + type ReadStream struct + func (stream *ReadStream) Close() + func (stream *ReadStream) Recv() (*ResolvedEvent, error) + type ReadStreamOptions struct + Authenticated *Credentials + Direction Direction + From StreamPosition + ResolveLinkTos bool + type RecordedEvent struct + ContentType string + CreatedDate time.Time + Data []byte + EventID uuid.UUID + EventNumber uint64 + EventType string + Position Position + StreamID string + SystemMetadata map[string]string + UserMetadata []byte + type ResolvedEvent struct + Commit *uint64 + Event *RecordedEvent + Link *RecordedEvent + func (resolved ResolvedEvent) OriginalEvent() *RecordedEvent + type Start struct + type StreamDeletedError struct + StreamName string + func (e *StreamDeletedError) Error() string + type StreamExists struct + type StreamMetadata struct + func StreamMetadataFromMap(props map[string]interface{}) (StreamMetadata, error) + func (m *StreamMetadata) Acl() interface{} + func (m *StreamMetadata) AddCustomProperty(name string, value interface{}) + func (m *StreamMetadata) CacheControl() *time.Duration + func (m *StreamMetadata) IsSystemStreamAcl() bool + func (m *StreamMetadata) IsUserStreamAcl() bool + func (m *StreamMetadata) MaxAge() *time.Duration + func (m *StreamMetadata) MaxCount() *uint64 + func (m *StreamMetadata) SetAcl(value interface{}) + func (m *StreamMetadata) SetCacheControl(value time.Duration) + func (m *StreamMetadata) SetMaxAge(value time.Duration) + func (m *StreamMetadata) SetMaxCount(value uint64) + func (m *StreamMetadata) SetTruncateBefore(value uint64) + func (m *StreamMetadata) StreamAcl() *Acl + func (m *StreamMetadata) TruncateBefore() *uint64 + func (m StreamMetadata) ToMap() (map[string]interface{}, error) + type StreamPosition interface + type StreamRevision struct + Value uint64 + func Revision(value uint64) StreamRevision + type SubscribeToAllOptions struct + Authenticated *Credentials + CheckpointInterval int + Filter *SubscriptionFilter + From AllPosition + MaxSearchWindow int + ResolveLinkTos bool + type SubscribeToStreamOptions struct + Authenticated *Credentials + From StreamPosition + ResolveLinkTos bool + type Subscription struct + func NewSubscription(client *Client, cancel context.CancelFunc, inner api.Streams_ReadClient, ...) *Subscription + func (sub *Subscription) Close() error + func (sub *Subscription) Id() string + func (sub *Subscription) Recv() *SubscriptionEvent + type SubscriptionDropped struct + Error error + type SubscriptionEvent struct + CheckPointReached *Position + EventAppeared *ResolvedEvent + SubscriptionDropped *SubscriptionDropped + type SubscriptionFilter struct + Prefixes []string + Regex string + Type FilterType + func ExcludeSystemEventsFilter() *SubscriptionFilter + type SubscriptionFilterOptions struct + CheckpointInterval int + MaxSearchWindow int + SubscriptionFilter *SubscriptionFilter + type SubscriptionSettings struct + CheckpointAfterInMs int32 + ExtraStatistics bool + HistoryBufferSize int32 + LiveBufferSize int32 + MaxCheckpointCount int32 + MaxRetryCount int32 + MaxSubscriberCount int32 + MessageTimeoutInMs int32 + MinCheckpointCount int32 + NamedConsumerStrategy ConsumerStrategy + ReadBatchSize int32 + ResolveLinkTos bool + func SubscriptionSettingsDefault() SubscriptionSettings + type TombstoneStreamOptions struct + Authenticated *Credentials + ExpectedRevision ExpectedRevision + type WriteResult struct + CommitPosition uint64 + NextExpectedVersion uint64 + PreparePosition uint64 Other modules containing this package github.com/EventStore/EventStore-Client-Go/v2 github.com/EventStore/EventStore-Client-Go/v3 github.com/EventStore/EventStore-Client-Go/v4