Skip to content

Instantly share code, notes, and snippets.

View illiafox's full-sized avatar
🌐
ready for hire

illiafox

🌐
ready for hire
View GitHub Profile
@illiafox
illiafox / cloudflare-opensuse.md
Created May 14, 2023 10:21 — forked from dawetmaster/cloudflare-opensuse.md
Make Cloudflare-WARP work on RPM-based systems other than RHEL-based distro

Install notes

  • For OpenSUSE, install the RPM package from CLoudflare for CentOS using zypper. When asked, type 2.
  • For Fedora, not tested yet

How to enable after installing

Copy warp-svc.service file to /etc/systemd/system/, then enable in systemd using this command:

package storages
import (
"context"
"math/rand"
"testing"
"github.com/golang/mock/gomock"
"github.com/google/uuid"
"github.com/illiafox/saga-shop/api/apptrace"
func (s balanceStorage) ChangeBalance(ctx context.Context, userID int64, amount int64, desc string) error {
// acquire connection
c, err := s.pool.Acquire(ctx)
if err != nil {
return errors.NewInternal(err, "acquire connection")
}
defer c.Release()
// begin transaction
tx, err := c.Begin(ctx)