Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { // Internal ListConversations() ([]core.Conversation, error) // conversation member only access LeaveConversation(userCtx, conversationID, newAdmin int) error ListUsersOfConversation(userCtx int, conversationID int) ([]core.UserInConversation, error) // Admin only access InviteUser(userCtx, recipient, conversationID int) error RevokeInvitation(userCtx, userID, conversationID int) error RemoveUserFromConversation(userCtx, userID, conversationID int) error DeleteConversation(userCtx, conversationID int) error SetAdminStatus(userCtx, newAdmin, conversationID int, status bool) error EditConversation(userCtx int, conversation core.Conversation) (core.Conversation, error) // Restricted access ListConversationsForUser(userCtx int) ([]core.Conversation, error) ListInvitations(userCtx int) ([]core.Invitation, error) DenieInvitation(userCtx, conversationID int) error JoinConversation(userCtx, conversationID int) (int, error) CreateConversation(userCtx int, title, repoURL string, initialMembers []int) (core.Conversation, error) }
Service defines all use cases related to conversations. All users that are passed via an argument labeled userCtx are expected to be logged in.
func NewService ¶
func NewService(conversationRepo core.ConversationRepo) Service
NewService creates and returns new Service
Click to show internal directories.
Click to hide internal directories.