Documentation
¶
Overview ¶
Package messengers defines clients for the messaging services such as Slack. The clients reports the results of the pipeline stages and whole results.
walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * 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. walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * 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. walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * 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. walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * 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 BaseMessenger ¶ added in v1.2.0
type BaseMessenger struct {
SuppressFields []string `config:"suppress"`
}
func (*BaseMessenger) Post ¶ added in v1.2.0
func (self *BaseMessenger) Post(messege string) bool
func (*BaseMessenger) Suppress ¶ added in v1.2.0
func (self *BaseMessenger) Suppress(output_type string) bool
type FakeMessenger ¶
type FakeMessenger struct {
BaseMessenger
}
FakeMessenger is a Messenger type used only for testing.
func (*FakeMessenger) Post ¶
func (self *FakeMessenger) Post(messege string) bool
type FakeSlack ¶ added in v0.2.0
type FakeSlack Slack
To avoid the infinite recursion (see http://stackoverflow.com/questions/23045884/can-i-use-marshaljson-to-add-arbitrary-fields-to-a-json-encoding-in-golang)
type HipChat ¶
type HipChat struct {
BaseMessenger `config:"suppress"`
RoomId string `config:"room_id"`
Token string `config:"token"`
From string `config:"from"`
}
HipChat is a client which reports the pipeline results to the HipChat server. The client uses V1 of the HipChat API.
type HipChat2 ¶ added in v0.2.0
type HipChat2 struct {
BaseMessenger `config:"suppress"`
RoomID string `config:"room_id"`
Token string `config:"token"`
From string `config:"from"`
BaseURL string `config:"base_url"`
// contains filtered or unexported fields
}
HipChat2 is a client which reports the pipeline results to the HipChat server. The client uses V2 of the HipChat API.
type Messenger ¶
Messenger is a interface for notifying the result to the messeging services such as Slack or HipChat.
func InitMessenger ¶
InitMessenger generates a spefified Messenger client objet.
type Slack ¶ added in v0.2.0
type Slack struct {
BaseMessenger `config:"suppress"`
Channel string `config:"channel" json:"channel"`
UserName string `config:"username" json:"username"`
IconEmoji string `config:"icon" json:"icon_emoji,omitempty"`
IconUrl string `config:"icon_url" json:"icon_url,omitempty"`
IncomingUrl string `config:"url" json:"-"` // not map to json
}
Slack is a client which reports the pipeline results to the Slack chennel.