Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description for types package #165

Merged
merged 3 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
)