usecase

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthUsecase

type AuthUsecase struct {
	// contains filtered or unexported fields
}

func NewAuthUsecase

func NewAuthUsecase(userRepo internal.UserRepository) *AuthUsecase

func (AuthUsecase) GenerateAuthToken

func (service AuthUsecase) GenerateAuthToken(user entity.User, tokenizer internal.Tokenizer) (string, error)

func (AuthUsecase) GetUserFromToken

func (service AuthUsecase) GetUserFromToken(token string, tokenizer internal.Tokenizer) (*entity.User, error)

func (AuthUsecase) SSO

func (service AuthUsecase) SSO(token string, authenticator internal.SSOAuthenticator) (*entity.User, error)

type DiscussionUsecase

type DiscussionUsecase struct {
	// contains filtered or unexported fields
}

func NewDiscussionUsecase

func NewDiscussionUsecase(discussionRepo internal.DiscussionRepository) *DiscussionUsecase

func (DiscussionUsecase) Create

func (DiscussionUsecase) Delete

func (du DiscussionUsecase) Delete(discussionID interface{}) error

func (DiscussionUsecase) GetAllUserDiscussions

func (du DiscussionUsecase) GetAllUserDiscussions(userID interface{}) ([]*entity.Discussion, error)

func (DiscussionUsecase) GetDiscussionByCode

func (du DiscussionUsecase) GetDiscussionByCode(code string) (*entity.Discussion, error)

func (DiscussionUsecase) GetDiscussionByID

func (du DiscussionUsecase) GetDiscussionByID(discussionID interface{}) (*entity.Discussion, error)

func (DiscussionUsecase) JoinDiscussion

func (du DiscussionUsecase) JoinDiscussion(param entity.JoinDiscussionParam) (*entity.Discussion, error)

func (DiscussionUsecase) LeaveDiscussion

func (du DiscussionUsecase) LeaveDiscussion(discussionID, userID interface{}) error

func (DiscussionUsecase) Update

func (du DiscussionUsecase) Update(discussionID interface{}, param entity.UpdateDiscussionParam) error

func (DiscussionUsecase) UpdatePassword

func (du DiscussionUsecase) UpdatePassword(discussionID interface{}, param entity.UpdateDiscussionPassword) error

func (DiscussionUsecase) UpdatePhoto

func (du DiscussionUsecase) UpdatePhoto(discussionID interface{}, param string) error

type MessageUsecase

type MessageUsecase struct {
	// contains filtered or unexported fields
}

func NewMessageUsecase

func NewMessageUsecase(messageRepo internal.MessageRepository) *MessageUsecase

func (MessageUsecase) GetMessagesByDiscussionID

func (muc MessageUsecase) GetMessagesByDiscussionID(discussionID interface{}, size, page int) ([]*entity.Message, error)

func (MessageUsecase) SendMessage

func (muc MessageUsecase) SendMessage(pubsub internal.PubSub, param entity.CreateMessage) (*entity.Message, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL