yellowpages

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Hostname = yellowpagesapi.Hostname
	Version  = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Intermediate

type Intermediate struct {
	*connector.Connector
	ToDo
}

Intermediate extends and customizes the generic base connector.

func NewIntermediate

func NewIntermediate(impl ToDo) *Intermediate

NewIntermediate creates a new instance of the intermediate.

func (*Intermediate) SQLDataSourceName

func (svc *Intermediate) SQLDataSourceName() (value string)

SQLDataSourceName is the connection string of the SQL database.

func (*Intermediate) SetSQLDataSourceName

func (svc *Intermediate) SetSQLDataSourceName(value string) (err error)

SetSQLDataSourceName sets the value of the configuration property.

type Mock

type Mock struct {
	*Intermediate
	// contains filtered or unexported fields
}

Mock is a mockable version of the microservice, allowing functions, event sinks and web handlers to be mocked.

func NewMock

func NewMock() *Mock

NewMock creates a new mockable version of the microservice.

func (*Mock) BulkCreate

func (svc *Mock) BulkCreate(ctx context.Context, objs []*yellowpagesapi.Person) (objKeys []yellowpagesapi.PersonKey, err error)

BulkCreate executes the mock handler.

func (*Mock) BulkDelete

func (svc *Mock) BulkDelete(ctx context.Context, objKeys []yellowpagesapi.PersonKey) (deletedKeys []yellowpagesapi.PersonKey, err error)

BulkDelete executes the mock handler.

func (*Mock) BulkLoad

func (svc *Mock) BulkLoad(ctx context.Context, objKeys []yellowpagesapi.PersonKey) (objs []*yellowpagesapi.Person, err error)

BulkLoad executes the mock handler.

func (*Mock) BulkReserve added in v1.26.0

func (svc *Mock) BulkReserve(ctx context.Context, objKeys []yellowpagesapi.PersonKey, dur time.Duration) (reservedKeys []yellowpagesapi.PersonKey, err error)

BulkReserve executes the mock handler.

func (*Mock) BulkRevise

func (svc *Mock) BulkRevise(ctx context.Context, objs []*yellowpagesapi.Person) (revisedKeys []yellowpagesapi.PersonKey, err error)

BulkRevise executes the mock handler.

func (*Mock) BulkStore

func (svc *Mock) BulkStore(ctx context.Context, objs []*yellowpagesapi.Person) (storedKeys []yellowpagesapi.PersonKey, err error)

BulkStore executes the mock handler.

func (*Mock) Count

func (svc *Mock) Count(ctx context.Context, query yellowpagesapi.Query) (count int, err error)

Count executes the mock handler.

func (*Mock) Create

func (svc *Mock) Create(ctx context.Context, obj *yellowpagesapi.Person) (objKey yellowpagesapi.PersonKey, err error)

Create executes the mock handler.

func (*Mock) CreateREST

func (svc *Mock) CreateREST(ctx context.Context, httpRequestBody *yellowpagesapi.Person) (objKey yellowpagesapi.PersonKey, httpStatusCode int, err error)

CreateREST executes the mock handler.

func (*Mock) Delete

func (svc *Mock) Delete(ctx context.Context, objKey yellowpagesapi.PersonKey) (deleted bool, err error)

Delete executes the mock handler.

func (*Mock) DeleteREST

func (svc *Mock) DeleteREST(ctx context.Context, key yellowpagesapi.PersonKey) (httpStatusCode int, err error)

DeleteREST executes the mock handler.

func (*Mock) Demo added in v1.26.0

func (svc *Mock) Demo(w http.ResponseWriter, r *http.Request) (err error)

Demo executes the mock handler.

func (*Mock) List

func (svc *Mock) List(ctx context.Context, query yellowpagesapi.Query) (objs []*yellowpagesapi.Person, totalCount int, err error)

List executes the mock handler.

func (*Mock) ListREST

func (svc *Mock) ListREST(ctx context.Context, q yellowpagesapi.Query) (httpResponseBody []*yellowpagesapi.Person, httpStatusCode int, err error)

