Documentation
¶
Index ¶
- Variables
- 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
- type Item
- type Members
- type Team
- type TeamInfo
- type Updates
- type User
- type UserGroupSyncer
- 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
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NeedSyncTeam ¶
func NeedSyncUser ¶
func PostFlashDuty ¶
func PostFlashDutyWithResp ¶
Types ¶
type Team ¶
type Team struct {
TeamID int64 `json:"team_id"`
TeamName string `json:"team_name"`
ResetIfNameExist bool `json:"reset_if_name_exist"`
Description string `json:"description"`
Emails []string `json:"emails"`
Phones []string `json:"phones"`
RefID string `json:"ref_id"`
}
func (*Team) UpdateTeam ¶
type TeamInfo ¶
type TeamInfo struct {
TeamID int64 `json:"team_id"`
TeamName string `json:"team_name"`
Description string `json:"description"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
UpdatedBy int64 `json:"updated_by"`
UpdatedByName string `json:"updated_by_name"`
CreatorID int64 `json:"creator_id"`
RefID string `json:"ref_id"`
PersonIDs []int64 `json:"person_ids"`
}
type User ¶
type User struct {
Email string `json:"email,omitempty"`
Phone string `json:"phone,omitempty"`
MemberName string `json:"member_name,omitempty"`
RefID string `json:"ref_id,omitempty"`
Updates Updates `json:"updates,omitempty"`
}
func (*User) UpdateMember ¶
type UserGroupSyncer ¶
type UserGroupSyncer struct {
// contains filtered or unexported fields
}
func NewUserGroupSyncer ¶
func (*UserGroupSyncer) CheckTeam ¶
func (ugs *UserGroupSyncer) CheckTeam(ref_id string) (int64, error)
CheckTeam 检查ref_id是否存在
func (*UserGroupSyncer) SyncMembersAdd ¶
func (ugs *UserGroupSyncer) SyncMembersAdd() error
func (*UserGroupSyncer) SyncMembersDel ¶
func (ugs *UserGroupSyncer) SyncMembersDel() error
func (*UserGroupSyncer) SyncUGAdd ¶
func (ugs *UserGroupSyncer) SyncUGAdd() error
func (*UserGroupSyncer) SyncUGDel ¶
func (ugs *UserGroupSyncer) SyncUGDel() error
func (*UserGroupSyncer) SyncUGPut ¶
func (ugs *UserGroupSyncer) SyncUGPut() error
Click to show internal directories.
Click to hide internal directories.