Documentation ¶
Index ¶
- Constants
- type Store
- func (s *Store) Calls(call string) int
- func (s *Store) Close() error
- func (s *Store) CreateTopic(topic *api.Topic) error
- func (s *Store) DeleteTopic(topicID ulid.ULID) error
- func (s *Store) ListTopics(projectID ulid.ULID) iterator.TopicIterator
- func (s *Store) ReadOnly() bool
- func (s *Store) Reset()
- func (s *Store) RetrieveTopic(topicID ulid.ULID) (*api.Topic, error)
- func (s *Store) UpdateTopic(topic *api.Topic) error
- func (s *Store) UseError(call string, err error) error
- func (s *Store) UseFixture(call, path string) (err error)
- type TopicIterator
Constants ¶
View Source
const ( Close = "Close" ReadOnly = "ReadOnly" ListTopics = "ListTopics" CreateTopic = "CreateTopic" RetrieveTopic = "RetrieveTopic" UpdateTopic = "UpdateTopic" DeleteTopic = "DeleteTopic" )
Constants are used to reference store methods in mock code
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { OnClose func() error OnReadOnly func() bool OnListTopics func(ulid.ULID) iterator.TopicIterator OnCreateTopic func(*api.Topic) error OnRetrieveTopic func(topicID ulid.ULID) (*api.Topic, error) OnUpdateTopic func(*api.Topic) error OnDeleteTopic func(topicID ulid.ULID) error // contains filtered or unexported fields }
Implements both a store.EventStore and a store.MetaStore for testing purposes.
func (*Store) DeleteTopic ¶
func (*Store) ListTopics ¶
func (s *Store) ListTopics(projectID ulid.ULID) iterator.TopicIterator
func (*Store) UseFixture ¶
type TopicIterator ¶
type TopicIterator struct {
// contains filtered or unexported fields
}
func NewErrorIterator ¶
func NewErrorIterator(err error) *TopicIterator
func NewTopicIterator ¶
func NewTopicIterator(topics []*api.Topic) *TopicIterator
func (*TopicIterator) Error ¶
func (t *TopicIterator) Error() error
func (*TopicIterator) Next ¶
func (t *TopicIterator) Next() bool
func (*TopicIterator) NextPage ¶
func (t *TopicIterator) NextPage(in *api.PageInfo) (out *api.TopicsPage, err error)
func (*TopicIterator) Prev ¶
func (t *TopicIterator) Prev() bool
func (*TopicIterator) Release ¶
func (t *TopicIterator) Release()
Click to show internal directories.
Click to hide internal directories.