ListREST executes the mock handler.

func (*Mock) Load

func (svc *Mock) Load(ctx context.Context, objKey yellowpagesapi.PersonKey) (obj *yellowpagesapi.Person, found bool, err error)

Load executes the mock handler.

func (*Mock) LoadREST

func (svc *Mock) LoadREST(ctx context.Context, key yellowpagesapi.PersonKey) (httpResponseBody *yellowpagesapi.Person, httpStatusCode int, err error)

LoadREST executes the mock handler.

func (*Mock) Lookup

func (svc *Mock) Lookup(ctx context.Context, query yellowpagesapi.Query) (obj *yellowpagesapi.Person, found bool, err error)

Lookup executes the mock handler.

func (*Mock) MockBulkCreate

func (svc *Mock) MockBulkCreate(handler func(ctx context.Context, objs []*yellowpagesapi.Person) (objKeys []yellowpagesapi.PersonKey, err error)) *Mock

MockBulkCreate sets up a mock handler for BulkCreate.

func (*Mock) MockBulkDelete

func (svc *Mock) MockBulkDelete(handler func(ctx context.Context, objKeys []yellowpagesapi.PersonKey) (deletedKeys []yellowpagesapi.PersonKey, err error)) *Mock

MockBulkDelete sets up a mock handler for BulkDelete.

func (*Mock) MockBulkLoad

func (svc *Mock) MockBulkLoad(handler func(ctx context.Context, objKeys []yellowpagesapi.PersonKey) (objs []*yellowpagesapi.Person, err error)) *Mock

MockBulkLoad sets up a mock handler for BulkLoad.

func (*Mock) MockBulkReserve added in v1.26.0

func (svc *Mock) MockBulkReserve(handler func(ctx context.Context, objKeys []yellowpagesapi.PersonKey, dur time.Duration) (reservedKeys []yellowpagesapi.PersonKey, err error)) *Mock

MockBulkReserve sets up a mock handler for BulkReserve.

func (*Mock) MockBulkRevise

func (svc *Mock) MockBulkRevise(handler func(ctx context.Context, objs []*yellowpagesapi.Person) (revisedKeys []yellowpagesapi.PersonKey, err error)) *Mock

MockBulkRevise sets up a mock handler for BulkRevise.

func (*Mock) MockBulkStore

func (svc *Mock) MockBulkStore(handler func(ctx context.Context, objs []*yellowpagesapi.Person) (storedKeys []yellowpagesapi.PersonKey, err error)) *Mock

MockBulkStore sets up a mock handler for BulkStore.

func (*Mock) MockCount

func (svc *Mock) MockCount(handler func(ctx context.Context, query yellowpagesapi.Query) (count int, err error)) *Mock

MockCount sets up a mock handler for Count.

func (*Mock) MockCreate

func (svc *Mock) MockCreate(handler func(ctx context.Context, obj *yellowpagesapi.Person) (objKey yellowpagesapi.PersonKey, err error)) *Mock

MockCreate sets up a mock handler for Create.

func (*Mock) MockCreateREST

func (svc *Mock) MockCreateREST(handler func(ctx context.Context, httpRequestBody *yellowpagesapi.Person) (objKey yellowpagesapi.PersonKey, httpStatusCode int, err error)) *Mock

MockCreateREST sets up a mock handler for CreateREST.

func (*Mock) MockDelete

func (svc *Mock) MockDelete(handler func(ctx context.Context, objKey yellowpagesapi.PersonKey) (deleted bool, err error)) *Mock

MockDelete sets up a mock handler for Delete.

func (*Mock) MockDeleteREST

func (svc *Mock) MockDeleteREST(handler func(ctx context.Context, key yellowpagesapi.PersonKey) (httpStatusCode int, err error)) *Mock

MockDeleteREST sets up a mock handler for DeleteREST.

func (*Mock) MockDemo added in v1.26.0

func (svc *Mock) MockDemo(handler func(w http.ResponseWriter, r *http.Request) (err error)) *Mock

MockDemo sets up a mock handler for Demo.

func (*Mock) MockList

func (svc *Mock) MockList(handler func(ctx context.Context, query yellowpagesapi.Query) (objs []*yellowpagesapi.Person, totalCount int, err error)) *Mock

MockList sets up a mock handler for List.

func (*Mock) MockListREST

func (svc *Mock) MockListREST(handler func(ctx context.Context, q yellowpagesapi.Query) (httpResponseBody []*yellowpagesapi.Person, httpStatusCode int, err error)) *Mock

MockListREST sets up a mock handler for ListREST.

func (*Mock) MockLoad

func (svc *Mock) MockLoad(handler func(ctx context.Context, objKey yellowpagesapi.PersonKey) (obj *yellowpagesapi.Person, found bool, err error)) *Mock

MockLoad sets up a mock handler for Load.

func (*Mock) MockLoadREST

func (svc *Mock) MockLoadREST(handler func(ctx context.Context, key yellowpagesapi.PersonKey) (httpResponseBody *yellowpagesapi.Person, httpStatusCode int, err error)) *Mock

MockLoadREST sets up a mock handler for LoadREST.

func (*Mock) MockLookup

func (svc *Mock) MockLookup(handler func(ctx context.Context, query yellowpagesapi.Query) (obj *yellowpagesapi.Person, found bool, err error)) *Mock

MockLookup sets up a mock handler for Lookup.

func (*Mock) MockMustDelete

func (svc *Mock) MockMustDelete(handler func(ctx context.Context, objKey yellowpagesapi.PersonKey) (err error)) *Mock

MockMustDelete sets up a mock handler for MustDelete.

func (*Mock) MockMustLoad

func (svc *Mock) MockMustLoad(handler func(ctx context.Context, objKey yellowpagesapi.PersonKey) (obj *yellowpagesapi.Person, err error)) *Mock

MockMustLoad sets up a mock handler for MustLoad.

func (*Mock) MockMustLookup

func (svc *Mock) MockMustLookup(handler func(ctx context.Context, query yellowpagesapi.Query) (obj *yellowpagesapi.Person, err error)) *Mock

MockMustLookup sets up a mock handler for MustLookup.

func (*Mock) MockMustRevise

func (svc *Mock) MockMustRevise(handler func(ctx context.Context, obj *yellowpagesapi.Person) (err error)) *Mock

MockMustRevise sets up a mock handler for MustRevise.

func (*Mock) MockMustStore

func (svc *Mock) MockMustStore(handler func(ctx context.Context, obj *yellowpagesapi.Person) (err error)) *Mock

MockMustStore sets up a mock handler for MustStore.

func (*Mock) MockPurge

func (svc *Mock) MockPurge(handler func(ctx context.Context, query yellowpagesapi.Query) (deletedKeys []yellowpagesapi.PersonKey, err error)) *Mock

MockPurge sets up a mock handler for Purge.

func (*Mock) MockReserve added in v1.26.0

func (svc *Mock) MockReserve(handler func(ctx context.Context, objKey yellowpagesapi.PersonKey, dur time.Duration) (reserved bool, err error)) *Mock

MockReserve sets up a mock handler for Reserve.

func (*Mock) MockRevise

func (svc *Mock) MockRevise(handler func(ctx context.Context, obj *yellowpagesapi.Person) (revised bool, err error)) *Mock

MockRevise sets up a mock handler for Revise.

func (*Mock) MockStore

func (svc *Mock) MockStore(handler func(ctx context.Context, obj *yellowpagesapi.Person) (stored bool, err error)) *Mock

MockStore sets up a mock handler for Store.

func (*Mock) MockStoreREST

func (svc *Mock) MockStoreREST(handler func(ctx context.Context, key yellowpagesapi.PersonKey, httpRequestBody *yellowpagesapi.Person) (httpStatusCode int, err error)) *Mock

MockStoreREST sets up a mock handler for StoreREST.

func (*Mock) MockTryBulkReserve added in v1.26.0

