Documentation
¶
Index ¶
- Constants
- func NewRepository(dbExecutor db.DBTX, logger *zerolog.Logger) *repository
- func Routes(h *Handler, authMW *middle.AuthMiddleware) chi.Router
- type AcceptInvitationCmd
- type AcceptInvitationRequest
- type CreateInvitationCmd
- type Handler
- func (h *Handler) AcceptInvitation(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateInvitation(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetInvitationByToken(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetTeam(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListInvitations(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListMembers(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RevokeInvitation(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SetMemberActive(w http.ResponseWriter, r *http.Request)
- func (h *Handler) UpdateTeam(w http.ResponseWriter, r *http.Request)
- type Invitation
- type InvitationResponse
- type InviteMemberRequest
- type Member
- type MemberResponse
- type Service
- func (s *Service) AcceptInvitation(ctx context.Context, cmd AcceptInvitationCmd) error
- func (s *Service) CreateInvitation(ctx context.Context, cmd CreateInvitationCmd) (Invitation, error)
- func (s *Service) GetInvitationByToken(ctx context.Context, token string) (Invitation, error)
- func (s *Service) GetTeam(ctx context.Context) (Team, error)
- func (s *Service) InviteLink(token string) string
- func (s *Service) ListInvitations(ctx context.Context) ([]Invitation, error)
- func (s *Service) ListMembers(ctx context.Context) ([]Member, error)
- func (s *Service) RevokeInvitation(ctx context.Context, id uuid.UUID) error
- func (s *Service) SetMemberActive(ctx context.Context, targetID, callerID uuid.UUID, active bool) error
- func (s *Service) UpdateTeamName(ctx context.Context, name string) error
- type Team
- type TeamResponse
- type UpdateTeamRequest
Constants ¶
View Source
const ( RoleOwner = "owner" RoleAdmin = "admin" RoleMember = "member" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AcceptInvitationCmd ¶
type AcceptInvitationRequest ¶
type CreateInvitationCmd ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) AcceptInvitation ¶
func (h *Handler) AcceptInvitation(w http.ResponseWriter, r *http.Request)
func (*Handler) CreateInvitation ¶
func (h *Handler) CreateInvitation(w http.ResponseWriter, r *http.Request)
func (*Handler) GetInvitationByToken ¶
func (h *Handler) GetInvitationByToken(w http.ResponseWriter, r *http.Request)
func (*Handler) ListInvitations ¶
func (h *Handler) ListInvitations(w http.ResponseWriter, r *http.Request)
func (*Handler) ListMembers ¶
func (h *Handler) ListMembers(w http.ResponseWriter, r *http.Request)
func (*Handler) RevokeInvitation ¶
func (h *Handler) RevokeInvitation(w http.ResponseWriter, r *http.Request)
func (*Handler) SetMemberActive ¶
func (h *Handler) SetMemberActive(w http.ResponseWriter, r *http.Request)
func (*Handler) UpdateTeam ¶
func (h *Handler) UpdateTeam(w http.ResponseWriter, r *http.Request)
type Invitation ¶
type InvitationResponse ¶
type InviteMemberRequest ¶
type MemberResponse ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) AcceptInvitation ¶
func (s *Service) AcceptInvitation(ctx context.Context, cmd AcceptInvitationCmd) error
func (*Service) CreateInvitation ¶
func (s *Service) CreateInvitation(ctx context.Context, cmd CreateInvitationCmd) (Invitation, error)
func (*Service) GetInvitationByToken ¶
func (*Service) InviteLink ¶
func (*Service) ListInvitations ¶
func (s *Service) ListInvitations(ctx context.Context) ([]Invitation, error)
func (*Service) RevokeInvitation ¶
func (*Service) SetMemberActive ¶
type TeamResponse ¶
type TeamResponse struct {
Name string `json:"name"`
}
type UpdateTeamRequest ¶
type UpdateTeamRequest struct {
Name string `json:"name" validate:"required,min=1,max=100"`
}
Click to show internal directories.
Click to hide internal directories.