Documentation ¶
Index ¶
- func EntityTypeFromMsg(msg proto.Message) string
- func NewCrudStoreClientWithNoNetworking(server crudstore.CrudStoreServiceServer) crudstore.CrudStoreServiceClient
- func NewCrudStoreGRPCClient(ctx context.Context, storeEndpoint string) (crudstore.CrudStoreServiceClient, error)
- func NewCrudStoreGrpcClientWithWait(ctx context.Context, storeEndpoint string) (crudstore.CrudStoreServiceClient, error)
- func NewEventStoreServiceClientWithNoNetworking(server store.EventstoreServiceServer) store.EventstoreServiceClient
- func NewStoreClient(ctx context.Context, storeEndpoint string) (eventstore.Store, error)
- func NewStoreClientWithWait(ctx context.Context, storeEndpoint string) (store.EventstoreServiceClient, error)
- type CrudStoreClient
- func (crud *CrudStoreClient) Create(msg proto.Message) (*common.Originator, error)
- func (crud *CrudStoreClient) Delete(originator *common.Originator, msg proto.Message) (*common.Originator, error)
- func (crud *CrudStoreClient) Get(originator *common.Originator, msg proto.Message, deleted bool) error
- func (crud *CrudStoreClient) List(result interface{}) error
- func (crud *CrudStoreClient) ListWithPagination(result interface{}, fromPage string, size int) (string, error)
- func (crud *CrudStoreClient) Update(msg proto.Message) (*common.Originator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EntityTypeFromMsg ¶
func NewCrudStoreClientWithNoNetworking ¶
func NewCrudStoreClientWithNoNetworking(server crudstore.CrudStoreServiceServer) crudstore.CrudStoreServiceClient
func NewCrudStoreGRPCClient ¶
func NewEventStoreServiceClientWithNoNetworking ¶
func NewEventStoreServiceClientWithNoNetworking(server store.EventstoreServiceServer) store.EventstoreServiceClient
NewEventStoreServiceClientWithNoNetworking is useful for unittesting where you can embed the server directly inside the client and can do all kinds of tests without having to worry about the networking bit and spinning up servers
func NewStoreClient ¶
NewStoreClient creates a new instance of eventstore.Store
func NewStoreClientWithWait ¶
func NewStoreClientWithWait(ctx context.Context, storeEndpoint string) (store.EventstoreServiceClient, error)
Creates a new EventstoreServiceClient but first waits for health endpoint to become ready
Types ¶
type CrudStoreClient ¶
type CrudStoreClient struct { CrudGRPC crudstore.CrudStoreServiceClient // contains filtered or unexported fields }
func NewCrudStoreClient ¶
func NewCrudStoreClient(ctx context.Context, storeEndpoint string) (*CrudStoreClient, error)
func NewCrudStoreWithActiveConn ¶
func NewCrudStoreWithActiveConn(ctx context.Context, client crudstore.CrudStoreServiceClient) (*CrudStoreClient, error)
func (*CrudStoreClient) Create ¶
func (crud *CrudStoreClient) Create(msg proto.Message) (*common.Originator, error)
func (*CrudStoreClient) Delete ¶
func (crud *CrudStoreClient) Delete(originator *common.Originator, msg proto.Message) (*common.Originator, error)
func (*CrudStoreClient) Get ¶
func (crud *CrudStoreClient) Get(originator *common.Originator, msg proto.Message, deleted bool) error
func (*CrudStoreClient) List ¶
func (crud *CrudStoreClient) List(result interface{}) error
List is clever enough to fetch the results and populate the result interface with values
func (*CrudStoreClient) ListWithPagination ¶
func (crud *CrudStoreClient) ListWithPagination(result interface{}, fromPage string, size int) (string, error)
func (*CrudStoreClient) Update ¶
func (crud *CrudStoreClient) Update(msg proto.Message) (*common.Originator, error)
TODO maybe can add some concurrency retry inside of it ?
Click to show internal directories.
Click to hide internal directories.