gitee.com/larksuite/oapi-sdk-go/v3@v3.0.3/service/application/v6/event.go (about) 1 // Package application 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 larkapplication 15 16 import ( 17 "context" 18 ) 19 20 // 消息处理器定义 21 type P2ApplicationCreatedV6Handler struct { 22 handler func(context.Context, *P2ApplicationCreatedV6) error 23 } 24 25 func NewP2ApplicationCreatedV6Handler(handler func(context.Context, *P2ApplicationCreatedV6) error) *P2ApplicationCreatedV6Handler { 26 h := &P2ApplicationCreatedV6Handler{handler: handler} 27 return h 28 } 29 30 // 返回事件的消息体的实例,用于反序列化用 31 func (h *P2ApplicationCreatedV6Handler) Event() interface{} { 32 return &P2ApplicationCreatedV6{} 33 } 34 35 // 回调开发者注册的handle 36 func (h *P2ApplicationCreatedV6Handler) Handle(ctx context.Context, event interface{}) error { 37 return h.handler(ctx, event.(*P2ApplicationCreatedV6)) 38 } 39 40 // 消息处理器定义 41 type P2ApplicationAppVersionAuditV6Handler struct { 42 handler func(context.Context, *P2ApplicationAppVersionAuditV6) error 43 } 44 45 func NewP2ApplicationAppVersionAuditV6Handler(handler func(context.Context, *P2ApplicationAppVersionAuditV6) error) *P2ApplicationAppVersionAuditV6Handler { 46 h := &P2ApplicationAppVersionAuditV6Handler{handler: handler} 47 return h 48 } 49 50 // 返回事件的消息体的实例,用于反序列化用 51 func (h *P2ApplicationAppVersionAuditV6Handler) Event() interface{} { 52 return &P2ApplicationAppVersionAuditV6{} 53 } 54 55 // 回调开发者注册的handle 56 func (h *P2ApplicationAppVersionAuditV6Handler) Handle(ctx context.Context, event interface{}) error { 57 return h.handler(ctx, event.(*P2ApplicationAppVersionAuditV6)) 58 } 59 60 // 消息处理器定义 61 type P2ApplicationAppVersionPublishApplyV6Handler struct { 62 handler func(context.Context, *P2ApplicationAppVersionPublishApplyV6) error 63 } 64 65 func NewP2ApplicationAppVersionPublishApplyV6Handler(handler func(context.Context, *P2ApplicationAppVersionPublishApplyV6) error) *P2ApplicationAppVersionPublishApplyV6Handler { 66 h := &P2ApplicationAppVersionPublishApplyV6Handler{handler: handler} 67 return h 68 } 69 70 // 返回事件的消息体的实例,用于反序列化用 71 func (h *P2ApplicationAppVersionPublishApplyV6Handler) Event() interface{} { 72 return &P2ApplicationAppVersionPublishApplyV6{} 73 } 74 75 // 回调开发者注册的handle 76 func (h *P2ApplicationAppVersionPublishApplyV6Handler) Handle(ctx context.Context, event interface{}) error { 77 return h.handler(ctx, event.(*P2ApplicationAppVersionPublishApplyV6)) 78 } 79 80 // 消息处理器定义 81 type P2ApplicationAppVersionPublishRevokeV6Handler struct { 82 handler func(context.Context, *P2ApplicationAppVersionPublishRevokeV6) error 83 } 84 85 func NewP2ApplicationAppVersionPublishRevokeV6Handler(handler func(context.Context, *P2ApplicationAppVersionPublishRevokeV6) error) *P2ApplicationAppVersionPublishRevokeV6Handler { 86 h := &P2ApplicationAppVersionPublishRevokeV6Handler{handler: handler} 87 return h 88 } 89 90 // 返回事件的消息体的实例,用于反序列化用 91 func (h *P2ApplicationAppVersionPublishRevokeV6Handler) Event() interface{} { 92 return &P2ApplicationAppVersionPublishRevokeV6{} 93 } 94 95 // 回调开发者注册的handle 96 func (h *P2ApplicationAppVersionPublishRevokeV6Handler) Handle(ctx context.Context, event interface{}) error { 97 return h.handler(ctx, event.(*P2ApplicationAppVersionPublishRevokeV6)) 98 } 99 100 // 消息处理器定义 101 type P2ApplicationFeedbackCreatedV6Handler struct { 102 handler func(context.Context, *P2ApplicationFeedbackCreatedV6) error 103 } 104 105 func NewP2ApplicationFeedbackCreatedV6Handler(handler func(context.Context, *P2ApplicationFeedbackCreatedV6) error) *P2ApplicationFeedbackCreatedV6Handler { 106 h := &P2ApplicationFeedbackCreatedV6Handler{handler: handler} 107 return h 108 } 109 110 // 返回事件的消息体的实例,用于反序列化用 111 func (h *P2ApplicationFeedbackCreatedV6Handler) Event() interface{} { 112 return &P2ApplicationFeedbackCreatedV6{} 113 } 114 115 // 回调开发者注册的handle 116 func (h *P2ApplicationFeedbackCreatedV6Handler) Handle(ctx context.Context, event interface{}) error { 117 return h.handler(ctx, event.(*P2ApplicationFeedbackCreatedV6)) 118 } 119 120 // 消息处理器定义 121 type P2ApplicationFeedbackUpdatedV6Handler struct { 122 handler func(context.Context, *P2ApplicationFeedbackUpdatedV6) error 123 } 124 125 func NewP2ApplicationFeedbackUpdatedV6Handler(handler func(context.Context, *P2ApplicationFeedbackUpdatedV6) error) *P2ApplicationFeedbackUpdatedV6Handler { 126 h := &P2ApplicationFeedbackUpdatedV6Handler{handler: handler} 127 return h 128 } 129 130 // 返回事件的消息体的实例,用于反序列化用 131 func (h *P2ApplicationFeedbackUpdatedV6Handler) Event() interface{} { 132 return &P2ApplicationFeedbackUpdatedV6{} 133 } 134 135 // 回调开发者注册的handle 136 func (h *P2ApplicationFeedbackUpdatedV6Handler) Handle(ctx context.Context, event interface{}) error { 137 return h.handler(ctx, event.(*P2ApplicationFeedbackUpdatedV6)) 138 } 139 140 // 消息处理器定义 141 type P2ApplicationVisibilityAddedV6Handler struct { 142 handler func(context.Context, *P2ApplicationVisibilityAddedV6) error 143 } 144 145 func NewP2ApplicationVisibilityAddedV6Handler(handler func(context.Context, *P2ApplicationVisibilityAddedV6) error) *P2ApplicationVisibilityAddedV6Handler { 146 h := &P2ApplicationVisibilityAddedV6Handler{handler: handler} 147 return h 148 } 149 150 // 返回事件的消息体的实例,用于反序列化用 151 func (h *P2ApplicationVisibilityAddedV6Handler) Event() interface{} { 152 return &P2ApplicationVisibilityAddedV6{} 153 } 154 155 // 回调开发者注册的handle 156 func (h *P2ApplicationVisibilityAddedV6Handler) Handle(ctx context.Context, event interface{}) error { 157 return h.handler(ctx, event.(*P2ApplicationVisibilityAddedV6)) 158 }