Skip to content

Commit

Permalink
Package renamed to align with domain.
Browse files Browse the repository at this point in the history
  • Loading branch information
outofcoffee committed Aug 22, 2019
1 parent ad327c0 commit cf17b20
Show file tree
Hide file tree
Showing 56 changed files with 445 additions and 414 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.4.0] - 2019-08-22
### Changed
- Package renamed to align with domain.

## [0.3.0] - 2019-08-22
### Added
- Adds support for creating and posting to public channels.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.gatehill.slackgateway.backend.slack

import com.google.inject.AbstractModule
import io.gatehill.slackgateway.asSingleton
import io.gatehill.slackgateway.service.OutboundMessageService

class SlackModule : AbstractModule() {
override fun configure() {
bind(OutboundMessageService::class.java)
.to(io.gatehill.slackgateway.backend.slack.service.SlackOutboundMessageService::class.java).asSingleton()
bind(io.gatehill.slackgateway.backend.slack.service.SlackOperationsService::class.java).asSingleton()
bind(io.gatehill.slackgateway.backend.slack.service.SlackApiService::class.java).asSingleton()
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.gatehill.slackgateway.backend.slack.config
package io.gatehill.slackgateway.backend.slack.config

import com.gatehill.slackgateway.config.EnvironmentSettings
import io.gatehill.slackgateway.config.EnvironmentSettings

/**
* Slack driver settings.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.gatehill.slackgateway.backend.slack.exception

import com.gatehill.slackgateway.backend.slack.model.SlackErrorResponse
package io.gatehill.slackgateway.backend.slack.exception

class SlackErrorResponseException : Throwable {
val errorResponse: SlackErrorResponse?
val errorResponse: io.gatehill.slackgateway.backend.slack.model.SlackErrorResponse?

constructor(jsonResponse: String, cause: Throwable? = null) : super(
message = "Received error response: $jsonResponse",
Expand All @@ -12,7 +10,11 @@ class SlackErrorResponseException : Throwable {
this.errorResponse = null
}

constructor(errorResponse: SlackErrorResponse, jsonResponse: String, cause: Throwable? = null) : super(
constructor(
errorResponse: io.gatehill.slackgateway.backend.slack.model.SlackErrorResponse,
jsonResponse: String,
cause: Throwable? = null
) : super(
message = "Received error response [error=${errorResponse.error}]: $jsonResponse",
cause = cause
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package io.gatehill.slackgateway.backend.slack.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties

@JsonIgnoreProperties(ignoreUnknown = true)
data class ChannelsCreateResponse(
override val ok: Boolean,
override val channel: io.gatehill.slackgateway.backend.slack.model.SlackPublicChannel
) : io.gatehill.slackgateway.backend.slack.model.ResponseWithStatus,
io.gatehill.slackgateway.backend.slack.model.SlackChannelsCreateResponse
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package io.gatehill.slackgateway.backend.slack.model

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty

@JsonIgnoreProperties(ignoreUnknown = true)
data class ChannelsListResponse(
override val ok: Boolean,

val channels: MutableList<io.gatehill.slackgateway.backend.slack.model.SlackPublicChannel>?,

@JsonProperty("response_metadata")
override val responseMetadata: io.gatehill.slackgateway.backend.slack.model.ResponseMetadata?

) : io.gatehill.slackgateway.backend.slack.model.ResponseWithStatus,
io.gatehill.slackgateway.backend.slack.model.PaginatedResponse<io.gatehill.slackgateway.backend.slack.model.SlackPublicChannel> {
override val innerResults
get() = channels ?: mutableListOf()
}
Loading

0 comments on commit cf17b20

Please sign in to comment.