models

package
v3.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEvent

type BaseEvent struct {
	kernelModels.CallbackMessageHeader
	XMLName    xml.Name   `xml:"xml"`
	SuiteID    string     `xml:"SuiteId"`
	InfoType   InfoType   `xml:"InfoType"`
	Timestamp  int64      `xml:"TimeStamp"`
	ChangeType ChangeType `xml:"ChangeType,omitempty"`
}

func (BaseEvent) GetChangeType

func (ev BaseEvent) GetChangeType() ChangeType

func (BaseEvent) GetInfoType

func (ev BaseEvent) GetInfoType() string

func (BaseEvent) GetSuiteID

func (ev BaseEvent) GetSuiteID() string

func (BaseEvent) GetTimestamp

func (ev BaseEvent) GetTimestamp() int64

func (BaseEvent) ToEvent

func (msg BaseEvent) ToEvent() (IEvent, error)

type ChangeType

type ChangeType = string
const (
	ChangeTypeCreateUser  ChangeType = "create_user"
	ChangeTypeUpdateUser  ChangeType = "update_user"
	ChangeTypeDeleteUser  ChangeType = "delete_user"
	ChangeTypeCreateParty ChangeType = "create_party"
	ChangeTypeUpdateParty ChangeType = "update_party"
	ChangeTypeDeleteParty ChangeType = "delete_party"
	ChangeTypeUpdateTag   ChangeType = "update_tag"
)

type EventCancelAuth

type EventCancelAuth struct {
	BaseEvent
	AuthCorpID string `xml:"AuthCorpId"`
}

type EventChangeAuth

type EventChangeAuth struct {
	BaseEvent
	AuthCorpID string `xml:"AuthCorpId"`
	State      string `xml:"State"`
}

type EventCorpArchAuth

type EventCorpArchAuth struct {
	BaseEvent
	AuthCorpID string `xml:"AuthCorpId"`
}

type EventCreateAuth

type EventCreateAuth struct {
	BaseEvent
	AuthCode string `xml:"AuthCode"`
	State    string `xml:"State"`
}

type EventParty

type EventParty struct {
	BaseEvent
	AuthCorpID string `xml:"AuthCorpId"`
	ID         uint64 `xml:"Id"`
	Name       string `xml:"Name"`
	ParentID   uint64 `xml:"ParentId"`
	OrderID    int    `xml:"OrderId"`
}

type EventResetPermanentCode

type EventResetPermanentCode struct {
	BaseEvent
	AuthCode string `xml:"AuthCode"`
}

type EventShareChange

type EventShareChange struct {
	BaseEvent
	AppID   uint64 `xml:"AppId"`
	CropID  string `xml:"CorpId"`
	AgentID uint64 `xml:"AgentId"`
}

type EventSpecialAuth

type EventSpecialAuth struct {
	BaseEvent
	AuthCorpID string `xml:"AuthCorpId"`
	AuthType   string `xml:"AuthType"`
}

type EventSuiteTicket

type EventSuiteTicket struct {
	BaseEvent
	SuiteTicket string `xml:"SuiteTicket"`
}

type EventUpdateTag

type EventUpdateTag struct {
	BaseEvent
	AuthCorpID    string `xml:"AuthCorpId"`
	TagID         uint64 `xml:"TagId"`
	AddUserItems  string `xml:"AddUserItems"`
	DelUserItems  string `xml:"DelUserItems"`
	AddPartyItems string `xml:"AddPartyItems"`
	DelPartyItems string `xml:"DelPartyItems"`
}

type EventUser

type EventUser struct {
	BaseEvent
	AuthCorpID     string `xml:"AuthCorpId"`
	UserID         string `xml:"UserID"`
	OpenUserID     string `xml:"OpenUserID"`
	Name           string `xml:"Name"`
	Department     string `xml:"Department"`
	MainDepartment uint64 `xml:"MainDepartment"`
	IsLeaderInDept string `xml:"IsLeaderInDept"`
	DirectLeader   string `xml:"DirectLeader"`
	Mobile         string `xml:"Mobile"`
	Position       string `xml:"Position"`
	Gender         string `xml:"Gender"`
	Email          string `xml:"Email"`
	BizMail        string `xml:"BizMail"`
	Avatar         string `xml:"Avatar"`
	Alias          string `xml:"Alias"`
	Telephone      string `xml:"Telephone"`
	ExtAttr        string `xml:"ExtAttr>Item"`
}

type ExtAttr

type ExtAttr struct {
	Name string `xml:"Name"`
	Type string `xml:"Type"`
	Text string `xml:"Text>Value"`
	Web  *Web   `xml:"Web"`
}

type IEvent

type IEvent interface {
	contract.EventInterface
	GetSuiteID() string
	GetInfoType() InfoType
	GetTimestamp() int64
	GetChangeType() ChangeType
}

func DecodeEvent

func DecodeEvent(bs []byte) (IEvent, error)

type InfoType

type InfoType = string
const (
	InfoTypeSuiteTicket        InfoType = "suite_ticket"
	InfoTypeCreateAuth         InfoType = "create_auth"
	InfoTypeChangeAuth         InfoType = "change_auth"
	InfoTypeCancelAuth         InfoType = "cancel_auth"
	InfoTypeChangeContact      InfoType = "change_contact"
	InfoTypeShareAgentChange   InfoType = "share_agent_change"
	InfoTypeShareChainChange   InfoType = "share_chain_change"
	InfoTypeResetPermanentCode InfoType = "reset_permanent_code"
	InfoTypeCorpArchAuth       InfoType = "corp_arch_auth"
	InfoTypeApproveSpecialAuth InfoType = "approve_special_auth"
	InfoTypeCancelSpecialAuth  InfoType = "cancel_special_auth"
)

type Web

type Web struct {
	Title string `xml:"Title"`
	Url   string `xml:"Url"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL