Documentation ¶
Index ¶
- Variables
- func Email(opts EmailOptions, org Organization) error
- type Answer
- type EmailOptions
- type Feedback
- type FeedbackRequest
- type FeedbackResponse
- type Organization
- func (o Organization) FeedbackByID(id uuid.UUID) (Feedback, error)
- func (o Organization) FeedbackByRequestID(id uuid.UUID) (Feedback, FeedbackRequest, error)
- func (org *Organization) FindUserByEmail(email string) (User, error)
- func (org *Organization) FindUserByID(id string) (User, error)
- func (org *Organization) IsDifferentDomain(email string) (bool, error)
- type Organizations
- func (orgs *Organizations) Add(org Organization) error
- func (orgs *Organizations) AddEmailLoginCallback(org Organization, u User) (string, error)
- func (orgs *Organizations) AddFeedback(org Organization, f Feedback) error
- func (orgs *Organizations) AddFeedbackRequest(org Organization, f Feedback, request FeedbackRequest) error
- func (orgs *Organizations) AddFeedbackResponse(org Organization, request FeedbackRequest, response FeedbackResponse) error
- func (orgs *Organizations) AddUser(org Organization, u User) (Organization, error)
- func (orgs *Organizations) FindByDomain(email string) (Organization, error)
- func (orgs *Organizations) FindByUserEmail(email string) (Organization, error)
- func (orgs *Organizations) FindByUserID(id string) (Organization, User, error)
- func (orgs *Organizations) FindEmailLoginCallback(id string) (User, error)
- func (orgs *Organizations) FindOrCreateByEmail(email string) (Organization, User, error)
- func (orgs *Organizations) Get(domain string) (Organization, error)
- func (orgs *Organizations) SetFeedback(org Organization, f Feedback) error
- type Question
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOrganizations = &Organizations{}
View Source
var ErrCrossDomainEmail = errors.New("cannot send cross-domain emails")
View Source
var ErrOrgNotFound = errors.New("organization not found")
View Source
var ErrUserNotFound = errors.New("user not found")
Functions ¶
func Email ¶
func Email(opts EmailOptions, org Organization) error
Types ¶
type Feedback ¶
type Feedback struct { ID uuid.UUID CreatorID uuid.UUID CreatedAt time.Time Team string Role string Questions []Question Requests []FeedbackRequest Closed bool CloseReason string }
func NewFeedback ¶
type FeedbackRequest ¶
type FeedbackRequest struct { ID uuid.UUID CreatedAt time.Time CandidateName string InterviewerEmails []string Responses []FeedbackResponse ExplanationsRequired bool }
func NewFeedbackRequest ¶
func NewFeedbackRequest(candidate string, explanationsRequired bool, emails ...string) (FeedbackRequest, error)
type FeedbackResponse ¶
type FeedbackResponse struct { ID uuid.UUID CreatorID uuid.UUID CreatedAt time.Time Answers []Answer Recommend bool }
func NewFeedbackResponse ¶
type Organization ¶
Test
func NewOrganization ¶
func NewOrganization(domain string) (Organization, error)
func (Organization) FeedbackByID ¶
func (o Organization) FeedbackByID(id uuid.UUID) (Feedback, error)
func (Organization) FeedbackByRequestID ¶
func (o Organization) FeedbackByRequestID(id uuid.UUID) (Feedback, FeedbackRequest, error)
func (*Organization) FindUserByEmail ¶
func (org *Organization) FindUserByEmail(email string) (User, error)
func (*Organization) FindUserByID ¶
func (org *Organization) FindUserByID(id string) (User, error)
func (*Organization) IsDifferentDomain ¶
func (org *Organization) IsDifferentDomain(email string) (bool, error)
type Organizations ¶
type Organizations struct { ByDomain map[string]Organization Mutex sync.Mutex `json:"-"` }
func (*Organizations) Add ¶
func (orgs *Organizations) Add(org Organization) error
func (*Organizations) AddEmailLoginCallback ¶
func (orgs *Organizations) AddEmailLoginCallback(org Organization, u User) (string, error)
func (*Organizations) AddFeedback ¶
func (orgs *Organizations) AddFeedback(org Organization, f Feedback) error
func (*Organizations) AddFeedbackRequest ¶
func (orgs *Organizations) AddFeedbackRequest(org Organization, f Feedback, request FeedbackRequest) error
func (*Organizations) AddFeedbackResponse ¶
func (orgs *Organizations) AddFeedbackResponse(org Organization, request FeedbackRequest, response FeedbackResponse) error
func (*Organizations) AddUser ¶
func (orgs *Organizations) AddUser(org Organization, u User) (Organization, error)
func (*Organizations) FindByDomain ¶
func (orgs *Organizations) FindByDomain(email string) (Organization, error)
func (*Organizations) FindByUserEmail ¶
func (orgs *Organizations) FindByUserEmail(email string) (Organization, error)
func (*Organizations) FindByUserID ¶
func (orgs *Organizations) FindByUserID(id string) (Organization, User, error)
func (*Organizations) FindEmailLoginCallback ¶
func (orgs *Organizations) FindEmailLoginCallback(id string) (User, error)
func (*Organizations) FindOrCreateByEmail ¶
func (orgs *Organizations) FindOrCreateByEmail(email string) (Organization, User, error)
func (*Organizations) Get ¶
func (orgs *Organizations) Get(domain string) (Organization, error)
func (*Organizations) SetFeedback ¶
func (orgs *Organizations) SetFeedback(org Organization, f Feedback) error
type Question ¶
func NewQuestion ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.