Versions in this module Expand all Collapse all v0 v0.1.5 Apr 13, 2026 v0.1.4 Apr 12, 2026 Changes in this version + var ProviderSet = wire.NewSet(ProvideRepository, wire.Bind(new(Repo), new(*Repository))) + type Repository struct + func ProvideRepository(store protosource.Store, serializer protosource.Serializer) *Repository v0.1.3 Apr 11, 2026 v0.1.2 Apr 11, 2026 v0.1.1 Apr 10, 2026 v0.1.0 Apr 7, 2026 v0.0.9 Apr 7, 2026 v0.0.8 Apr 6, 2026 v0.0.7 Apr 6, 2026 v0.0.6 Apr 6, 2026 v0.0.5 Apr 6, 2026 v0.0.4 Apr 6, 2026 v0.0.3 Apr 6, 2026 v0.0.2 Apr 5, 2026 v0.0.1 Apr 5, 2026 Changes in this version + const SnapshotEveryNEvents + var File_example_app_sample_v1_sample_v1_proto protoreflect.FileDescriptor + func NewRepository(store protosource.Store, serializer protosource.Serializer, ...) *protosource.Repository + type Builder struct + Events []protosource.Event + func NewBuilder(id string, version int64) *Builder + func (b *Builder) Created(Actor string, Body string) + func (b *Builder) Snapshot(aggregate *Sample) + func (b *Builder) Updated(Actor string, Body string) + type Create struct + Actor string + Body string + Id string + func (*Create) Descriptor() ([]byte, []int) + func (*Create) ProtoMessage() + func (m *Create) CommandName() string + func (m *Create) EmitEvents(aggregate protosource.Aggregate) []protosource.Event + func (m *Create) ProtoValidate() error + func (m *Create) ValidateVersion(version int64) error + func (x *Create) GetActor() string + func (x *Create) GetBody() string + func (x *Create) GetId() string + func (x *Create) ProtoReflect() protoreflect.Message + func (x *Create) Reset() + func (x *Create) String() string + type Created struct + Actor string + At int64 + Body string + Id string + Version int64 + func (*Created) Descriptor() ([]byte, []int) + func (*Created) ProtoMessage() + func (m *Created) EventName() string + func (x *Created) GetActor() string + func (x *Created) GetAt() int64 + func (x *Created) GetBody() string + func (x *Created) GetId() string + func (x *Created) GetVersion() int64 + func (x *Created) ProtoReflect() protoreflect.Message + func (x *Created) Reset() + func (x *Created) String() string + type HTTPClient struct + func NewHTTPClient(c httpclient.Doer) *HTTPClient + func (c *HTTPClient) Create(ctx context.Context, id string, body string) (*responsev1.CommandResponse, error) + func (c *HTTPClient) Get(ctx context.Context, id string) (*Sample, error) + func (c *HTTPClient) History(ctx context.Context, id string) (*historyv1.History, error) + func (c *HTTPClient) Load(ctx context.Context, id string) (*Sample, error) + func (c *HTTPClient) QueryByCreateBy(ctx context.Context, createBy string) ([]*Sample, error) + func (c *HTTPClient) QueryByCreateByBetweenCreateAt(ctx context.Context, createBy string, createAtFrom int64, createAtTo int64) ([]*Sample, error) + func (c *HTTPClient) QueryByCreateByWithCreateAt(ctx context.Context, createBy string, skOp string, createAt int64) ([]*Sample, error) + func (c *HTTPClient) Update(ctx context.Context, id string, body string) (*responsev1.CommandResponse, error) + type Handler struct + func NewHandler(repo Repo, client *SampleClient) *Handler + func (h *Handler) HandleCreate(ctx context.Context, request protosource.Request) protosource.Response + func (h *Handler) HandleGet(ctx context.Context, request protosource.Request) protosource.Response + func (h *Handler) HandleGetMaterialized(ctx context.Context, request protosource.Request) protosource.Response + func (h *Handler) HandleHistory(ctx context.Context, request protosource.Request) protosource.Response + func (h *Handler) HandleQueryByCreateBy(ctx context.Context, request protosource.Request) protosource.Response + func (h *Handler) HandleUpdate(ctx context.Context, request protosource.Request) protosource.Response + func (h *Handler) RegisterRoutes(router *protosource.Router) + type Repo interface + type Sample struct + Body string + CreateAt int64 + CreateBy string + Id string + ModifyAt int64 + ModifyBy string + Version int64 + func (*Sample) Descriptor() ([]byte, []int) + func (*Sample) ProtoMessage() + func (aggregate *Sample) On(event protosource.Event) error + func (aggregate *Sample) RestoreSnapshot(snapshot *Snapshot) + func (aggregate *Sample) Snapshot(version int64) protosource.Event + func (aggregate *Sample) SnapshotInterval() int32 + func (m *Sample) GSI10PK() string + func (m *Sample) GSI10SK() string + func (m *Sample) GSI11PK() string + func (m *Sample) GSI11SK() string + func (m *Sample) GSI12PK() string + func (m *Sample) GSI12SK() string + func (m *Sample) GSI13PK() string + func (m *Sample) GSI13SK() string + func (m *Sample) GSI14PK() string + func (m *Sample) GSI14SK() string + func (m *Sample) GSI15PK() string + func (m *Sample) GSI15SK() string + func (m *Sample) GSI16PK() string + func (m *Sample) GSI16SK() string + func (m *Sample) GSI17PK() string + func (m *Sample) GSI17SK() string + func (m *Sample) GSI18PK() string + func (m *Sample) GSI18SK() string + func (m *Sample) GSI19PK() string + func (m *Sample) GSI19SK() string + func (m *Sample) GSI1PK() string + func (m *Sample) GSI1SK() string + func (m *Sample) GSI20PK() string + func (m *Sample) GSI20SK() string + func (m *Sample) GSI2PK() string + func (m *Sample) GSI2SK() string + func (m *Sample) GSI3PK() string + func (m *Sample) GSI3SK() string + func (m *Sample) GSI4PK() string + func (m *Sample) GSI4SK() string + func (m *Sample) GSI5PK() string + func (m *Sample) GSI5SK() string + func (m *Sample) GSI6PK() string + func (m *Sample) GSI6SK() string + func (m *Sample) GSI7PK() string + func (m *Sample) GSI7SK() string + func (m *Sample) GSI8PK() string + func (m *Sample) GSI8SK() string + func (m *Sample) GSI9PK() string + func (m *Sample) GSI9SK() string + func (m *Sample) Hydrate(body []byte) error + func (m *Sample) PK() string + func (m *Sample) SK() string + func (x *Sample) GetBody() string + func (x *Sample) GetCreateAt() int64 + func (x *Sample) GetCreateBy() string + func (x *Sample) GetId() string + func (x *Sample) GetModifyAt() int64 + func (x *Sample) GetModifyBy() string + func (x *Sample) GetVersion() int64 + func (x *Sample) ProtoReflect() protoreflect.Message + func (x *Sample) Reset() + func (x *Sample) String() string + type SampleClient struct + func NewSampleClient(store opaquedata.OpaqueStore) *SampleClient + func (c *SampleClient) AddSample(ctx context.Context, d *Sample, opts ...opaquedata.Option) error + func (c *SampleClient) DeleteSample(ctx context.Context, id string) error + func (c *SampleClient) GetSample(ctx context.Context, id string) (*Sample, error) + func (c *SampleClient) SelectSampleByCreateBy(ctx context.Context, create_by string) ([]*Sample, error) + func (c *SampleClient) SelectSampleByCreateByWithCreateAt(ctx context.Context, create_by string, op opaquedata.SortOperator, ...) ([]*Sample, error) + func (c *SampleClient) UpdateSample(ctx context.Context, d *Sample, opts ...opaquedata.Option) error + type SampleGSI1SK struct + CreateAt int64 + func (v SampleGSI1SK) String() string + type SampleList struct + Items []*Sample + func (*SampleList) Descriptor() ([]byte, []int) + func (*SampleList) ProtoMessage() + func (x *SampleList) GetItems() []*Sample + func (x *SampleList) ProtoReflect() protoreflect.Message + func (x *SampleList) Reset() + func (x *SampleList) String() string + type Snapshot struct + Actor string + At int64 + Id string + Snapshot *Sample + Version int64 + func (*Snapshot) Descriptor() ([]byte, []int) + func (*Snapshot) ProtoMessage() + func (m *Snapshot) EventName() string + func (x *Snapshot) GetActor() string + func (x *Snapshot) GetAt() int64 + func (x *Snapshot) GetId() string + func (x *Snapshot) GetSnapshot() *Sample + func (x *Snapshot) GetVersion() int64 + func (x *Snapshot) ProtoReflect() protoreflect.Message + func (x *Snapshot) Reset() + func (x *Snapshot) String() string + type Update struct + Actor string + Body string + Id string + func (*Update) Descriptor() ([]byte, []int) + func (*Update) ProtoMessage() + func (m *Update) CommandName() string + func (m *Update) EmitEvents(aggregate protosource.Aggregate) []protosource.Event + func (m *Update) ProtoValidate() error + func (m *Update) ValidateVersion(version int64) error + func (x *Update) GetActor() string + func (x *Update) GetBody() string + func (x *Update) GetId() string + func (x *Update) ProtoReflect() protoreflect.Message + func (x *Update) Reset() + func (x *Update) String() string + type Updated struct + Actor string + At int64 + Body string + Id string + Version int64 + func (*Updated) Descriptor() ([]byte, []int) + func (*Updated) ProtoMessage() + func (m *Updated) EventName() string + func (x *Updated) GetActor() string + func (x *Updated) GetAt() int64 + func (x *Updated) GetBody() string + func (x *Updated) GetId() string + func (x *Updated) GetVersion() int64 + func (x *Updated) ProtoReflect() protoreflect.Message + func (x *Updated) Reset() + func (x *Updated) String() string