gitee.com/larksuite/oapi-sdk-go/v3@v3.0.3/service/contact/v3/event.go (about) 1 // Package contact code generated by oapi sdk gen 2 /* 3 * MIT License 4 * 5 * Copyright (c) 2022 Lark Technologies Pte. Ltd. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 * 9 * The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 */ 13 14 package larkcontact 15 16 import ( 17 "context" 18 ) 19 20 // 消息处理器定义 21 type P2CustomAttrEventUpdatedV3Handler struct { 22 handler func(context.Context, *P2CustomAttrEventUpdatedV3) error 23 } 24 25 func NewP2CustomAttrEventUpdatedV3Handler(handler func(context.Context, *P2CustomAttrEventUpdatedV3) error) *P2CustomAttrEventUpdatedV3Handler { 26 h := &P2CustomAttrEventUpdatedV3Handler{handler: handler} 27 return h 28 } 29 30 // 返回事件的消息体的实例,用于反序列化用 31 func (h *P2CustomAttrEventUpdatedV3Handler) Event() interface{} { 32 return &P2CustomAttrEventUpdatedV3{} 33 } 34 35 // 回调开发者注册的handle 36 func (h *P2CustomAttrEventUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error { 37 return h.handler(ctx, event.(*P2CustomAttrEventUpdatedV3)) 38 } 39 40 // 消息处理器定义 41 type P2DepartmentCreatedV3Handler struct { 42 handler func(context.Context, *P2DepartmentCreatedV3) error 43 } 44 45 func NewP2DepartmentCreatedV3Handler(handler func(context.Context, *P2DepartmentCreatedV3) error) *P2DepartmentCreatedV3Handler { 46 h := &P2DepartmentCreatedV3Handler{handler: handler} 47 return h 48 } 49 50 // 返回事件的消息体的实例,用于反序列化用 51 func (h *P2DepartmentCreatedV3Handler) Event() interface{} { 52 return &P2DepartmentCreatedV3{} 53 } 54 55 // 回调开发者注册的handle 56 func (h *P2DepartmentCreatedV3Handler) Handle(ctx context.Context, event interface{}) error { 57 return h.handler(ctx, event.(*P2DepartmentCreatedV3)) 58 } 59 60 // 消息处理器定义 61 type P2DepartmentDeletedV3Handler struct { 62 handler func(context.Context, *P2DepartmentDeletedV3) error 63 } 64 65 func NewP2DepartmentDeletedV3Handler(handler func(context.Context, *P2DepartmentDeletedV3) error) *P2DepartmentDeletedV3Handler { 66 h := &P2DepartmentDeletedV3Handler{handler: handler} 67 return h 68 } 69 70 // 返回事件的消息体的实例,用于反序列化用 71 func (h *P2DepartmentDeletedV3Handler) Event() interface{} { 72 return &P2DepartmentDeletedV3{} 73 } 74 75 // 回调开发者注册的handle 76 func (h *P2DepartmentDeletedV3Handler) Handle(ctx context.Context, event interface{}) error { 77 return h.handler(ctx, event.(*P2DepartmentDeletedV3)) 78 } 79 80 // 消息处理器定义 81 type P2DepartmentUpdatedV3Handler struct { 82 handler func(context.Context, *P2DepartmentUpdatedV3) error 83 } 84 85 func NewP2DepartmentUpdatedV3Handler(handler func(context.Context, *P2DepartmentUpdatedV3) error) *P2DepartmentUpdatedV3Handler { 86 h := &P2DepartmentUpdatedV3Handler{handler: handler} 87 return h 88 } 89 90 // 返回事件的消息体的实例,用于反序列化用 91 func (h *P2DepartmentUpdatedV3Handler) Event() interface{} { 92 return &P2DepartmentUpdatedV3{} 93 } 94 95 // 回调开发者注册的handle 96 func (h *P2DepartmentUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error { 97 return h.handler(ctx, event.(*P2DepartmentUpdatedV3)) 98 } 99 100 // 消息处理器定义 101 type P2EmployeeTypeEnumActivedV3Handler struct { 102 handler func(context.Context, *P2EmployeeTypeEnumActivedV3) error 103 } 104 105 func NewP2EmployeeTypeEnumActivedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumActivedV3) error) *P2EmployeeTypeEnumActivedV3Handler { 106 h := &P2EmployeeTypeEnumActivedV3Handler{handler: handler} 107 return h 108 } 109 110 // 返回事件的消息体的实例,用于反序列化用 111 func (h *P2EmployeeTypeEnumActivedV3Handler) Event() interface{} { 112 return &P2EmployeeTypeEnumActivedV3{} 113 } 114 115 // 回调开发者注册的handle 116 func (h *P2EmployeeTypeEnumActivedV3Handler) Handle(ctx context.Context, event interface{}) error { 117 return h.handler(ctx, event.(*P2EmployeeTypeEnumActivedV3)) 118 } 119 120 // 消息处理器定义 121 type P2EmployeeTypeEnumCreatedV3Handler struct { 122 handler func(context.Context, *P2EmployeeTypeEnumCreatedV3) error 123 } 124 125 func NewP2EmployeeTypeEnumCreatedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumCreatedV3) error) *P2EmployeeTypeEnumCreatedV3Handler { 126 h := &P2EmployeeTypeEnumCreatedV3Handler{handler: handler} 127 return h 128 } 129 130 // 返回事件的消息体的实例,用于反序列化用 131 func (h *P2EmployeeTypeEnumCreatedV3Handler) Event() interface{} { 132 return &P2EmployeeTypeEnumCreatedV3{} 133 } 134 135 // 回调开发者注册的handle 136 func (h *P2EmployeeTypeEnumCreatedV3Handler) Handle(ctx context.Context, event interface{}) error { 137 return h.handler(ctx, event.(*P2EmployeeTypeEnumCreatedV3)) 138 } 139 140 // 消息处理器定义 141 type P2EmployeeTypeEnumDeactivatedV3Handler struct { 142 handler func(context.Context, *P2EmployeeTypeEnumDeactivatedV3) error 143 } 144 145 func NewP2EmployeeTypeEnumDeactivatedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumDeactivatedV3) error) *P2EmployeeTypeEnumDeactivatedV3Handler { 146 h := &P2EmployeeTypeEnumDeactivatedV3Handler{handler: handler} 147 return h 148 } 149 150 // 返回事件的消息体的实例,用于反序列化用 151 func (h *P2EmployeeTypeEnumDeactivatedV3Handler) Event() interface{} { 152 return &P2EmployeeTypeEnumDeactivatedV3{} 153 } 154 155 // 回调开发者注册的handle 156 func (h *P2EmployeeTypeEnumDeactivatedV3Handler) Handle(ctx context.Context, event interface{}) error { 157 return h.handler(ctx, event.(*P2EmployeeTypeEnumDeactivatedV3)) 158 } 159 160 // 消息处理器定义 161 type P2EmployeeTypeEnumDeletedV3Handler struct { 162 handler func(context.Context, *P2EmployeeTypeEnumDeletedV3) error 163 } 164 165 func NewP2EmployeeTypeEnumDeletedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumDeletedV3) error) *P2EmployeeTypeEnumDeletedV3Handler { 166 h := &P2EmployeeTypeEnumDeletedV3Handler{handler: handler} 167 return h 168 } 169 170 // 返回事件的消息体的实例,用于反序列化用 171 func (h *P2EmployeeTypeEnumDeletedV3Handler) Event() interface{} { 172 return &P2EmployeeTypeEnumDeletedV3{} 173 } 174 175 // 回调开发者注册的handle 176 func (h *P2EmployeeTypeEnumDeletedV3Handler) Handle(ctx context.Context, event interface{}) error { 177 return h.handler(ctx, event.(*P2EmployeeTypeEnumDeletedV3)) 178 } 179 180 // 消息处理器定义 181 type P2EmployeeTypeEnumUpdatedV3Handler struct { 182 handler func(context.Context, *P2EmployeeTypeEnumUpdatedV3) error 183 } 184 185 func NewP2EmployeeTypeEnumUpdatedV3Handler(handler func(context.Context, *P2EmployeeTypeEnumUpdatedV3) error) *P2EmployeeTypeEnumUpdatedV3Handler { 186 h := &P2EmployeeTypeEnumUpdatedV3Handler{handler: handler} 187 return h 188 } 189 190 // 返回事件的消息体的实例,用于反序列化用 191 func (h *P2EmployeeTypeEnumUpdatedV3Handler) Event() interface{} { 192 return &P2EmployeeTypeEnumUpdatedV3{} 193 } 194 195 // 回调开发者注册的handle 196 func (h *P2EmployeeTypeEnumUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error { 197 return h.handler(ctx, event.(*P2EmployeeTypeEnumUpdatedV3)) 198 } 199 200 // 消息处理器定义 201 type P2ScopeUpdatedV3Handler struct { 202 handler func(context.Context, *P2ScopeUpdatedV3) error 203 } 204 205 func NewP2ScopeUpdatedV3Handler(handler func(context.Context, *P2ScopeUpdatedV3) error) *P2ScopeUpdatedV3Handler { 206 h := &P2ScopeUpdatedV3Handler{handler: handler} 207 return h 208 } 209 210 // 返回事件的消息体的实例,用于反序列化用 211 func (h *P2ScopeUpdatedV3Handler) Event() interface{} { 212 return &P2ScopeUpdatedV3{} 213 } 214 215 // 回调开发者注册的handle 216 func (h *P2ScopeUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error { 217 return h.handler(ctx, event.(*P2ScopeUpdatedV3)) 218 } 219 220 // 消息处理器定义 221 type P2UserCreatedV3Handler struct { 222 handler func(context.Context, *P2UserCreatedV3) error 223 } 224 225 func NewP2UserCreatedV3Handler(handler func(context.Context, *P2UserCreatedV3) error) *P2UserCreatedV3Handler { 226 h := &P2UserCreatedV3Handler{handler: handler} 227 return h 228 } 229 230 // 返回事件的消息体的实例,用于反序列化用 231 func (h *P2UserCreatedV3Handler) Event() interface{} { 232 return &P2UserCreatedV3{} 233 } 234 235 // 回调开发者注册的handle 236 func (h *P2UserCreatedV3Handler) Handle(ctx context.Context, event interface{}) error { 237 return h.handler(ctx, event.(*P2UserCreatedV3)) 238 } 239 240 // 消息处理器定义 241 type P2UserDeletedV3Handler struct { 242 handler func(context.Context, *P2UserDeletedV3) error 243 } 244 245 func NewP2UserDeletedV3Handler(handler func(context.Context, *P2UserDeletedV3) error) *P2UserDeletedV3Handler { 246 h := &P2UserDeletedV3Handler{handler: handler} 247 return h 248 } 249 250 // 返回事件的消息体的实例,用于反序列化用 251 func (h *P2UserDeletedV3Handler) Event() interface{} { 252 return &P2UserDeletedV3{} 253 } 254 255 // 回调开发者注册的handle 256 func (h *P2UserDeletedV3Handler) Handle(ctx context.Context, event interface{}) error { 257 return h.handler(ctx, event.(*P2UserDeletedV3)) 258 } 259 260 // 消息处理器定义 261 type P2UserUpdatedV3Handler struct { 262 handler func(context.Context, *P2UserUpdatedV3) error 263 } 264 265 func NewP2UserUpdatedV3Handler(handler func(context.Context, *P2UserUpdatedV3) error) *P2UserUpdatedV3Handler { 266 h := &P2UserUpdatedV3Handler{handler: handler} 267 return h 268 } 269 270 // 返回事件的消息体的实例,用于反序列化用 271 func (h *P2UserUpdatedV3Handler) Event() interface{} { 272 return &P2UserUpdatedV3{} 273 } 274 275 // 回调开发者注册的handle 276 func (h *P2UserUpdatedV3Handler) Handle(ctx context.Context, event interface{}) error { 277 return h.handler(ctx, event.(*P2UserUpdatedV3)) 278 }