Versions in this module Expand all Collapse all v8 v8.0.11 May 20, 2025 Changes in this version + var Api string + var Headers map[string]string + var Timeout time.Duration + func Init(fdConf cconf.FlashDuty) + func NeedSyncTeam(ctx *ctx.Context) bool + func NeedSyncUser(ctx *ctx.Context) bool + func PostFlashDuty(path string, appKey string, body interface{}) error + func PostFlashDutyWithResp[T any](path string, appKey string, body interface{}) (T, error) + func PostJSON(url string, timeout time.Duration, headers map[string]string, v interface{}, ...) (response []byte, code int, err error) + func SyncUsersChange(ctx *ctx.Context, dbUsers []*models.User) error + func UpdateUser(ctx *ctx.Context, target models.User, email, phone string) + type Data struct + Items []Item + Limit int + P int + Total int + type Item struct + Email string + EmailVerified string + MemberID int + MemberName string + Phone string + RefID string + type Members struct + Users []User + type Team struct + Description string + Emails []string + Phones []string + RefID string + ResetIfNameExist bool + TeamID int64 + TeamName string + func (t *Team) AddTeam(appKey string) error + func (t *Team) DelTeam(appKey string) error + func (t *Team) UpdateTeam(appKey string) error + type TeamInfo struct + CreatedAt int64 + CreatorID int64 + Description string + PersonIDs []int64 + RefID string + TeamID int64 + TeamName string + UpdatedAt int64 + UpdatedBy int64 + UpdatedByName string + type Updates struct + CountryCode string + Email string + MemberName string + Phone string + RefID string + type User struct + Email string + MemberName string + Phone string + RefID string + Updates Updates + func (user *User) UpdateMember(appKey string) error + type UserGroupSyncer struct + func NewUserGroupSyncer(ctx *ctx.Context, ug *models.UserGroup) (*UserGroupSyncer, error) + func (ugs *UserGroupSyncer) CheckTeam(ref_id string) (int64, error) + func (ugs *UserGroupSyncer) SyncMembersAdd() error + func (ugs *UserGroupSyncer) SyncMembersDel() error + func (ugs *UserGroupSyncer) SyncUGAdd() error + func (ugs *UserGroupSyncer) SyncUGDel() error + func (ugs *UserGroupSyncer) SyncUGPut() error