clients

package
v0.0.0-...-5873ee2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2022 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntityTypeFromMsg

func EntityTypeFromMsg(msg proto.Message) string

func NewCrudStoreGRPCClient

func NewCrudStoreGRPCClient(ctx context.Context, storeEndpoint string) (crudstore.CrudStoreServiceClient, error)

func NewCrudStoreGrpcClientWithWait

func NewCrudStoreGrpcClientWithWait(ctx context.Context, storeEndpoint string) (crudstore.CrudStoreServiceClient, error)

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

func NewStoreClient(ctx context.Context, storeEndpoint string) (eventstore.Store, error)

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 ?

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL