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.
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 ¶
- func ReadPayload(w http.ResponseWriter, r *http.Request) (*bytes.Buffer, error)
- type Attributes
- type GitCodeAccessor
- type GitCodeAuthentication
- func (a *GitCodeAuthentication) Auth(w http.ResponseWriter, r *http.Request) (error, bool)
- func (a *GitCodeAuthentication) GetEventGUID() string
- func (a *GitCodeAuthentication) GetEventType() string
- func (a *GitCodeAuthentication) GetPayload() *bytes.Buffer
- func (a *GitCodeAuthentication) SetSignKey(token []byte) error
- type IssueEvent
- func (iss *IssueEvent) GetAction() *string
- func (iss *IssueEvent) GetAuthor() *string
- func (iss *IssueEvent) GetBase() *string
- func (iss *IssueEvent) GetComment() *string
- func (iss *IssueEvent) GetCommenter() *string
- func (iss *IssueEvent) GetHead() *string
- func (iss *IssueEvent) GetHtmlURL() *string
- func (iss *IssueEvent) GetNumber() *string
- func (iss *IssueEvent) GetOrg() *string
- func (iss *IssueEvent) GetRepo() *string
- func (iss *IssueEvent) GetState() *string
- func (iss *IssueEvent) ListLabels() []*string
- type IssuePart
- type NoteEvent
- func (n *NoteEvent) GetAction() *string
- func (n *NoteEvent) GetAuthor() *string
- func (n *NoteEvent) GetBase() *string
- func (n *NoteEvent) GetComment() *string
- func (n *NoteEvent) GetCommenter() *string
- func (n *NoteEvent) GetHead() *string
- func (n *NoteEvent) GetHtmlURL() *string
- func (n *NoteEvent) GetNumber() *string
- func (n *NoteEvent) GetOrg() *string
- func (n *NoteEvent) GetRepo() *string
- func (n *NoteEvent) GetState() *string
- func (n *NoteEvent) ListLabels() []*string
- type PRPart
- type Project
- type PullRequestEvent
- func (pr *PullRequestEvent) GetAction() *string
- func (pr *PullRequestEvent) GetAuthor() *string
- func (pr *PullRequestEvent) GetBase() *string
- func (pr *PullRequestEvent) GetComment() *string
- func (pr *PullRequestEvent) GetCommenter() *string
- func (pr *PullRequestEvent) GetHead() *string
- func (pr *PullRequestEvent) GetHtmlURL() *string
- func (pr *PullRequestEvent) GetNumber() *string
- func (pr *PullRequestEvent) GetOrg() *string
- func (pr *PullRequestEvent) GetRepo() *string
- func (pr *PullRequestEvent) GetState() *string
- func (pr *PullRequestEvent) ListLabels() []*string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadPayload ¶
Types ¶
type Attributes ¶
type GitCodeAccessor ¶
type GitCodeAccessor struct { Issues *IssueEvent PR *PullRequestEvent Note *NoteEvent }
func (*GitCodeAccessor) GetAccessor ¶
type GitCodeAuthentication ¶
type GitCodeAuthentication struct {
// contains filtered or unexported fields
}
func (*GitCodeAuthentication) Auth ¶
func (a *GitCodeAuthentication) Auth(w http.ResponseWriter, r *http.Request) (error, bool)
func (*GitCodeAuthentication) GetEventGUID ¶
func (a *GitCodeAuthentication) GetEventGUID() string
func (*GitCodeAuthentication) GetEventType ¶
func (a *GitCodeAuthentication) GetEventType() string
func (*GitCodeAuthentication) GetPayload ¶
func (a *GitCodeAuthentication) GetPayload() *bytes.Buffer
func (*GitCodeAuthentication) SetSignKey ¶
func (a *GitCodeAuthentication) SetSignKey(token []byte) error
type IssueEvent ¶
type IssueEvent struct { UUID *string `json:"uuid,omitempty"` EventType *string `json:"event_type,omitempty"` ObjectKind *string `json:"object_kind,omitempty"` ManualBuild *bool `json:"manual_build,omitempty"` Attributes *Attributes `json:"object_attributes,omitempty"` User *openapi.User `json:"user,omitempty"` Assignees []*openapi.User `json:"assignees,omitempty"` Repository *Project `json:"project,omitempty"` Labels []*openapi.Label `json:"labels,omitempty"` Issue *IssuePart `json:"issue,omitempty"` }
func (*IssueEvent) GetAction ¶
func (iss *IssueEvent) GetAction() *string
func (*IssueEvent) GetAuthor ¶
func (iss *IssueEvent) GetAuthor() *string
func (*IssueEvent) GetBase ¶
func (iss *IssueEvent) GetBase() *string
func (*IssueEvent) GetComment ¶
func (iss *IssueEvent) GetComment() *string
func (*IssueEvent) GetCommenter ¶
func (iss *IssueEvent) GetCommenter() *string
func (*IssueEvent) GetHead ¶
func (iss *IssueEvent) GetHead() *string
func (*IssueEvent) GetHtmlURL ¶
func (iss *IssueEvent) GetHtmlURL() *string
func (*IssueEvent) GetNumber ¶
func (iss *IssueEvent) GetNumber() *string
func (*IssueEvent) GetOrg ¶
func (iss *IssueEvent) GetOrg() *string
func (*IssueEvent) GetRepo ¶
func (iss *IssueEvent) GetRepo() *string
func (*IssueEvent) GetState ¶
func (iss *IssueEvent) GetState() *string
func (*IssueEvent) ListLabels ¶
func (iss *IssueEvent) ListLabels() []*string
type NoteEvent ¶
type NoteEvent struct { UUID *string `json:"uuid,omitempty"` EventType *string `json:"event_type,omitempty"` ObjectKind *string `json:"object_kind,omitempty"` ManualBuild *bool `json:"manual_build,omitempty"` Attributes *Attributes `json:"object_attributes,omitempty"` User *openapi.User `json:"user,omitempty"` Repository *Project `json:"project,omitempty"` Labels []*openapi.Label `json:"labels,omitempty"` Issue *IssuePart `json:"issue,omitempty"` PR *PRPart `json:"merge_request,omitempty"` }
func (*NoteEvent) GetComment ¶
func (*NoteEvent) GetCommenter ¶
func (*NoteEvent) GetHtmlURL ¶
func (*NoteEvent) ListLabels ¶
type PullRequestEvent ¶
type PullRequestEvent struct { UUID *string `json:"uuid,omitempty"` EventType *string `json:"event_type,omitempty"` ObjectKind *string `json:"object_kind,omitempty"` ManualBuild *bool `json:"manual_build,omitempty"` Attributes *Attributes `json:"object_attributes,omitempty"` User *openapi.User `json:"user,omitempty"` Repository *Project `json:"project,omitempty"` Labels []*openapi.Label `json:"labels,omitempty"` PR *PRPart `json:"merge_request,omitempty"` }
func (*PullRequestEvent) GetAction ¶
func (pr *PullRequestEvent) GetAction() *string
func (*PullRequestEvent) GetAuthor ¶
func (pr *PullRequestEvent) GetAuthor() *string
func (*PullRequestEvent) GetBase ¶
func (pr *PullRequestEvent) GetBase() *string
func (*PullRequestEvent) GetComment ¶
func (pr *PullRequestEvent) GetComment() *string
func (*PullRequestEvent) GetCommenter ¶
func (pr *PullRequestEvent) GetCommenter() *string
func (*PullRequestEvent) GetHead ¶
func (pr *PullRequestEvent) GetHead() *string
func (*PullRequestEvent) GetHtmlURL ¶
func (pr *PullRequestEvent) GetHtmlURL() *string
func (*PullRequestEvent) GetNumber ¶
func (pr *PullRequestEvent) GetNumber() *string
func (*PullRequestEvent) GetOrg ¶
func (pr *PullRequestEvent) GetOrg() *string
func (*PullRequestEvent) GetRepo ¶
func (pr *PullRequestEvent) GetRepo() *string
func (*PullRequestEvent) GetState ¶
func (pr *PullRequestEvent) GetState() *string
func (*PullRequestEvent) ListLabels ¶
func (pr *PullRequestEvent) ListLabels() []*string