Documentation ¶
Index ¶
- Constants
- type StoriesStore
- func (s *StoriesStore) CountComments(ctx context.Context, filters *storiesstore.CommentFilters) (int64, error)
- func (s *StoriesStore) CountReactions(ctx context.Context, filters *storiesstore.ReactionFilters) (int64, error)
- func (s *StoriesStore) CountStories(ctx context.Context, filters *storiesstore.StoryFilters) (int64, error)
- func (s *StoriesStore) CreateComment(ctx context.Context, comment *storiesstore.Comment, ...) (*storiesstore.Comment, error)
- func (s *StoriesStore) CreateReaction(ctx context.Context, reaction *storiesstore.Reaction, ...) (*storiesstore.Reaction, error)
- func (s *StoriesStore) CreateStory(ctx context.Context, story *storiesstore.Story, ownership *authorizer.Scope) (*storiesstore.Story, error)
- func (s *StoriesStore) DeleteCommentByID(ctx context.Context, id string) error
- func (s *StoriesStore) DeleteReactionByID(ctx context.Context, id string) error
- func (s *StoriesStore) DeleteStoryByID(ctx context.Context, id string) error
- func (s *StoriesStore) GetCommentByID(ctx context.Context, id string) (*storiesstore.Comment, error)
- func (s *StoriesStore) GetComments(ctx context.Context, filters *storiesstore.CommentFilters, after *string, ...) ([]*storiesstore.Comment, bool, bool, []string, error)
- func (s *StoriesStore) GetOneComment(ctx context.Context, filters *storiesstore.CommentFilters) (*storiesstore.Comment, error)
- func (s *StoriesStore) GetOneReaction(ctx context.Context, filters *storiesstore.ReactionFilters) (*storiesstore.Reaction, error)
- func (s *StoriesStore) GetOneStory(ctx context.Context, filters *storiesstore.StoryFilters) (*storiesstore.Story, error)
- func (s *StoriesStore) GetReactionByID(ctx context.Context, id string) (*storiesstore.Reaction, error)
- func (s *StoriesStore) GetReactions(ctx context.Context, filters *storiesstore.ReactionFilters, after *string, ...) ([]*storiesstore.Reaction, bool, bool, []string, error)
- func (s *StoriesStore) GetStories(ctx context.Context, filters *storiesstore.StoryFilters, after *string, ...) ([]*storiesstore.Story, bool, bool, []string, error)
- func (s *StoriesStore) GetStoryByID(ctx context.Context, id string) (*storiesstore.Story, error)
- func (s *StoriesStore) UpdateComment(ctx context.Context, id string, commentUpdate *storiesstore.CommentUpdate) error
- func (s *StoriesStore) UpdateReaction(ctx context.Context, id string, reactionUpdate *storiesstore.ReactionUpdate) error
- func (s *StoriesStore) UpdateStory(ctx context.Context, id string, storyUpdate *storiesstore.StoryUpdate) error
Constants ¶
View Source
const ( DBStories = "stories" CollectionStories = "stories" CollectionComments = "comments" CollectionReactions = "reactions" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StoriesStore ¶
type StoriesStore struct {
// contains filtered or unexported fields
}
func NewStoriesStore ¶
func NewStoriesStore(ctx context.Context, url string) (*StoriesStore, error)
NewStoriesStore makes connection to mongo server by provided url and return an instance of the client
func (*StoriesStore) CountComments ¶
func (s *StoriesStore) CountComments(ctx context.Context, filters *storiesstore.CommentFilters) ( int64, error, )
func (*StoriesStore) CountReactions ¶
func (s *StoriesStore) CountReactions(ctx context.Context, filters *storiesstore.ReactionFilters) ( int64, error, )
func (*StoriesStore) CountStories ¶
func (s *StoriesStore) CountStories(ctx context.Context, filters *storiesstore.StoryFilters) ( int64, error, )
func (*StoriesStore) CreateComment ¶
func (s *StoriesStore) CreateComment(ctx context.Context, comment *storiesstore.Comment, ownership *authorizer.Scope) (*storiesstore.Comment, error)
func (*StoriesStore) CreateReaction ¶
func (s *StoriesStore) CreateReaction(ctx context.Context, reaction *storiesstore.Reaction, ownership *authorizer.Scope) (*storiesstore.Reaction, error)
func (*StoriesStore) CreateStory ¶
func (s *StoriesStore) CreateStory(ctx context.Context, story *storiesstore.Story, ownership *authorizer.Scope) (*storiesstore.Story, error)
func (*StoriesStore) DeleteCommentByID ¶
func (s *StoriesStore) DeleteCommentByID(ctx context.Context, id string) error
func (*StoriesStore) DeleteReactionByID ¶
func (s *StoriesStore) DeleteReactionByID(ctx context.Context, id string) error
func (*StoriesStore) DeleteStoryByID ¶
func (s *StoriesStore) DeleteStoryByID(ctx context.Context, id string) error
func (*StoriesStore) GetCommentByID ¶
func (s *StoriesStore) GetCommentByID(ctx context.Context, id string) (*storiesstore.Comment, error)
func (*StoriesStore) GetComments ¶
func (s *StoriesStore) GetComments( ctx context.Context, filters *storiesstore.CommentFilters, after *string, before *string, first *int64, last *int64, sortBy storiesstore.CommentSortBy, sortOrder *string, ) ( []*storiesstore.Comment, bool, bool, []string, error, )
func (*StoriesStore) GetOneComment ¶
func (s *StoriesStore) GetOneComment(ctx context.Context, filters *storiesstore.CommentFilters) (*storiesstore.Comment, error)
func (*StoriesStore) GetOneReaction ¶
func (s *StoriesStore) GetOneReaction(ctx context.Context, filters *storiesstore.ReactionFilters) (*storiesstore.Reaction, error)
func (*StoriesStore) GetOneStory ¶
func (s *StoriesStore) GetOneStory(ctx context.Context, filters *storiesstore.StoryFilters) (*storiesstore.Story, error)
func (*StoriesStore) GetReactionByID ¶
func (s *StoriesStore) GetReactionByID(ctx context.Context, id string) (*storiesstore.Reaction, error)
func (*StoriesStore) GetReactions ¶
func (s *StoriesStore) GetReactions( ctx context.Context, filters *storiesstore.ReactionFilters, after *string, before *string, first *int64, last *int64, sortBy storiesstore.ReactionSortBy, sortOrder *string, ) ( []*storiesstore.Reaction, bool, bool, []string, error, )
func (*StoriesStore) GetStories ¶
func (s *StoriesStore) GetStories( ctx context.Context, filters *storiesstore.StoryFilters, after *string, before *string, first *int64, last *int64, sortBy storiesstore.StorySortBy, sortOrder *string, ) ( []*storiesstore.Story, bool, bool, []string, error, )
func (*StoriesStore) GetStoryByID ¶
func (s *StoriesStore) GetStoryByID(ctx context.Context, id string) (*storiesstore.Story, error)
func (*StoriesStore) UpdateComment ¶
func (s *StoriesStore) UpdateComment(ctx context.Context, id string, commentUpdate *storiesstore.CommentUpdate) error
func (*StoriesStore) UpdateReaction ¶
func (s *StoriesStore) UpdateReaction(ctx context.Context, id string, reactionUpdate *storiesstore.ReactionUpdate) error
func (*StoriesStore) UpdateStory ¶
func (s *StoriesStore) UpdateStory(ctx context.Context, id string, storyUpdate *storiesstore.StoryUpdate) error
Click to show internal directories.
Click to hide internal directories.