func (svc *Mock) MockTryBulkReserve(handler func(ctx context.Context, objKeys []yellowpagesapi.PersonKey, dur time.Duration) (reservedKeys []yellowpagesapi.PersonKey, err error)) *Mock

MockTryBulkReserve sets up a mock handler for TryBulkReserve.

func (*Mock) MockTryReserve added in v1.26.0

func (svc *Mock) MockTryReserve(handler func(ctx context.Context, objKey yellowpagesapi.PersonKey, dur time.Duration) (reserved bool, err error)) *Mock

MockTryReserve sets up a mock handler for TryReserve.

func (*Mock) MustDelete

func (svc *Mock) MustDelete(ctx context.Context, objKey yellowpagesapi.PersonKey) (err error)

MustDelete executes the mock handler.

func (*Mock) MustLoad

func (svc *Mock) MustLoad(ctx context.Context, objKey yellowpagesapi.PersonKey) (obj *yellowpagesapi.Person, err error)

MustLoad executes the mock handler.

func (*Mock) MustLookup

func (svc *Mock) MustLookup(ctx context.Context, query yellowpagesapi.Query) (obj *yellowpagesapi.Person, err error)

MustLookup executes the mock handler.

func (*Mock) MustRevise

func (svc *Mock) MustRevise(ctx context.Context, obj *yellowpagesapi.Person) (err error)

MustRevise executes the mock handler.

func (*Mock) MustStore

func (svc *Mock) MustStore(ctx context.Context, obj *yellowpagesapi.Person) (err error)

MustStore executes the mock handler.

func (*Mock) OnShutdown

func (svc *Mock) OnShutdown(ctx context.Context) (err error)

OnShutdown is called when the microservice is shut down.

func (*Mock) OnStartup

func (svc *Mock) OnStartup(ctx context.Context) (err error)

OnStartup is called when the microservice is started up.

func (*Mock) Purge

func (svc *Mock) Purge(ctx context.Context, query yellowpagesapi.Query) (deletedKeys []yellowpagesapi.PersonKey, err error)

Purge executes the mock handler.

func (*Mock) Reserve added in v1.26.0

func (svc *Mock) Reserve(ctx context.Context, objKey yellowpagesapi.PersonKey, dur time.Duration) (reserved bool, err error)

Reserve executes the mock handler.

func (*Mock) Revise

func (svc *Mock) Revise(ctx context.Context, obj *yellowpagesapi.Person) (revised bool, err error)

Revise executes the mock handler.

func (*Mock) Store

func (svc *Mock) Store(ctx context.Context, obj *yellowpagesapi.Person) (stored bool, err error)

Store executes the mock handler.

func (*Mock) StoreREST

func (svc *Mock) StoreREST(ctx context.Context, key yellowpagesapi.PersonKey, httpRequestBody *yellowpagesapi.Person) (httpStatusCode int, err error)

StoreREST executes the mock handler.

func (*Mock) TryBulkReserve added in v1.26.0

func (svc *Mock) TryBulkReserve(ctx context.Context, objKeys []yellowpagesapi.PersonKey, dur time.Duration) (reservedKeys []yellowpagesapi.PersonKey, err error)

TryBulkReserve executes the mock handler.

func (*Mock) TryReserve added in v1.26.0

func (svc *Mock) TryReserve(ctx context.Context, objKey yellowpagesapi.PersonKey, dur time.Duration) (reserved bool, err error)

TryReserve executes the mock handler.

type Service

type Service struct {
	*Intermediate // IMPORTANT: Do not remove
	// contains filtered or unexported fields
}

Service implements the microservice which persists persons in a SQL database.

func NewService

func NewService() *Service

NewService creates a new instance of the microservice.

func (*Service) BulkCreate

func (svc *Service) BulkCreate(ctx context.Context, objs []*yellowpagesapi.Person) (objKeys []yellowpagesapi.PersonKey, err error)

BulkCreate creates multiple objects, returning their keys.

func (*Service) BulkDelete

