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

Fix docs in readme.md and workflow #25

Merged
merged 1 commit into from
Nov 6, 2022
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: 2 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ on:
push:
branches:
- main
- v1
pull_request:
branches:
- main
- v1
name: Test
env:
GO_TARGET_VERSION: 1.19
Expand Down Expand Up @@ -88,11 +86,11 @@ jobs:
maxColorRange: 100
minColorRange: 0
- uses: jandelgado/gcov2lcov-action@v1.0.9
if: ${{ fromJSON(env.NEED_CODECOVERAGE) }}
if: ${{ fromJSON(env.NEED_CODECOVERAGE) && github.event.pull_request.merged == false }}
with:
outfile: ./coverage.lcov
- uses: romeovs/lcov-reporter-action@v0.2.21
if: ${{ fromJSON(env.NEED_CODECOVERAGE) }}
if: ${{ fromJSON(env.NEED_CODECOVERAGE) && github.event.pull_request.merged == false }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: ./coverage.lcov
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

Transaction manager is an abstraction to coordinate database transaction boundaries.

Easiest way to get the perfect repository.

## Supported implementations

* [database/sql](https://pkg.go.dev/database/sql), [![go.dev sql docs](https://img.shields.io/badge/docs-sql-blue)](https://pkg.go.dev/https://github.com/avito-tech/go-transaction-manager/sql) (Go 1.13)
* [jmoiron/sqlx](https://github.com/jmoiron/sqlx), [![go.dev sqlx docs](https://img.shields.io/badge/docs-sqlx-blue)](https://pkg.go.dev/https://github.com/avito-tech/go-transaction-manager/sqlx) (Go 1.13)
* [mongo-go-driver](https://github.com/mongodb/mongo-go-driver), [![go.dev mong docs](https://img.shields.io/badge/docs-mongo-blue)](https://pkg.go.dev/https://github.com/avito-tech/go-transaction-manager/mongo) (Go 1.13)
* [database/sql](https://pkg.go.dev/database/sql), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/sql) (Go 1.13)
* [jmoiron/sqlx](https://github.com/jmoiron/sqlx), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/sqlx) (Go 1.13)
* [mongo-go-driver](https://github.com/mongodb/mongo-go-driver), [docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/mongo) (Go 1.13)

## Installation

Expand All @@ -31,13 +33,13 @@ Compatibility beyond that is not guaranteed.

**For nested transactions with different transaction managers**, you need to use [ChainedMW](trm/manager/chain.go) ([docs](https://pkg.go.dev/github.com/github.com/avito-tech/go-transaction-manager)).

### Examples
### Examples with an ideal *repository* and nested transactions.

* [database/sql](sql/example_test.go)
* [jmoiron/sqlx](sqlx/example_test.go)
* [mongo-go-driver](mongo/example_test.go)

Below is an example how to start usage to get ideal repository pattern.
Below is an example how to start usage.

```go
package main
Expand Down