Documentation ¶
Index ¶
- type SampleStore
- func (s *SampleStore) Channel(channelId string) (*model.Channel, error)
- func (s *SampleStore) ChannelMember(channelId, userId string) (model.ChannelMember, error)
- func (s *SampleStore) ChannelMembers(channelId string) (*model.ChannelMembers, error)
- func (s *SampleStore) ChannelPosts(channelId string) ([]*model.Post, error)
- func (s *SampleStore) ChannelPostsSorted(channelId string, asc bool) ([]*model.Post, error)
- func (s *SampleStore) ChannelView(channelId string) (int64, error)
- func (s *SampleStore) Channels(teamId string) ([]model.Channel, error)
- func (s *SampleStore) Clear()
- func (s *SampleStore) Config() model.Config
- func (s *SampleStore) CurrentChannel() (*model.Channel, error)
- func (s *SampleStore) CurrentTeam() (*model.Team, error)
- func (s *SampleStore) DeletePost(postId string) error
- func (s *SampleStore) DeleteReaction(reaction *model.Reaction) (bool, error)
- func (s *SampleStore) Email() string
- func (s *SampleStore) FileInfoForPost(postId string) ([]*model.FileInfo, error)
- func (s *SampleStore) GetUser(userId string) (model.User, error)
- func (s *SampleStore) Id() string
- func (s *SampleStore) Password() string
- func (s *SampleStore) Post(postId string) (*model.Post, error)
- func (s *SampleStore) PostsIdsSince(ts int64) ([]string, error)
- func (s *SampleStore) Preferences() (model.Preferences, error)
- func (s *SampleStore) ProfileImage(userId string) (bool, error)
- func (s *SampleStore) RandomChannel(teamId string, st store.SelectionType) (model.Channel, error)
- func (s *SampleStore) RandomChannelMember(channelId string) (model.ChannelMember, error)
- func (s *SampleStore) RandomEmoji() (model.Emoji, error)
- func (s *SampleStore) RandomPost() (model.Post, error)
- func (s *SampleStore) RandomPostForChannel(channelId string) (model.Post, error)
- func (s *SampleStore) RandomPostForChannelByUser(channelId, userId string) (model.Post, error)
- func (s *SampleStore) RandomTeam(st store.SelectionType) (model.Team, error)
- func (s *SampleStore) RandomTeamMember(teamId string) (model.TeamMember, error)
- func (s *SampleStore) RandomUser() (model.User, error)
- func (s *SampleStore) RandomUsers(n int) ([]model.User, error)
- func (s *SampleStore) Reactions(postId string) ([]model.Reaction, error)
- func (s *SampleStore) RemoveChannelMember(channelId string, userId string) error
- func (s *SampleStore) RemoveTeamMember(teamId, userId string) error
- func (s *SampleStore) Roles() ([]model.Role, error)
- func (s *SampleStore) SetChannel(channel *model.Channel) error
- func (s *SampleStore) SetChannelMember(channelId string, channelMember *model.ChannelMember) error
- func (s *SampleStore) SetChannelMembers(channelMembers *model.ChannelMembers) error
- func (s *SampleStore) SetChannelView(channelId string) error
- func (s *SampleStore) SetChannels(channels []*model.Channel) error
- func (s *SampleStore) SetConfig(config *model.Config)
- func (s *SampleStore) SetCurrentChannel(channel *model.Channel) error
- func (s *SampleStore) SetCurrentTeam(team *model.Team) error
- func (s *SampleStore) SetEmojis(emoji []*model.Emoji) error
- func (s *SampleStore) SetLicense(license map[string]string) error
- func (s *SampleStore) SetPost(post *model.Post) error
- func (s *SampleStore) SetPosts(posts []*model.Post) error
- func (s *SampleStore) SetPreferences(preferences *model.Preferences) error
- func (s *SampleStore) SetProfileImage(userId string) error
- func (s *SampleStore) SetReaction(reaction *model.Reaction) error
- func (s *SampleStore) SetReactions(postId string, reactions []*model.Reaction) error
- func (s *SampleStore) SetRoles(roles []*model.Role) error
- func (s *SampleStore) SetStatus(userId string, status *model.Status) error
- func (s *SampleStore) SetTeam(team *model.Team) error
- func (s *SampleStore) SetTeamMember(teamId string, teamMember *model.TeamMember) error
- func (s *SampleStore) SetTeamMembers(teamId string, teamMembers []*model.TeamMember) error
- func (s *SampleStore) SetTeams(teams []*model.Team) error
- func (s *SampleStore) SetUser(user *model.User) error
- func (s *SampleStore) SetUsers(users []*model.User) error
- func (s *SampleStore) Status(userId string) (model.Status, error)
- func (s *SampleStore) Team(teamId string) (*model.Team, error)
- func (s *SampleStore) TeamMember(teamId, userId string) (model.TeamMember, error)
- func (s *SampleStore) Teams() ([]model.Team, error)
- func (s *SampleStore) User() (*model.User, error)
- func (s *SampleStore) UserForPost(postId string) (string, error)
- func (s *SampleStore) Username() string
- func (s *SampleStore) Users() ([]*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SampleStore ¶
type SampleStore struct {
// contains filtered or unexported fields
}
func New ¶
func New() *SampleStore
func (*SampleStore) Channel ¶
func (s *SampleStore) Channel(channelId string) (*model.Channel, error)
func (*SampleStore) ChannelMember ¶
func (s *SampleStore) ChannelMember(channelId, userId string) (model.ChannelMember, error)
func (*SampleStore) ChannelMembers ¶
func (s *SampleStore) ChannelMembers(channelId string) (*model.ChannelMembers, error)
func (*SampleStore) ChannelPosts ¶
func (s *SampleStore) ChannelPosts(channelId string) ([]*model.Post, error)
func (*SampleStore) ChannelPostsSorted ¶
func (*SampleStore) ChannelView ¶
func (s *SampleStore) ChannelView(channelId string) (int64, error)
func (*SampleStore) Channels ¶
func (s *SampleStore) Channels(teamId string) ([]model.Channel, error)
Channels return all the channels for a team.
func (*SampleStore) Clear ¶
func (s *SampleStore) Clear()
func (*SampleStore) Config ¶
func (s *SampleStore) Config() model.Config
func (*SampleStore) CurrentChannel ¶
func (s *SampleStore) CurrentChannel() (*model.Channel, error)
func (*SampleStore) CurrentTeam ¶
func (s *SampleStore) CurrentTeam() (*model.Team, error)
func (*SampleStore) DeletePost ¶
func (s *SampleStore) DeletePost(postId string) error
func (*SampleStore) DeleteReaction ¶
func (s *SampleStore) DeleteReaction(reaction *model.Reaction) (bool, error)
func (*SampleStore) Email ¶
func (s *SampleStore) Email() string
func (*SampleStore) FileInfoForPost ¶
func (s *SampleStore) FileInfoForPost(postId string) ([]*model.FileInfo, error)
func (*SampleStore) Id ¶
func (s *SampleStore) Id() string
func (*SampleStore) Password ¶
func (s *SampleStore) Password() string
func (*SampleStore) PostsIdsSince ¶
func (s *SampleStore) PostsIdsSince(ts int64) ([]string, error)
func (*SampleStore) Preferences ¶
func (s *SampleStore) Preferences() (model.Preferences, error)
func (*SampleStore) ProfileImage ¶
func (s *SampleStore) ProfileImage(userId string) (bool, error)
func (*SampleStore) RandomChannel ¶
func (s *SampleStore) RandomChannel(teamId string, st store.SelectionType) (model.Channel, error)
RandomChannel returns a random channel for the user.
func (*SampleStore) RandomChannelMember ¶
func (s *SampleStore) RandomChannelMember(channelId string) (model.ChannelMember, error)
RandomChannelMember returns a random channel member for a channel.
func (*SampleStore) RandomEmoji ¶
func (s *SampleStore) RandomEmoji() (model.Emoji, error)
RandomEmoji returns a random emoji.
func (*SampleStore) RandomPost ¶
func (s *SampleStore) RandomPost() (model.Post, error)
RandomPost returns a random post.
func (*SampleStore) RandomPostForChannel ¶
func (s *SampleStore) RandomPostForChannel(channelId string) (model.Post, error)
func (*SampleStore) RandomPostForChannelByUser ¶
func (s *SampleStore) RandomPostForChannelByUser(channelId, userId string) (model.Post, error)
func (*SampleStore) RandomTeam ¶
func (s *SampleStore) RandomTeam(st store.SelectionType) (model.Team, error)
RandomTeam returns a random team for the user.
func (*SampleStore) RandomTeamMember ¶
func (s *SampleStore) RandomTeamMember(teamId string) (model.TeamMember, error)
RandomTeamMember returns a random team member for a team.
func (*SampleStore) RandomUser ¶
func (s *SampleStore) RandomUser() (model.User, error)
RandomUser returns a random user from the set of users.
func (*SampleStore) RandomUsers ¶
func (s *SampleStore) RandomUsers(n int) ([]model.User, error)
RandomUser returns a random user from the set of users.
func (*SampleStore) Reactions ¶
func (s *SampleStore) Reactions(postId string) ([]model.Reaction, error)
func (*SampleStore) RemoveChannelMember ¶
func (s *SampleStore) RemoveChannelMember(channelId string, userId string) error
func (*SampleStore) RemoveTeamMember ¶
func (s *SampleStore) RemoveTeamMember(teamId, userId string) error
func (*SampleStore) Roles ¶
func (s *SampleStore) Roles() ([]model.Role, error)
Roles return the roles of the user.
func (*SampleStore) SetChannel ¶
func (s *SampleStore) SetChannel(channel *model.Channel) error
func (*SampleStore) SetChannelMember ¶
func (s *SampleStore) SetChannelMember(channelId string, channelMember *model.ChannelMember) error
func (*SampleStore) SetChannelMembers ¶
func (s *SampleStore) SetChannelMembers(channelMembers *model.ChannelMembers) error
SetChannelMembers stores the given channel members in the store.
func (*SampleStore) SetChannelView ¶
func (s *SampleStore) SetChannelView(channelId string) error
func (*SampleStore) SetChannels ¶
func (s *SampleStore) SetChannels(channels []*model.Channel) error
func (*SampleStore) SetConfig ¶
func (s *SampleStore) SetConfig(config *model.Config)
func (*SampleStore) SetCurrentChannel ¶
func (s *SampleStore) SetCurrentChannel(channel *model.Channel) error
func (*SampleStore) SetCurrentTeam ¶
func (s *SampleStore) SetCurrentTeam(team *model.Team) error
func (*SampleStore) SetLicense ¶
func (s *SampleStore) SetLicense(license map[string]string) error
SetLicense stores the given license in the store.
func (*SampleStore) SetPreferences ¶
func (s *SampleStore) SetPreferences(preferences *model.Preferences) error
func (*SampleStore) SetProfileImage ¶
func (s *SampleStore) SetProfileImage(userId string) error
func (*SampleStore) SetReaction ¶
func (s *SampleStore) SetReaction(reaction *model.Reaction) error
func (*SampleStore) SetReactions ¶
func (s *SampleStore) SetReactions(postId string, reactions []*model.Reaction) error
func (*SampleStore) SetRoles ¶
func (s *SampleStore) SetRoles(roles []*model.Role) error
SetRoles stores the given roles.
func (*SampleStore) SetStatus ¶
func (s *SampleStore) SetStatus(userId string, status *model.Status) error
func (*SampleStore) SetTeamMember ¶
func (s *SampleStore) SetTeamMember(teamId string, teamMember *model.TeamMember) error
func (*SampleStore) SetTeamMembers ¶
func (s *SampleStore) SetTeamMembers(teamId string, teamMembers []*model.TeamMember) error
func (*SampleStore) TeamMember ¶
func (s *SampleStore) TeamMember(teamId, userId string) (model.TeamMember, error)
func (*SampleStore) UserForPost ¶
func (s *SampleStore) UserForPost(postId string) (string, error)
func (*SampleStore) Username ¶
func (s *SampleStore) Username() string