func (svc *Service) BulkDelete(ctx context.Context, objKeys []yellowpagesapi.PersonKey) (deletedKeys []yellowpagesapi.PersonKey, err error)

BulkDelete deletes the objects matching the keys, returning the keys of the deleted objects.

func (*Service) BulkLoad

func (svc *Service) BulkLoad(ctx context.Context, objKeys []yellowpagesapi.PersonKey) (objs []*yellowpagesapi.Person, err error)

BulkLoad returns the objects matching the keys.

func (*Service) BulkReserve added in v1.26.0

func (svc *Service) BulkReserve(ctx context.Context, objKeys []yellowpagesapi.PersonKey, dur time.Duration) (reservedKeys []yellowpagesapi.PersonKey, err error)

BulkReserve unconditionally reserves persons for the given duration, returning the keys of those that exist.

func (*Service) BulkRevise

func (svc *Service) BulkRevise(ctx context.Context, objs []*yellowpagesapi.Person) (revisedKeys []yellowpagesapi.PersonKey, err error)

BulkRevise updates multiple objects, returning the number of rows affected. Only rows with matching revisions are updated.

func (*Service) BulkStore

func (svc *Service) BulkStore(ctx context.Context, objs []*yellowpagesapi.Person) (storedKeys []yellowpagesapi.PersonKey, err error)

BulkStore updates multiple objects, returning the keys of the stored objects.

func (*Service) Count

func (svc *Service) Count(ctx context.Context, query yellowpagesapi.Query) (count int, err error)

Count returns the number of objects matching the query, disregarding pagination.

func (*Service) Create

func (svc *Service) Create(ctx context.Context, obj *yellowpagesapi.Person) (objKey yellowpagesapi.PersonKey, err error)

Create creates a new object, returning its key.

func (*Service) CreateREST

func (svc *Service) CreateREST(ctx context.Context, httpRequestBody *yellowpagesapi.Person) (objKey yellowpagesapi.PersonKey, httpStatusCode int, err error)

CreateREST creates a new person via REST, returning its key.

func (*Service) Delete

func (svc *Service) Delete(ctx context.Context, objKey yellowpagesapi.PersonKey) (deleted bool, err error)

Delete deletes the object.

func (*Service) DeleteREST

func (svc *Service) DeleteREST(ctx context.Context, key yellowpagesapi.PersonKey) (httpStatusCode int, err error)

DeleteREST deletes an existing person via REST.

func (*Service) Demo added in v1.26.0

func (svc *Service) Demo(w http.ResponseWriter, r *http.Request) (err error)

Demo serves the web user interface for managing persons.

func (*Service) Init

func (svc *Service) Init(initializer func(svc *Service) (err error)) *Service

Init enables a single-statement pattern for initializing the microservice.

func (*Service) List

func (svc *Service) List(ctx context.Context, query yellowpagesapi.Query) (objs []*yellowpagesapi.Person, totalCount int, err error)

List returns the objects matching the query, and the total count of matches regardless of the limit.

func (*Service) ListREST

func (svc *Service) ListREST(ctx context.Context, q yellowpagesapi.Query) (httpResponseBody []*yellowpagesapi.Person, httpStatusCode int, err error)

ListREST lists persons matching the query via REST.

func (*Service) Load

func (svc *Service) Load(ctx context.Context, objKey yellowpagesapi.PersonKey) (obj *yellowpagesapi.Person, found bool, err error)

Load returns the object associated with the key.

func (*Service) LoadREST

func (svc *Service) LoadREST(ctx context.Context, key yellowpagesapi.PersonKey) (httpResponseBody *yellowpagesapi.Person, httpStatusCode int, err error)

LoadREST loads a person by key via REST.

func (*Service) Lookup

func (svc *Service) Lookup(ctx context.Context, query yellowpagesapi.Query) (obj *yellowpagesapi.Person, found bool, err error)

Lookup returns the single object matching the query. It errors if more than one object matches the query.

func (*Service) MustDelete

func (svc *Service) MustDelete(ctx context.Context, objKey yellowpagesapi.PersonKey) (err error)

MustDelete deletes the object.

func (*Service) MustLoad

func (svc *Service) MustLoad(ctx context.Context, objKey yellowpagesapi.PersonKey) (obj *yellowpagesapi.Person, err error)

MustLoad returns the object associated with the key. It errors if the object is not found.

func (*Service) MustLookup

func (svc *Service) MustLookup(ctx context.Context, query yellowpagesapi.Query) (obj *yellowpagesapi.Person, err error)

MustLookup returns the single object matching the query. It errors unless exactly one object matches the query.

func (*Service) MustRevise

func (svc *Service) MustRevise(ctx context.Context, obj *yellowpagesapi.Person) (err error)

MustRevise updates the object only if the revision matches.

func (*Service) MustStore

func (svc *Service) MustStore(ctx context.Context, obj *yellowpagesapi.Person) (err error)

MustStore updates the object.

func (*Service) OnShutdown

func (svc *Service) OnShutdown(ctx context.Context) (err error)

OnShutdown is called when the microservice is shut down.

func (*Service) OnStartup

func (svc *Service) OnStartup(ctx context.Context) (err error)

OnStartup is called when the microservice is started up.

func (*Service) Purge

func (svc *Service) Purge(ctx context.Context, query yellowpagesapi.Query) (deletedKeys []yellowpagesapi.PersonKey, err error)

Purge deletes all objects matching the query, returning the keys of the deleted objects.

func (*Service) Reserve added in v1.26.0

func (svc *Service) Reserve(ctx context.Context, objKey yellowpagesapi.PersonKey, dur time.Duration) (reserved bool, err error)

Reserve unconditionally reserves a person for the given duration, returning true if the person exists.

func (*Service) Revise

func (svc *Service) Revise(ctx context.Context, obj *yellowpagesapi.Person) (revised bool, err error)

Revise updates the object only if the revision matches.

func (*Service) Store

func (svc *Service) Store(ctx context.Context, obj *yellowpagesapi.Person) (stored bool, err error)

Store updates the object.

func (*Service) StoreREST

func (svc *Service) StoreREST(ctx context.Context, key yellowpagesapi.PersonKey, httpRequestBody *yellowpagesapi.Person) (httpStatusCode int, err error)

StoreREST updates an existing person via REST.

func (*Service) TryBulkReserve added in v1.26.0

func (svc *Service) TryBulkReserve(ctx context.Context, objKeys []yellowpagesapi.PersonKey, dur time.Duration) (reservedKeys []yellowpagesapi.PersonKey, err error)

TryBulkReserve attempts to reserve persons for the given duration, returning the keys of those successfully reserved. Only persons whose reservation has expired (reserved_before < NOW) are reserved.

func (*Service) TryReserve added in v1.26.0

func (svc *Service) TryReserve(ctx context.Context, objKey yellowpagesapi.PersonKey, dur time.Duration) (reserved bool, err error)

TryReserve attempts to reserve a person for the given duration, returning true if successful.

type ToDo

