Documentation ¶
Index ¶
Constants ¶
const Version = "v1.2.1"
Version represents gate's semantic version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The HTTP client to use when sending requests. HTTPClient *http.Client AccessToken string }
Config provides service configuration for service.
func (*Config) WithAccessToken ¶
WithAccessToken sets a access token value to verify service returning a Config pointer for chaining.
type LINENotifyService ¶
type LINENotifyService struct {
// contains filtered or unexported fields
}
LINENotifyService is a slack incoming webhook service.
func NewLINENotifyService ¶
func NewLINENotifyService(config *Config) *LINENotifyService
NewLINENotifyService returns a new LINENotifyService.
func (LINENotifyService) PostMessagePayload ¶ added in v1.2.0
func (s LINENotifyService) PostMessagePayload(payload MessagePayload) (*http.Response, error)
PostMessagePayload posts a message payload to LINE.
type MessagePayload ¶ added in v1.2.0
type MessagePayload struct {
Message string `json:"message"`
}
MessagePayload represents a message payload.
type SlackIncomingService ¶
type SlackIncomingService struct {
// contains filtered or unexported fields
}
SlackIncomingService is a slack incoming webhook service.
func NewSlackIncomingService ¶
func NewSlackIncomingService(config *Config) *SlackIncomingService
NewSlackIncomingService returns a new SlackIncomingService.
func (SlackIncomingService) PostTextPayload ¶ added in v1.2.0
func (s SlackIncomingService) PostTextPayload(payload TextPayload) (*http.Response, error)
PostTextPayload posts a text payload to slack.
func (*SlackIncomingService) WithBaseURL ¶
func (s *SlackIncomingService) WithBaseURL(baseURL string) *SlackIncomingService
WithBaseURL sets a base url value returning a service pointer for chaining.
type TextPayload ¶ added in v1.2.0
type TextPayload struct {
Text string `json:"text"`
}
TextPayload represents a text payload.