Documentation ¶
Index ¶
- type ExpectedResponse
- type FakeKeysAPI
- func (f *FakeKeysAPI) Create(ctx context.Context, key, value string) (*client.Response, error)
- func (f *FakeKeysAPI) CreateInOrder(ctx context.Context, dir, value string, opts *client.CreateInOrderOptions) (*client.Response, error)
- func (f *FakeKeysAPI) Delete(ctx context.Context, key string, opts *client.DeleteOptions) (*client.Response, error)
- func (f *FakeKeysAPI) ExpectGet(key string) *ExpectedResponse
- func (f *FakeKeysAPI) ExpectSet(key, value string) *ExpectedResponse
- func (f *FakeKeysAPI) ExpectationsFulfilled() error
- func (f *FakeKeysAPI) Get(ctx context.Context, key string, opts *client.GetOptions) (resp *client.Response, err error)
- func (f *FakeKeysAPI) Set(ctx context.Context, key, val string, opts *client.SetOptions) (*client.Response, error)
- func (f *FakeKeysAPI) Update(ctx context.Context, key, value string) (*client.Response, error)
- func (f *FakeKeysAPI) Watcher(key string, opts *client.WatcherOptions) client.Watcher
- type KeysAPIWrapper
- type MockWatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpectedResponse ¶
func (*ExpectedResponse) WillReturnError ¶
func (e *ExpectedResponse) WillReturnError(err error) *ExpectedResponse
func (*ExpectedResponse) WillReturnValue ¶
func (e *ExpectedResponse) WillReturnValue(value string) *ExpectedResponse
type FakeKeysAPI ¶
type FakeKeysAPI struct { ExpectedResponses []*ExpectedResponse ExpectedSets []*ExpectedResponse ReceivedSets []*ExpectedResponse AllowUnordered bool }
func (*FakeKeysAPI) CreateInOrder ¶
func (f *FakeKeysAPI) CreateInOrder(ctx context.Context, dir, value string, opts *client.CreateInOrderOptions) (*client.Response, error)
func (*FakeKeysAPI) Delete ¶
func (f *FakeKeysAPI) Delete(ctx context.Context, key string, opts *client.DeleteOptions) (*client.Response, error)
func (*FakeKeysAPI) ExpectGet ¶
func (f *FakeKeysAPI) ExpectGet(key string) *ExpectedResponse
func (*FakeKeysAPI) ExpectSet ¶
func (f *FakeKeysAPI) ExpectSet(key, value string) *ExpectedResponse
func (*FakeKeysAPI) ExpectationsFulfilled ¶
func (f *FakeKeysAPI) ExpectationsFulfilled() error
func (*FakeKeysAPI) Get ¶
func (f *FakeKeysAPI) Get(ctx context.Context, key string, opts *client.GetOptions) (resp *client.Response, err error)
func (*FakeKeysAPI) Set ¶
func (f *FakeKeysAPI) Set(ctx context.Context, key, val string, opts *client.SetOptions) (*client.Response, error)
func (*FakeKeysAPI) Watcher ¶
func (f *FakeKeysAPI) Watcher(key string, opts *client.WatcherOptions) client.Watcher
type KeysAPIWrapper ¶
type MockWatcher ¶
func (*MockWatcher) ExpectResponse ¶
func (f *MockWatcher) ExpectResponse(node *client.Node)
func (*MockWatcher) ExpectationsWereFulfilled ¶
func (f *MockWatcher) ExpectationsWereFulfilled() error
Click to show internal directories.
Click to hide internal directories.