Documentation ¶
Index ¶
- type Encoder
- type TeamService
- func (s *TeamService) Create(callerID int, team auth.Team) (auth.Team, error)
- func (s *TeamService) Delete(callerID, teamID int) error
- func (s *TeamService) Get(callerID int, teamID int) (auth.Team, error)
- func (s *TeamService) GetForUser(callerID int) ([]auth.Team, error)
- func (s *TeamService) Invite(callerID, teamID int, memberEmail string) (auth.Team, error)
- func (s *TeamService) Kick(callerID, teamID, memberID int) (auth.Team, error)
- func (s *TeamService) Share(callerID, teamID, paperID int, canEdit bool) (auth.Team, error)
- type UserService
- func (s *UserService) All() ([]auth.User, error)
- func (s *UserService) Bookmark(callerID, paperID int, bookmark bool) (auth.User, error)
- func (s *UserService) CreatePaper(userID, paperID int) (auth.User, error)
- func (s *UserService) Delete(userID int) error
- func (s *UserService) Get(id int) (auth.User, error)
- func (s *UserService) Login(email, password string) (string, error)
- func (s *UserService) SignUp(email, password string) (string, error)
- func (s *UserService) Token(userID int) (string, error)
- func (s *UserService) Upsert(u auth.User) (auth.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TeamService ¶
type TeamService struct {
// contains filtered or unexported fields
}
func NewTeamService ¶
func NewTeamService(repo auth.TeamRepository, userRepo auth.UserRepository) *TeamService
func (*TeamService) Delete ¶
func (s *TeamService) Delete(callerID, teamID int) error
func (*TeamService) GetForUser ¶
func (s *TeamService) GetForUser(callerID int) ([]auth.Team, error)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(repo auth.UserRepository, encoder Encoder) *UserService
func (*UserService) CreatePaper ¶
func (s *UserService) CreatePaper(userID, paperID int) (auth.User, error)
func (*UserService) Delete ¶
func (s *UserService) Delete(userID int) error
Click to show internal directories.
Click to hide internal directories.