Skip to content

Commit

Permalink
Merge pull request #165 from tisnik/description-for-types-package
Browse files Browse the repository at this point in the history
Description for types package
  • Loading branch information
tisnik authored Aug 4, 2020
2 parents 689b5bf + a777457 commit 6ae9fd2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ TODO

## Configuration

The configuration of the service is done by toml config, default one is `config.toml` in working directory,
but it can be overwritten by `INSIGHTS_RESULTS_SMART_PROXY_CONFIG_FILE` env var.
The configuration of the service is done by config written in
[TOML language](https://toml.io/en/). Default one is `config.toml` in working
directory, but it can be overwritten by
`INSIGHTS_RESULTS_SMART_PROXY_CONFIG_FILE` env var.

Also each key in config can be overwritten by corresponding env var. For example if you have config

Expand Down
11 changes: 11 additions & 0 deletions docs/packages/types/types.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@
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.</p>
</td>
<td class="code"><pre><code></code></pre></td>
</tr>

<tr class="section">
<td class="doc"><p>Package types contains all user-defined data types used in Smart Proxy REST
API service. Some types are the same as in other services (especially in
Insights Results Aggregator, Content Service) and thus they are imported
(based on) the common package insights-operator-utils/types.</p>
</td>
<td class="code"><pre><code><div class="keyword">package</div> <div class="ident">types</div><div class="operator"></div>

Expand Down Expand Up @@ -209,13 +218,15 @@
<td class="doc"><p>UserVoteDislike shows user's dislike</p>
</td>
<td class="code"><pre><code> <div class="ident">UserVoteDislike</div> <div class="operator">=</div> <div class="ident">types</div><div class="operator">.</div><div class="ident">UserVoteDislike</div><div class="operator"></div>

</code></pre></td>
</tr>

<tr class="section">
<td class="doc"><p>UserVoteNone shows no vote from user</p>
</td>
<td class="code"><pre><code> <div class="ident">UserVoteNone</div> <div class="operator">=</div> <div class="ident">types</div><div class="operator">.</div><div class="ident">UserVoteNone</div><div class="operator"></div>

</code></pre></td>
</tr>

Expand Down
6 changes: 6 additions & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package types contains all user-defined data types used in Smart Proxy REST
// API service. Some types are the same as in other services (especially in
// Insights Results Aggregator, Content Service) and thus they are imported
// (based on) the common package insights-operator-utils/types.
package types

import "github.com/RedHatInsights/insights-operator-utils/types"
Expand Down Expand Up @@ -55,8 +59,10 @@ type UserVote = types.UserVote
const (
// UserVoteDislike shows user's dislike
UserVoteDislike = types.UserVoteDislike

// UserVoteNone shows no vote from user
UserVoteNone = types.UserVoteNone

// UserVoteLike shows user's like
UserVoteLike = types.UserVoteLike
)

0 comments on commit 6ae9fd2

Please sign in to comment.