Documentation
¶
Overview ¶
Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticate ¶
type Authentication ¶
type Authentication struct {
Secret []byte
}
func (*Authentication) DoAuthentication ¶
func (a *Authentication) DoAuthentication(w http.ResponseWriter, r *http.Request) (error, *bytes.Buffer, string, string)
type Client ¶
type EventHeader ¶
type EventPayload ¶
type EventPayload struct {
Action *string
Org *string `log:"org"`
Repo *string `log:"repo"`
HtmlURL *string
Base *string
Head *string
State *string
Number *string `log:"number"` // issues or pull requests number
Author *string
CommentID *string
CommentCategory *bool `log:"category"`
Comment *string
Commenter *string
Labels []*string
}
type GenericEvent ¶
type GenericEvent struct {
EventHeader
EventPayload
MetaPayload *bytes.Buffer
}
func NewGenericEvent ¶
func NewGenericEvent(w http.ResponseWriter, r *http.Request) *GenericEvent
func (*GenericEvent) CollectLoggingFields ¶
func (e *GenericEvent) CollectLoggingFields() *map[string]interface{}
func (*GenericEvent) ConvertFromBytes ¶
func (e *GenericEvent) ConvertFromBytes(buf *bytes.Buffer) error
func (*GenericEvent) ConvertToBytes ¶
func (e *GenericEvent) ConvertToBytes() ([]byte, error)