bark_unsupported.go raw

   1  //go:build !((darwin && (amd64 || arm64)) || (linux && (amd64 || arm64)) || (windows && amd64))
   2  
   3  package bark
   4  
   5  import (
   6  	"context"
   7  	"fmt"
   8  	"runtime"
   9  
  10  	"github.com/getAlby/hub/events"
  11  	"github.com/getAlby/hub/lnclient"
  12  )
  13  
  14  // The bark FFI bindings only ship prebuilt native libraries for a subset of
  15  // platforms (notably not 32-bit ARM Linux). On every other platform this stub
  16  // is compiled instead of bark.go so the rest of Alby Hub still builds, and the
  17  // bark backend simply reports that it is unavailable if selected at runtime.
  18  
  19  // Config mirrors the real bark.Config so callers compile on all platforms.
  20  type Config struct {
  21  	Network           string
  22  	ServerAddress     string
  23  	EsploraAddress    string
  24  	ServerAccessToken string
  25  	LogLevel          string
  26  	LogToFile         bool
  27  }
  28  
  29  func NewBarkService(ctx context.Context, eventPublisher events.EventPublisher, workDir, mnemonic string, config Config) (lnclient.LNClient, error) {
  30  	return nil, fmt.Errorf("the bark backend is not supported on %s/%s", runtime.GOOS, runtime.GOARCH)
  31  }
  32