type ToDo interface {
	OnStartup(ctx context.Context) (err error)
	OnShutdown(ctx context.Context) (err error)
	Create(ctx context.Context, obj *yellowpagesapi.Person) (objKey yellowpagesapi.PersonKey, err error)                                            // MARKER: Create
	Store(ctx context.Context, obj *yellowpagesapi.Person) (stored bool, err error)                                                                 // MARKER: Store
	MustStore(ctx context.Context, obj *yellowpagesapi.Person) (err error)                                                                          // MARKER: MustStore
	Revise(ctx context.Context, obj *yellowpagesapi.Person) (revised bool, err error)                                                               // MARKER: Revise
	MustRevise(ctx context.Context, obj *yellowpagesapi.Person) (err error)                                                                         // MARKER: MustRevise
	Delete(ctx context.Context, objKey yellowpagesapi.PersonKey) (deleted bool, err error)                                                          // MARKER: Delete
	MustDelete(ctx context.Context, objKey yellowpagesapi.PersonKey) (err error)                                                                    // MARKER: MustDelete
	List(ctx context.Context, query yellowpagesapi.Query) (objs []*yellowpagesapi.Person, totalCount int, err error)                                // MARKER: List
	Lookup(ctx context.Context, query yellowpagesapi.Query) (obj *yellowpagesapi.Person, found bool, err error)                                     // MARKER: Lookup
	MustLookup(ctx context.Context, query yellowpagesapi.Query) (obj *yellowpagesapi.Person, err error)                                             // MARKER: MustLookup
	Load(ctx context.Context, objKey yellowpagesapi.PersonKey) (obj *yellowpagesapi.Person, found bool, err error)                                  // MARKER: Load
	MustLoad(ctx context.Context, objKey yellowpagesapi.PersonKey) (obj *yellowpagesapi.Person, err error)                                          // MARKER: MustLoad
	BulkLoad(ctx context.Context, objKeys []yellowpagesapi.PersonKey) (objs []*yellowpagesapi.Person, err error)                                    // MARKER: BulkLoad
	BulkDelete(ctx context.Context, objKeys []yellowpagesapi.PersonKey) (deletedKeys []yellowpagesapi.PersonKey, err error)                         // MARKER: BulkDelete
	BulkCreate(ctx context.Context, objs []*yellowpagesapi.Person) (objKeys []yellowpagesapi.PersonKey, err error)                                  // MARKER: BulkCreate
	BulkStore(ctx context.Context, objs []*yellowpagesapi.Person) (storedKeys []yellowpagesapi.PersonKey, err error)                                // MARKER: BulkStore
	BulkRevise(ctx context.Context, objs []*yellowpagesapi.Person) (revisedKeys []yellowpagesapi.PersonKey, err error)                              // MARKER: BulkRevise
	Purge(ctx context.Context, query yellowpagesapi.Query) (deletedKeys []yellowpagesapi.PersonKey, err error)                                      // MARKER: Purge
	Count(ctx context.Context, query yellowpagesapi.Query) (count int, err error)                                                                   // MARKER: Count
	CreateREST(ctx context.Context, httpRequestBody *yellowpagesapi.Person) (objKey yellowpagesapi.PersonKey, httpStatusCode int, err error)        // MARKER: CreateREST
	StoreREST(ctx context.Context, key yellowpagesapi.PersonKey, httpRequestBody *yellowpagesapi.Person) (httpStatusCode int, err error)            // MARKER: StoreREST
	DeleteREST(ctx context.Context, key yellowpagesapi.PersonKey) (httpStatusCode int, err error)                                                   // MARKER: DeleteREST
	LoadREST(ctx context.Context, key yellowpagesapi.PersonKey) (httpResponseBody *yellowpagesapi.Person, httpStatusCode int, err error)            // MARKER: LoadREST
	ListREST(ctx context.Context, q yellowpagesapi.Query) (httpResponseBody []*yellowpagesapi.Person, httpStatusCode int, err error)                // MARKER: ListREST
	TryReserve(ctx context.Context, objKey yellowpagesapi.PersonKey, dur time.Duration) (reserved bool, err error)                                  // MARKER: TryReserve
	TryBulkReserve(ctx context.Context, objKeys []yellowpagesapi.PersonKey, dur time.Duration) (reservedKeys []yellowpagesapi.PersonKey, err error) // MARKER: TryBulkReserve
	Reserve(ctx context.Context, objKey yellowpagesapi.PersonKey, dur time.Duration) (reserved bool, err error)                                     // MARKER: Reserve
	BulkReserve(ctx context.Context, objKeys []yellowpagesapi.PersonKey, dur time.Duration) (reservedKeys []yellowpagesapi.PersonKey, err error)    // MARKER: BulkReserve
	Demo(w http.ResponseWriter, r *http.Request) (err error)                                                                                        // MARKER: Demo
}

ToDo is implemented by the service or mock. The intermediate delegates handling to this interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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