Full Code of textileio/textile for AI

master 3d0748d28671 cached
247 files
6.9 MB
1.8M tokens
3439 symbols
1 requests
Download .txt
Showing preview only (7,312K chars total). Download the full file or copy to clipboard to get everything.
Repository: textileio/textile
Branch: master
Commit: 3d0748d28671
Files: 247
Total size: 6.9 MB

Directory structure:
gitextract_nehb9hlu/

├── .bingo/
│   ├── .gitignore
│   ├── README.md
│   ├── Variables.mk
│   ├── bingo.mod
│   ├── buf.mod
│   ├── go.mod
│   ├── gomplate.mod
│   ├── govvv.mod
│   ├── gox.mod
│   ├── protoc-gen-buf-breaking.mod
│   ├── protoc-gen-buf-lint.mod
│   └── variables.env
├── .github/
│   └── workflows/
│       ├── build.yml
│       ├── docker.yml
│       ├── publish-js-libs.yml
│       ├── release.yml
│       └── test.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── LICENSE
├── Makefile
├── README.md
├── api/
│   ├── apitest/
│   │   ├── apitest.go
│   │   └── docker-compose.yml
│   ├── billingd/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.dev
│   │   ├── analytics/
│   │   │   ├── analytics.go
│   │   │   └── events.go
│   │   ├── client/
│   │   │   ├── client.go
│   │   │   ├── client_test.go
│   │   │   └── options.go
│   │   ├── common/
│   │   │   └── common.go
│   │   ├── gateway/
│   │   │   └── gateway.go
│   │   ├── main.go
│   │   ├── migrations/
│   │   │   ├── migrations.go
│   │   │   └── migrations_test.go
│   │   ├── pb/
│   │   │   ├── billingd.pb.go
│   │   │   └── billingd.proto
│   │   └── service/
│   │       └── service.go
│   ├── bucketsd/
│   │   ├── client/
│   │   │   ├── client.go
│   │   │   ├── client_test.go
│   │   │   └── options.go
│   │   ├── pb/
│   │   │   ├── bucketsd.pb.go
│   │   │   ├── bucketsd.proto
│   │   │   └── javascript/
│   │   │       └── package.json
│   │   └── service.go
│   ├── common/
│   │   └── common.go
│   ├── filecoin/
│   │   └── client/
│   │       └── client.go
│   ├── hubd/
│   │   ├── client/
│   │   │   ├── client.go
│   │   │   ├── client_test.go
│   │   │   └── options.go
│   │   ├── pb/
│   │   │   ├── hubd.pb.go
│   │   │   ├── hubd.proto
│   │   │   └── javascript/
│   │   │       └── package.json
│   │   └── service.go
│   ├── mindexd/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.dev
│   │   ├── client/
│   │   │   └── client.go
│   │   ├── collector/
│   │   │   ├── collector.go
│   │   │   ├── config.go
│   │   │   └── daemon.go
│   │   ├── indexer/
│   │   │   ├── config.go
│   │   │   ├── daemon.go
│   │   │   └── indexer.go
│   │   ├── main.go
│   │   ├── migrations/
│   │   │   └── migrations.go
│   │   ├── model/
│   │   │   ├── index.go
│   │   │   └── record.go
│   │   ├── pb/
│   │   │   ├── google/
│   │   │   │   └── api/
│   │   │   │       ├── annotations.proto
│   │   │   │       ├── field_behavior.proto
│   │   │   │       ├── http.proto
│   │   │   │       └── httpbody.proto
│   │   │   ├── mindexd.pb.go
│   │   │   ├── mindexd.pb.gw.go
│   │   │   ├── mindexd.proto
│   │   │   ├── mindexd.swagger.json
│   │   │   └── protoc-gen-openapiv2/
│   │   │       └── options/
│   │   │           ├── annotations.proto
│   │   │           └── openapiv2.proto
│   │   ├── service/
│   │   │   ├── cast.go
│   │   │   └── service.go
│   │   └── store/
│   │       ├── gen.go
│   │       ├── gen_test.go
│   │       ├── index_snapshot.go
│   │       ├── index_snapshot_test.go
│   │       ├── onchain.go
│   │       ├── onchain_test.go
│   │       ├── query.go
│   │       ├── query_test.go
│   │       ├── records.go
│   │       ├── records_test.go
│   │       └── store.go
│   └── usersd/
│       ├── client/
│       │   ├── client.go
│       │   ├── client_test.go
│       │   └── options.go
│       ├── pb/
│       │   ├── javascript/
│       │   │   └── package.json
│       │   ├── usersd.pb.go
│       │   └── usersd.proto
│       └── service.go
├── buckets/
│   ├── archive/
│   │   ├── events.go
│   │   ├── retrieval/
│   │   │   └── retrieval.go
│   │   └── tracker/
│   │       └── tracker.go
│   ├── buckets.go
│   └── local/
│       ├── access.go
│       ├── add.go
│       ├── archive.go
│       ├── bucket.go
│       ├── bucket_test.go
│       ├── buckets.go
│       ├── buckets_test.go
│       ├── crypto.go
│       ├── diff.go
│       ├── list.go
│       ├── options.go
│       ├── pull.go
│       ├── push.go
│       ├── repo.go
│       ├── repo_test.go
│       ├── testdata/
│       │   ├── a/
│       │   │   ├── bar.txt
│       │   │   ├── foo.txt
│       │   │   └── one/
│       │   │       ├── baz.txt
│       │   │       ├── buz.txt
│       │   │       └── two/
│       │   │           ├── boo.txt
│       │   │           └── fuz.txt
│       │   └── b/
│       │       ├── foo.txt
│       │       └── one/
│       │           ├── baz.txt
│       │           ├── muz.txt
│       │           ├── three/
│       │           │   └── far.txt
│       │           └── two/
│       │               └── fuz.txt
│       └── watch.go
├── buf.yaml
├── buildinfo/
│   └── buildinfo.go
├── buildtools/
│   └── install_protoc.bash
├── cmd/
│   ├── buck/
│   │   ├── cli/
│   │   │   ├── add.go
│   │   │   ├── archive.go
│   │   │   ├── cli.go
│   │   │   ├── init.go
│   │   │   ├── pull.go
│   │   │   ├── push.go
│   │   │   ├── remote.go
│   │   │   ├── roles.go
│   │   │   ├── util.go
│   │   │   └── watch.go
│   │   └── main.go
│   ├── buckd/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.dev
│   │   ├── docker-compose-dev.yml
│   │   ├── docker-compose.yml
│   │   └── main.go
│   ├── cmd.go
│   ├── config.go
│   ├── hub/
│   │   ├── cli/
│   │   │   ├── archives.go
│   │   │   ├── billing.go
│   │   │   ├── buck.go
│   │   │   ├── cli.go
│   │   │   ├── destroy.go
│   │   │   ├── fil.go
│   │   │   ├── fil_index.go
│   │   │   ├── init.go
│   │   │   ├── keys.go
│   │   │   ├── login.go
│   │   │   ├── logout.go
│   │   │   ├── orgs.go
│   │   │   ├── retrievals.go
│   │   │   ├── threads.go
│   │   │   ├── update.go
│   │   │   ├── version.go
│   │   │   └── whoami.go
│   │   └── main.go
│   ├── hubd/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.dev
│   │   ├── docker-compose-dev.yml
│   │   ├── docker-compose.yml
│   │   └── main.go
│   ├── output.go
│   └── watch.go
├── core/
│   ├── auth_interceptor.go
│   ├── core.go
│   ├── options.go
│   ├── pow_interceptor.go
│   ├── stats_handler.go
│   ├── thread_interceptor.go
│   ├── thread_interceptor_test.go
│   └── usage_interceptor.go
├── dist/
│   └── install.tmpl
├── dns/
│   └── dns.go
├── email/
│   └── email.go
├── gateway/
│   ├── Makefile
│   ├── assets.go
│   ├── buckets.go
│   ├── gateway.go
│   ├── ipfs.go
│   ├── public/
│   │   ├── css/
│   │   │   └── style.css
│   │   ├── html/
│   │   │   ├── 404.gohtml
│   │   │   ├── confirm.gohtml
│   │   │   ├── consent.gohtml
│   │   │   ├── error.gohtml
│   │   │   ├── index.gohtml
│   │   │   └── unixfs.gohtml
│   │   └── img/
│   │       └── site.webmanifest
│   └── threads.go
├── go.mod
├── go.sum
├── integrationtest/
│   └── pg/
│       ├── docker-compose.yml
│       ├── pg_test.go
│       ├── pow_client_test.go
│       ├── powcli/
│       │   ├── Makefile
│       │   └── docker-compose-pow.yml
│       ├── powergate.go
│       └── testdata/
│           ├── Data1.txt
│           ├── Data2.txt
│           └── Data3.txt
├── ipns/
│   └── ipns.go
├── mail/
│   ├── local/
│   │   ├── mail.go
│   │   ├── mail_test.go
│   │   ├── mailbox.go
│   │   └── mailbox_test.go
│   └── mail.go
├── mongodb/
│   ├── accounts.go
│   ├── accounts_test.go
│   ├── apikeys.go
│   ├── apikeys_test.go
│   ├── archivetracking.go
│   ├── archivetracking_test.go
│   ├── bucketarchives.go
│   ├── bucketarchives_test.go
│   ├── collections.go
│   ├── collections_test.go
│   ├── common.go
│   ├── invites.go
│   ├── invites_test.go
│   ├── ipnskeys.go
│   ├── ipnskeys_test.go
│   ├── migrations/
│   │   ├── migrations.go
│   │   └── migrations_test.go
│   ├── sessions.go
│   ├── sessions_test.go
│   ├── threads.go
│   └── threads_test.go
├── scripts/
│   ├── gen_js_protos.bash
│   ├── protoc_gen_plugin.bash
│   └── publish_js_protos.bash
├── threaddb/
│   ├── buckets.go
│   ├── mail.go
│   └── threaddb.go
└── util/
    ├── ctxutil.go
    ├── flakyt.go
    └── util.go

================================================
FILE CONTENTS
================================================

================================================
FILE: .bingo/.gitignore
================================================

# Ignore everything
*

# But not these files:
!.gitignore
!*.mod
!README.md
!Variables.mk
!variables.env

*tmp.mod


================================================
FILE: .bingo/README.md
================================================
# Project Development Dependencies.

This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by https://github.com/bwplotka/bingo.

* Run `bingo get` to install all tools having each own module file in this directory.
* Run `bingo get <tool>` to install <tool> that have own module file in this directory.
* For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
* For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
* For go: Import `.bingo/variables.go` to for variable names.
* See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.

## Requirements

* Go 1.14+


================================================
FILE: .bingo/Variables.mk
================================================
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
GOBIN  ?= $(firstword $(subst :, ,${GOPATH}))/bin
GO     ?= $(shell which go)

# Below generated variables ensure that every time a tool under each variable is invoked, the correct version
# will be used; reinstalling only if needed.
# For example for bingo variable:
#
# In your main Makefile (for non array binaries):
#
#include .bingo/Variables.mk # Assuming -dir was set to .bingo .
#
#command: $(BINGO)
#	@echo "Running bingo"
#	@$(BINGO) <flags/args..>
#
BINGO := $(GOBIN)/bingo-v0.5.1
$(BINGO): $(BINGO_DIR)/bingo.mod
	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
	@echo "(re)installing $(GOBIN)/bingo-v0.5.1"
	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.5.1 "github.com/bwplotka/bingo"

BUF := $(GOBIN)/buf-v0.46.0
$(BUF): $(BINGO_DIR)/buf.mod
	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
	@echo "(re)installing $(GOBIN)/buf-v0.46.0"
	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=buf.mod -o=$(GOBIN)/buf-v0.46.0 "github.com/bufbuild/buf/cmd/buf"

GOMPLATE := $(GOBIN)/gomplate-v3.8.0
$(GOMPLATE): $(BINGO_DIR)/gomplate.mod
	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
	@echo "(re)installing $(GOBIN)/gomplate-v3.8.0"
	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=gomplate.mod -o=$(GOBIN)/gomplate-v3.8.0 "github.com/hairyhenderson/gomplate/v3/cmd/gomplate"

GOVVV := $(GOBIN)/govvv-v0.3.0
$(GOVVV): $(BINGO_DIR)/govvv.mod
	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
	@echo "(re)installing $(GOBIN)/govvv-v0.3.0"
	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=govvv.mod -o=$(GOBIN)/govvv-v0.3.0 "github.com/ahmetb/govvv"

GOX := $(GOBIN)/gox-v1.0.1
$(GOX): $(BINGO_DIR)/gox.mod
	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
	@echo "(re)installing $(GOBIN)/gox-v1.0.1"
	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=gox.mod -o=$(GOBIN)/gox-v1.0.1 "github.com/mitchellh/gox"

PROTOC_GEN_BUF_BREAKING := $(GOBIN)/protoc-gen-buf-breaking-v0.46.0
$(PROTOC_GEN_BUF_BREAKING): $(BINGO_DIR)/protoc-gen-buf-breaking.mod
	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
	@echo "(re)installing $(GOBIN)/protoc-gen-buf-breaking-v0.46.0"
	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-buf-breaking.mod -o=$(GOBIN)/protoc-gen-buf-breaking-v0.46.0 "github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking"

PROTOC_GEN_BUF_LINT := $(GOBIN)/protoc-gen-buf-lint-v0.46.0
$(PROTOC_GEN_BUF_LINT): $(BINGO_DIR)/protoc-gen-buf-lint.mod
	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
	@echo "(re)installing $(GOBIN)/protoc-gen-buf-lint-v0.46.0"
	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=protoc-gen-buf-lint.mod -o=$(GOBIN)/protoc-gen-buf-lint-v0.46.0 "github.com/bufbuild/buf/cmd/protoc-gen-buf-lint"



================================================
FILE: .bingo/bingo.mod
================================================
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.16

require github.com/bwplotka/bingo v0.5.1


================================================
FILE: .bingo/buf.mod
================================================
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15

require github.com/bufbuild/buf v0.46.0 // cmd/buf


================================================
FILE: .bingo/go.mod
================================================
module _ // Fake go.mod auto-created by 'bingo' for go -moddir compatibility with non-Go projects. Commit this file, together with other .mod files.

================================================
FILE: .bingo/gomplate.mod
================================================
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15

require github.com/hairyhenderson/gomplate/v3 v3.8.0 // cmd/gomplate


================================================
FILE: .bingo/govvv.mod
================================================
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15

require github.com/ahmetb/govvv v0.3.0


================================================
FILE: .bingo/gox.mod
================================================
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.15

require github.com/mitchellh/gox v1.0.1


================================================
FILE: .bingo/protoc-gen-buf-breaking.mod
================================================
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.16

require github.com/bufbuild/buf v0.46.0 // cmd/protoc-gen-buf-breaking


================================================
FILE: .bingo/protoc-gen-buf-lint.mod
================================================
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.16

require github.com/bufbuild/buf v0.46.0 // cmd/protoc-gen-buf-lint


================================================
FILE: .bingo/variables.env
================================================
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}

if [ -z "$GOBIN" ]; then
	GOBIN="$(go env GOPATH)/bin"
fi


BINGO="${GOBIN}/bingo-v0.5.1"

BUF="${GOBIN}/buf-v0.46.0"

GOMPLATE="${GOBIN}/gomplate-v3.8.0"

GOVVV="${GOBIN}/govvv-v0.3.0"

GOX="${GOBIN}/gox-v1.0.1"

PROTOC_GEN_BUF_BREAKING="${GOBIN}/protoc-gen-buf-breaking-v0.46.0"

PROTOC_GEN_BUF_LINT="${GOBIN}/protoc-gen-buf-lint-v0.46.0"



================================================
FILE: .github/workflows/build.yml
================================================
name: Build
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
jobs:
  buf:
    name: Buf
    runs-on: ubuntu-latest
    steps:
      - name: Set up Go
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
        with:
          ref: master
      - name: checkout-master
        run: git checkout master
      - name: checkout
        uses: actions/checkout@v1
      - name: make local
        run: make buf-local
  buck:
    name: Buck CLI
    runs-on: ubuntu-latest
    steps:
      - name: setup
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
      - name: build
        run: make build-buck
  hub:
    name: Hub CLI
    runs-on: ubuntu-latest
    steps:
      - name: setup
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
      - name: build
        run: make build-hub
  buckd:
    name: Buck Daemon
    runs-on: ubuntu-latest
    steps:
      - name: setup
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
      - name: build
        run: make build-buckd
  billingd:
    name: Billing Daemon
    runs-on: ubuntu-latest
    steps:
      - name: setup
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
      - name: build
        run: make build-billingd
  hubd:
    name: Hub Daemon
    runs-on: ubuntu-latest
    steps:
      - name: setup
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
      - name: build
        run: make build-hubd


================================================
FILE: .github/workflows/docker.yml
================================================
name: Docker image master branch
on:
  push:
    branches:
      - master
jobs:
  docker-build-push:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        imageRepo:
          - textile/hub
          - textile/billing
          - textile/buckets
          - textile/mindexd
        include:
          - imageRepo: textile/hub
            dockerFile: cmd/hubd/Dockerfile
          - imageRepo: textile/billing
            dockerFile: api/billingd/Dockerfile
          - imageRepo: textile/buckets
            dockerFile: cmd/buckd/Dockerfile
          - imageRepo: textile/mindexd
            dockerFile: api/mindexd/Dockerfile
    steps:
      - uses: actions/checkout@v2
      - name: Get git sha
        id: git_sha
        run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
      - name: Check outputs
        run: echo ${{ steps.git_sha.outputs.sha_short }}
      - name: Fail if no git sha
        run: exit 1
        if: ${{ steps.git_sha.outputs.sha_short == 0 }}
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Login to DockerHub
        uses: docker/login-action@v1 
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}    
      - name: Build and push
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          push: true
          file: ${{ matrix.dockerFile }}
          tags: ${{ matrix.imageRepo }}:latest,${{ matrix.imageRepo }}:sha-${{ steps.git_sha.outputs.sha_short }}


================================================
FILE: .github/workflows/publish-js-libs.yml
================================================
name: Publish JS Libs
on:
  release:
    types: [published]
jobs:
  publish_js_libs:
    name: Publish JS libs
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v1
      - name: Install build tools
        run: |
          sudo apt-get update
          sudo apt-get install -y build-essential
      - name: Set up Go
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: Setup env
        env:
          ACTIONS_ALLOW_UNSECURE_COMMANDS: true
        run: |
          echo "::set-env name=GOPATH::$(go env GOPATH)"
          echo "::add-path::$(go env GOPATH)/bin"
      - name: Set up Node
        uses: actions/setup-node@v1
        with:
          node-version: "14.x"
          registry-url: "https://registry.npmjs.org"
      - name: Generate JS libs
        run: |
          make js-protos
      - name: Publish JS libs
        run: |
          ./scripts/publish_js_protos.bash -v ${{ github.event.release.tag_name }} -t ${{ secrets.NPM_AUTH_TOKEN }} -p ${{ github.event.release.prerelease }}


================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
  release:
    types: [created]
jobs:
  release-platform-builds:
    name: Release Builds
    runs-on: ubuntu-latest
    steps:
      - name: Set up Go
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: Check out code
        uses: actions/checkout@v1
      - name: Cache dependencies
        id: cache-dependencies
        uses: actions/cache@v1
        with:
          path: ~/go/pkg/mod
          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
          restore-keys: |
            ${{ runner.os }}-go-
      - name: Get dependencies
        if: steps.cache-dependencies.outputs.cache-hit != 'true'
        run: |
          export PATH=${PATH}:`go env GOPATH`/bin
          go get -v -t -d ./...
      - name: Build release artifacts
        run: |
          TXTL_VERSION=${{ github.event.release.tag_name }} make build-releases
          echo $(ls ./build/dist/)
      - name: Upload multiple assets to release
        uses: AButler/upload-release-assets@v2.0
        with:
          files: "build/dist/*"
          repo-token: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .github/workflows/test.yml
================================================
name: Test
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
jobs:
  api:
    name: API
    runs-on: [self-hosted, hub1]
    services:
      mongodb:
        image: mongo:latest
        ports:
          - 127.0.0.1:27018:27017
      ipfs:
        image: ipfs/go-ipfs:v0.8.0
        env:
          IPFS_PROFILE: test
        ports:
          - 127.0.0.1:5012:5001
    steps:
      - name: setup
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
      - name: test
        env:
          SKIP_SERVICES: true
          MONGO_URI: mongodb://127.0.0.1:27018
          IPFS_API_ADDR: /ip4/127.0.0.1/tcp/5012
          STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }}
        run: go test -timeout 60m -race ./core/... ./api/... ./mongodb/...
  buckets:
    name: Buckets
    runs-on: [self-hosted, hub2]
    services:
      mongodb:
        image: mongo:latest
        ports:
          - 127.0.0.1:27019:27017
      ipfs:
        image: ipfs/go-ipfs:v0.8.0
        env:
          IPFS_PROFILE: test
        ports:
          - 127.0.0.1:5013:5001
    steps:
      - name: setup
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
      - name: test
        env:
          SKIP_SERVICES: true
          MONGO_URI: mongodb://127.0.0.1:27019
          IPFS_API_ADDR: /ip4/127.0.0.1/tcp/5013
        run: go test -v -timeout 60m -race ./buckets/...
  archives:
    name: Archives
    runs-on: [self-hosted, hub3]
    steps:
      - name: setup
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
      - name: test
        run: go test -v -timeout 60m -race ./integrationtest/...
  mail:
    name: Mail
    runs-on: [self-hosted, hub4]
    services:
      mongodb:
        image: mongo:latest
        ports:
          - 127.0.0.1:27020:27017
      ipfs:
        image: ipfs/go-ipfs:v0.8.0
        env:
          IPFS_PROFILE: test
        ports:
          - 127.0.0.1:5014:5001
    steps:
      - name: setup
        uses: actions/setup-go@v1
        with:
          go-version: 1.16
      - name: checkout
        uses: actions/checkout@v1
      - name: test
        env:
          SKIP_SERVICES: true
          MONGO_URI: mongodb://127.0.0.1:27020
          IPFS_API_ADDR: /ip4/127.0.0.1/tcp/5014
        run: go test -v -timeout 60m -race ./mail/...


================================================
FILE: .gitignore
================================================
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
vendor/

# JS
node_modules/

# IDEs
.idea/
.vscode/

# Textile
.textile/
.hubd/
.buckd/
.env
.DS_Store
buildtools/protoc
buildtools/protoc-gen-go
build/
**/javascript/api


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
  advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
  address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2018-2020 textile.io

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: Makefile
================================================
include .bingo/Variables.mk

.DEFAULT_GOAL=build

TXTL_BUILD_FLAGS?=CGO_ENABLED=0
TXTL_VERSION?="git"
GOVVV_FLAGS=$(shell $(GOVVV) -flags -version $(TXTL_VERSION) -pkg $(shell go list ./buildinfo))

build: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go build -ldflags="${GOVVV_FLAGS}" ./...
.PHONY: build

build-hub: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go build -ldflags="${GOVVV_FLAGS}" ./cmd/hub
.PHONY: build-hub

build-hubd: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go build -ldflags="${GOVVV_FLAGS}" ./cmd/hubd
.PHONY: build-hubd

build-buck: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go build -ldflags="${GOVVV_FLAGS}" ./cmd/buck
.PHONY: build-buck

build-buckd: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go build -ldflags="${GOVVV_FLAGS}" ./cmd/buckd
.PHONY: build-buckd

build-billingd: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go build -ldflags="${GOVVV_FLAGS}" ./api/billingd
.PHONY: build-billingd

build-mindexd: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go build -ldflags="${GOVVV_FLAGS}" ./api/mindexd
.PHONY: build-mindexd

install: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go install -ldflags="${GOVVV_FLAGS}" ./...
.PHONY: install

install-hub: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go install -ldflags="${GOVVV_FLAGS}" ./cmd/hub
.PHONY: install-hub

install-hubd: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go install -ldflags="${GOVVV_FLAGS}" ./cmd/hubd
.PHONY: install-hubd

install-buck: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go install -ldflags="${GOVVV_FLAGS}" ./cmd/buck
.PHONY: install-buck

install-buckd: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go install -ldflags="${GOVVV_FLAGS}" ./cmd/buckd
.PHONY: install-buckd

install-billingd: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go install -ldflags="${GOVVV_FLAGS}" ./api/billingd
.PHONY: install-billingd

install-mindexd: $(GOVVV)
	$(TXTL_BUILD_FLAGS) go install -ldflags="${GOVVV_FLAGS}" ./api/mindexd
.PHONY: install-mindexd



define gen_release_files
	$(GOX) -osarch=$(3) -output="build/$(2)/$(2)_${TXTL_VERSION}_{{.OS}}-{{.Arch}}/$(2)" -ldflags="${GOVVV_FLAGS}" $(1)
	mkdir -p build/dist; \
	cd build/$(2); \
	for release in *; do \
		cp ../../LICENSE ../../README.md $${release}/; \
		if [ $${release} != *"windows"* ]; then \
  		TXTL_FILE=$(2) $(GOMPLATE) -f ../../dist/install.tmpl -o "$${release}/install"; \
			tar -czvf ../dist/$${release}.tar.gz $${release}; \
		else \
			zip -r ../dist/$${release}.zip $${release}; \
		fi; \
	done
endef

build-hub-release: $(GOX) $(GOVVV) $(GOMPLATE)
	$(call gen_release_files,./cmd/hub,hub,"linux/amd64 linux/386 linux/arm darwin/amd64 darwin/arm64 windows/amd64")
.PHONY: build-hub-release

build-hubd-release: $(GOX) $(GOVVV) $(GOMPLATE)
	$(call gen_release_files,./cmd/hubd,hubd,"linux/amd64 linux/386 linux/arm darwin/amd64 darwin/arm64 windows/amd64")
.PHONY: build-hubd-release

build-buck-release: $(GOX) $(GOVVV) $(GOMPLATE)
	$(call gen_release_files,./cmd/buck,buck,"linux/amd64 linux/386 linux/arm darwin/amd64 darwin/arm64 windows/amd64")
.PHONY: build-buck-release

build-buckd-release: $(GOX) $(GOVVV) $(GOMPLATE)
	$(call gen_release_files,./cmd/buckd,buckd,"linux/amd64 linux/386 linux/arm darwin/amd64 darwin/arm64 windows/amd64")
.PHONY: build-buckd-release

build-billingd-release: $(GOX) $(GOVVV) $(GOMPLATE)
	$(call gen_release_files,./api/billingd,billingd,"linux/amd64 linux/386 linux/arm darwin/amd64 darwin/arm64 windows/amd64")
.PHONY: build-billingd-release

build-releases: build-hub-release build-hubd-release build-buck-release build-buckd-release build-billingd-release
.PHONY: build-releases

hub-up:
	docker-compose -f cmd/hubd/docker-compose-dev.yml up --build

hub-stop:
	docker-compose -f cmd/hubd/docker-compose-dev.yml stop

hub-clean:
	docker-compose -f cmd/hubd/docker-compose-dev.yml down -v --remove-orphans

buck-up:
	docker-compose -f cmd/buckd/docker-compose-dev.yml up --build

buck-stop:
	docker-compose -f cmd/buckd/docker-compose-dev.yml stop

buck-clean:
	docker-compose -f cmd/buckd/docker-compose-dev.yml down -v --remove-orphans

test:
	go test -race -timeout 45m ./...
.PHONY: test

clean-protos:
	find . -type f -name '*.pb.go' -delete
	find . -type f -name '*pb_test.go' -delete
.PHONY: clean-protos

clean-js-protos:
	find . -type f -name '*pb.js' ! -path "*/node_modules/*" -delete
	find . -type f -name '*pb.d.ts' ! -path "*/node_modules/*" -delete
	find . -type f -name '*pb_service.js' ! -path "*/node_modules/*" -delete
	find . -type f -name '*pb_service.d.ts' ! -path "*/node_modules/*" -delete
.PHONY: clean-js-protos

install-protoc:
	cd buildtools && ./install_protoc.bash

PROTOCGENGO=$(shell pwd)/buildtools/protoc-gen-go
protos: install-protoc clean-protos
	PATH=$(PROTOCGENGO):$(PATH) ./scripts/protoc_gen_plugin.bash \
	--proto_path=. \
	--plugin_name=go \
	--plugin_out=. \
	--plugin_opt=plugins=grpc,paths=source_relative
.PHONY: protos

js-protos: install-protoc clean-js-protos
	./scripts/gen_js_protos.bash

# local is what we run when testing locally.
# This does breaking change detection against our local git repository.
.PHONY: buf-local
buf-local: $(BUF)
	$(BUF) lint
	# $(BUF) breaking --against-input '.git#branch=master'

# https is what we run when testing in most CI providers.
# This does breaking change detection against our remote HTTPS git repository.
.PHONY: buf-https
buf-https: $(BUF)
	$(BUF) lint
	# $(BUF) breaking --against-input "$(HTTPS_GIT)#branch=master"

# ssh is what we run when testing in CI providers that provide ssh public key authentication.
# This does breaking change detection against our remote HTTPS ssh repository.
# This is especially useful for private repositories.
.PHONY: buf-ssh
buf-ssh: $(BUF)
	$(BUF) lint
	# $(BUF) breaking --against-input "$(SSH_GIT)#branch=master"


MINDEXDPB=$(shell pwd)/api/mindexd
PROTOC=$(shell pwd)/buildtools/protoc/bin
.PHONY: mindex-rest
mindex-rest:
	go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
	PATH=$(PROTOC):$(PATH) protoc -I . --grpc-gateway_out . --grpc-gateway_opt logtostderr=true --grpc-gateway_opt paths=source_relative --grpc-gateway_opt generate_unbound_methods=true --openapiv2_out . --openapiv2_opt generate_unbound_methods=true  --openapiv2_opt logtostderr=true  api/mindexd/pb/mindexd.proto


================================================
FILE: README.md
================================================
## DEPRECATION NOTICE: Textile's _hosted_ Hub infrastructure will be taken off-line on January 9th, 2023. At this time, all ThreadDB and Bucket data will no longer be available, and will subsequently be removed. See https://github.com/textileio/textile/issues/578 for further details.

# textile

[![Made by Textile](https://img.shields.io/badge/made%20by-Textile-informational.svg?style=popout-square)](https://textile.io)
[![Chat on Slack](https://img.shields.io/badge/slack-slack.textile.io-informational.svg?style=popout-square)](https://slack.textile.io)
[![GitHub license](https://img.shields.io/github/license/textileio/textile.svg?style=popout-square)](./LICENSE)
[![GitHub action](https://github.com/textileio/textile/workflows/Tests/badge.svg?style=popout-square)](https://github.com/textileio/textile/actions)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=popout-square)](https://github.com/RichardLitt/standard-readme)

> Textile hub services and buckets lib

Textile connects and extends [Libp2p](https://libp2p.io/), [IPFS](https://ipfs.io/), and [Filecoin](https://filecoin.io/). Three interoperable technologies makeup Textile:

* [**ThreadDB**](https://github.com/textileio/go-threads): A server-less p2p database built on Libp2p
* [**Powergate**](https://github.com/textileio/powergate): File storage built on Filecoin and IPFS
* [**Buckets**](https://github.com/textileio/textile/tree/master/buckets): File and dynamic directory storage built on ThreadDB, Powergate, and [UnixFS](https://github.com/ipfs/go-unixfs).

Join us on our [public Slack channel](https://slack.textile.io/) for news, discussions, and status updates. [Check out our blog](https://medium.com/textileio) for the latest posts and announcements.

## Table of Contents

- [textile](#textile)
  - [Security](#security)
  - [Background](#background)
  - [Install](#install)
    - [The Hub](#the-hub)
      - [`hubd`](#hubd)
      - [`hub`](#hub)
    - [Buckets](#buckets)
      - [`buckd`](#buckd)
      - [`buck`](#buck)
    - [The Buckets Library](#the-buckets-library)
  - [Getting Started](#getting-started)
    - [The Hub](#the-hub-1)
    - [Running Buckets](#running-buckets)
    - [Creating a bucket](#creating-a-bucket)
    - [Creating a private bucket](#creating-a-private-bucket)
    - [Adding files and folders to a bucket](#adding-files-and-folders-to-a-bucket)
    - [Recreating an existing bucket](#recreating-an-existing-bucket)
    - [Creating a bucket from an existing Cid](#creating-a-bucket-from-an-existing-cid)
    - [Exploring bucket contents](#exploring-bucket-contents)
    - [Resetting bucket contents](#resetting-bucket-contents)
    - [Watching a bucket for changes](#watching-a-bucket-for-changes)
    - [Protecting a file with a password](#protecting-a-file-with-a-password)
    - [Sharing bucket files and folders](#sharing-bucket-files-and-folders)
    - [Creating a Filecoin bucket archive](#creating-a-filecoin-bucket-archive)
    - [Multi-writer buckets](#multi-writer-buckets)
    - [Deleting a bucket](#deleting-a-bucket)
    - [Using the Buckets Library](#using-the-buckets-library)
      - [Creating a bucket](#creating-a-bucket-1)
      - [Getting an existing bucket](#getting-an-existing-bucket)
      - [Pushing local files](#pushing-local-files)
      - [Pulling remote changes](#pulling-remote-changes)
    - [Using the Mail Library](#using-the-mail-library)
      - [Creating a mailbox](#creating-a-mailbox)
      - [Getting an existing mailbox](#getting-an-existing-mailbox)
      - [Sending a message](#sending-a-message)
      - [Watching for new messages](#watching-for-new-messages)
  - [Developing](#developing)
  - [Contributing](#contributing)
  - [Changelog](#changelog)
  - [License](#license)

## Security

Textile is still under heavy development and no part of it should be used before a thorough review of the underlying code and an understanding APIs and protocols may change rapidly. There may be coding mistakes, and the underlying protocols may contain design flaws. Please [let us know](mailto:contact@textile.io) immediately if you have discovered a security vulnerability.

Please also read the [security note](https://github.com/ipfs/go-ipfs#security-issues) for [go-ipfs](https://github.com/ipfs/go-ipfs).

## Background

Go to [the docs](https://docs.textile.io/) for more about the motivations behind Textile.

## Install

This repo contains two service daemons with CLIs and a Buckets Library for building local-first apps and services.

### The Hub

#### `hubd`

-   **Prebuilt package**: See [release assets](https://github.com/textileio/textile/releases/latest)
-   **Docker image**: See the `latest` tag on [Docker Hub](https://hub.docker.com/r/textile/textile/tags)
-   **Build from the source**:

```
git clone https://github.com/textileio/textile
cd textile
go get ./cmd/hubd
```

#### `hub`

-   **Prebuilt package**: See [release assets](https://github.com/textileio/textile/releases/latest)
-   **Build from the source**: 

```
git clone https://github.com/textileio/textile
cd textile
go get ./cmd/hub
```

**Note**: `hub` _includes_ `buck` as a subcommand: `hub buck`. This is because `hubd` hosts `buckd`, along with other services.

`hub` is built in part on the [gRPC client](https://pkg.go.dev/github.com/textileio/textile/v2/api/hub/client), which can be imported to an existing project:

```
import "github.com/textileio/textile/v2/api/hub/client"
```

### Buckets

#### `buckd`

-   **Prebuilt package**: See [release assets](https://github.com/textileio/textile/releases/latest)
-   **Docker image**: See the `buckets` tag on [Docker Hub](https://hub.docker.com/r/textile/textile/tags)
-   **Build from the source**: 

```
git clone https://github.com/textileio/textile
cd textile
go get ./cmd/buckd
```

#### `buck`

-   **Prebuilt package**: See [release assets](https://github.com/textileio/textile/releases/latest)
-   **Build from the source**: 

```
git clone https://github.com/textileio/textile
cd textile
go get ./cmd/buck
```

`buck` is built in part on the [gRPC client](https://pkg.go.dev/github.com/textileio/textile/v2/api/buckets/client), which can be imported in an existing project:

```
import "github.com/textileio/textile/v2/api/buckets/client"
```

### The Buckets Library

```
import "github.com/textileio/textile/v2/buckets/local"
```

The full spec is available [here](https://pkg.go.dev/github.com/textileio/textile/v2/buckets/local).

## Getting Started

### The Hub

The Hub daemon (`hubd`), a.k.a. _The Hub_, is a hosted wrapper around other Textile services that includes developer accounts for individuals and organizations. You are encouraged to run your own, and we strongly discourage the use of the hosted [Textile Hub](https://docs.textile.io/hub/) as it will soon be shutting down.

The layout of the `hub` client CLI mirrors the services wrapped by `hubd`:

-   `hub threads` provides limited access to ThreadDB.
-   `hub buck` provides access to Buckets (`buckd`) by wrapping the standalone `buck` CLI.
-   `hub buck archive` provides limited access to The Hub's hosted Powergate instance, and the Filecoin network.

Try `hub --help` for more usage.

```
The Hub Client.

Usage:
  hub [command]

Available Commands:
  billing     Billing management
  buck        Manage an object storage bucket
  destroy     Destroy your account
  fil         Interact with Filecoin related commands.
  help        Help about any command
  init        Initialize account
  keys        API key management
  login       Login
  logout      Logout
  orgs        Org management
  threads     Thread management
  update      Update the hub CLI
  version     Show current version
  whoami      Show current user

Flags:
      --api string        API target (default "api.hub.textile.io:443")
  -h, --help              help for hub
      --identity string   User identity
      --key string        User API key
      --newIdentity       Generate a new user identity
  -o, --org string        Org username
      --secret string     User API secret
  -s, --session string    User session token
      --token string      User identity token

Use "hub [command] --help" for more information about a command.
```

Read more about The Hub, including how to [create an account](https://docs.textile.io/hub/accounts/#account-setup), in the [docs](https://docs.textile.io/hub/).

### Running Buckets

Much like [`threadsd`](https://github.com/textileio/go-threads/tree/master/threadsd), the `buckd` daemon can be run as a server or alongside desktop apps or command-line tools. The easiest way to run `buckd` is by using the provided Docker Compose files. If you're new to Docker and/or Docker Compose, get started [here](https://docs.docker.com/compose/gettingstarted/). Once you are setup, you should have `docker-compose` in your `PATH`.

Create an `.env` file and add the following values:  

```
REPO_PATH=~/myrepo
BUCK_LOG_DEBUG=true
```

Copy [this compose file](https://github.com/textileio/textile/blob/master/cmd/buckd/docker-compose.yml) and run it with the following command.

```
docker-compose -f docker-compose.yml up
```

Congrats! Now you have Buckets running locally.

The Docker Compose file starts an IPFS node, which is used to pin bucket files and folders. You could point `buckd` to a different (possibly remote) IPFS node by setting the `BUCK_ADDR_IPFS_API` variable to a different multiaddress.  

By default, this approach does not start [Powergate](https://github.com/textileio/powergate). If you do, be sure to set the `BUCK_ADDR_POWERGATE_API` variable to the multiaddress of your Powergate. `buckd` must be configured with Powergate to enable Filecoin archiving with `buck archive`.

### Creating a bucket

Since `hub buck` and `buck` are functionally identical, this section will focus on `buck` and the Buckets Library using a locally running `buckd`.

First off, take a look at `buck --help`.

```
The Bucket Client.

Manages files and folders in an object storage bucket.

Usage:
  buck [command]

Available Commands:
  add         Add a UnixFs DAG locally at path
  archive     Create a Filecoin archive
  cat         Cat bucket objects at path
  decrypt     Decrypt bucket objects at path with password
  destroy     Destroy bucket and all objects
  encrypt     Encrypt file with a password
  help        Help about any command
  init        Initialize a new or existing bucket
  links       Show links to where this bucket can be accessed
  ls          List top-level or nested bucket objects
  pull        Pull bucket object changes
  push        Push bucket object changes
  root        Show bucket root CIDs
  status      Show bucket object changes
  watch       Watch auto-pushes local changes to the remote

Flags:
      --api string   API target (default "127.0.0.1:3006")
  -h, --help         help for buck

Use "buck [command] --help" for more information about a command.
```

A Textile bucket functions a bit like an S3 bucket. It's a virtual filesystem where you can push, pull, list, and cat files. You can share them via web links or render the whole thing as a website or web app. They also function a bit like a Git repository. The point of entry is from a folder on your local machine that is synced to a _remote_.

To get started, initialize a new bucket.

```
mkdir mybucket && cd mybucket
buck init
```

When prompted, give your bucket a name and either opt-in or decline bucket encyption (see [Creating a private bucket](#creating-a-private-bucket) for more about bucket encryption).

You should now see two links for the new bucket on the locally running gateway.

```
> http://127.0.0.1:8006/thread/bafkq3ocmdkrljadlgybtvocytpdw4hbnzygxecxehdp7pfj32lxp34a/buckets/bafzbeifyzfm3kosie25s5qthvvcjrr42ivd7doqhwvu5m4ks7uqv4j5lyi Thread link
> http://127.0.0.1:8006/ipns/bafzbeifyzfm3kosie25s5qthvvcjrr42ivd7doqhwvu5m4ks7uqv4j5lyi IPNS link (propagation can be slow)
> Success! Initialized /path/to/mybucket as a new empty bucket
```

The first URL is the link to the ThreadDB instance. Internally, a collection named `buckets` is created. Each new instance in this collection amounts to a new bucket. However, when you visit this link, you'll notice a custom file browser. This is because the gateway considers the built-in `buckets` collection a special case. You can still view the raw ThreadDB instance by appending `?json=true` to the URL.

The second URL is the bucket's unique IPNS address, which is auto-updated when you add, modify, or delete files.

If you have configured the daemon with DNS settings, you will see a third URL that links to the bucket's WWW address, where it is rendered as a static website / client-side application. See `buckd --help` for more info.

**Important**: If your bucket is private (encrypted), an access token (JWT) will be appended to these links. This token represents your _identity_ across ***all buckets*** and should not be shared without caution.

`buck init` created a configuration folder in `mybucket` called `.textile`. This folder is somewhat like a `.git` folder, as it contains information about the bucket's remote address and local state.

`.textile/config.yml` will look something like,

```
key: bafzbeifyzfm3kosie25s5qthvvcjrr42ivd7doqhwvu5m4ks7uqv4j5lyi
thread: bafkq3ocmdkrljadlgybtvocytpdw4hbnzygxecxehdp7pfj32lxp34a
```

Where `key` is the bucket's unique key, and `thread` is it's ThreadDB ID.

Additionally, `.textile/repo` contains a repository describing the current file structure, which is used to stage changes against the remote.

### Creating a private bucket

Bucket encryption (AES-CTR + AES-512 HMAC) happens entirely within the `buckd`, meaning your data gets encrypted on the way in, and decrypted on the way out. This type of encryption has two goals:

- Obfuscate bucket data / files (the normal goal of encryption)
- Obfuscate directory structure, which amounts to encrypting [IPLD](https://ipld.io/) nodes and their links.

As a result of these goals, we refer to encrypted buckets as _private buckets_. Read more about bucket encryption [here](https://docs.textile.io/buckets/#encryption).

To create a new private bucket, use the `--private` flag with `buck` init or respond `y` when prompted.

In addition to bucket-level encryption, you can also [protect a file with a password](#protecting-a-file-with-a-password).

### Adding files and folders to a bucket

Bucket files and folders are content-addressed by Cids. Check out [the spec](https://github.com/multiformats/cid) if you're unfamiliar with Cids.

`buck` stages new files as additions:

```
echo "hello world" > hello.txt
buck status
> new file:  hello.txt
```

`buck status` is powered by DAG-based diffing. Much like `git`, this allows buck to only push and pull _changes_. Read more about bucket diffing in the [docs](https://docs.textile.io/buckets/#diffing-and-synching), or check out this [in-depth blog post](https://blog.textile.io/buckets-diffing-syncing-archiving/).

Use `push` to sync the change.

```
buck push
+ hello.txt: bafkreifjjcie6lypi6ny7amxnfftagclbuxndqonfipmb64f2km2devei4
> bafybeihm4zrnrsdroazwsvk3i65ooqzdftaugdkjiedr6ocq65u3ap4wni
```

The output shows the Cid of the added file and the bucket's new root Cid.

`push` will sync all types of file changes: _Additions, modifications, and deletions_.

### Recreating an existing bucket

It's often useful to recreate a bucket from the remote. This is somewhat like re-cloning a Git repo. This can be done in a different location on the same machine, or, if `buckd` has a public IP address, from a completely different machine.

Let's recreate the bucket from the previous step in a new directory outside of the original bucket.

```
mkdir mybucket2 && cd mybucket2
buck init --existing
```

The `--existing` flag allows for interactively selecting an existing bucket to initialize from.

```
? Which exiting bucket do you want to init from?:
  ▸ MyBucket bafzbeifyzfm3kosie25s5qthvvcjrr42ivd7doqhwvu5m4ks7uqv4j5lyi
```

At this point, there's only one bucket to choose from. 

**Note**: If `buckd` was running inside The Hub (`hubd`), you would be able to choose from buckets belonging to your Organizations and well as your individual Developer account by using the `--org` flag. Read more about Hub Accounts and Organizations [here](https://docs.textile.io/hub/accounts/).

```
> Selected bucket MyBucket
+ hello.txt: bafkreifjjcie6lypi6ny7amxnfftagclbuxndqonfipmb64f2km2devei4
+ .textileseed: bafkreifbdzttoqsch5j66hfmcbsic6qvwrikibgzfbg3tn7rc3j63ukk3u
> Your bucket links:
> http://127.0.0.1:8006/thread/bafkq3ocmdkrljadlgybtvocytpdw4hbnzygxecxehdp7pfj32lxp34a/buckets/bafzbeifyzfm3kosie25s5qthvvcjrr42ivd7doqhwvu5m4ks7uqv4j5lyi Thread link
> http://127.0.0.1:8006/ipns/bafzbeifyzfm3kosie25s5qthvvcjrr42ivd7doqhwvu5m4ks7uqv4j5lyi IPNS link (propagation can be slow)
> Success! Initialized /path/to/mybucket2 from an existing bucket
```

Just as before, the output shows the bucket's remote links. However, in this case `init` also pulled down the content.

**Note**: `.textileseed` is used to randomize a bucket's top level Cid and cannot be modified.

The `--existing` flag is really just a helper that sets the `--thread` and `--key` flags, which match the config values we saw earlier. We could have used those flags directly to achieve the same result.

```
buck init --thread bafkq3ocmdkrljadlgybtvocytpdw4hbnzygxecxehdp7pfj32lxp34a --key bafzbeifyzfm3kosie25s5qthvvcjrr42ivd7doqhwvu5m4ks7uqv4j5lyi
```

Lastly, we could have just copied `.textile/config.yml` to a new directory and used `buck pull` to pull down the existing content.

### Creating a bucket from an existing Cid

Sometimes it's useful to create a bucket from a [UnixFS](https://github.com/ipfs/go-unixfs) directory that is already on the IPFS network.

We can simulate this scenario by adding a local folder to IPFS and then using its root Cid to create a bucket with the `--cid` flag. Here's a local directory.

```
.
├── a
│   ├── bar.txt
│   ├── foo.txt
│   └── one
│       ├── baz.txt
│       ├── buz.txt
│       └── two
│           ├── boo.txt
│           └── fuz.txt
├── b
│   ├── foo.txt
│   └── one
│       ├── baz.txt
│       ├── muz.txt
│       ├── three
│       │   └── far.txt
│       └── two
│           └── fuz.txt
└── c
    ├── one.jpg
    └── two.jpg
```

Use the recursvie flag `-r` with `ipfs add`.

```
ipfs add -r .
added QmcDkcMJXZsNnExehsE1Yh6SRWucHa9ruVT82gpL83431W mydir/a/bar.txt
added QmYiUq2U6euWnKag23wFppG12hon4EBDswdoe4MwrKzDBn mydir/a/foo.txt
added QmXrd35ja3kknnmgj5kyDM74jfG8GLJJQGtRpEQpXCLTR3 mydir/a/one/baz.txt
added QmSWJvCzotB3CbdxVu8mBvmLqpSuEQgUoJHTFy1azRfwhT mydir/a/one/buz.txt
added QmT6h1eaBV74Sh75upE7ugFLkBnmyGr3WsQ8w8yx5NjgPV mydir/a/one/two/boo.txt
added QmTdg1b5eWEx4zJtrgvew1inkkZ29fp9mbQ4uHyKurW8Ub mydir/a/one/two/fuz.txt
added QmYiQAk1seXrmuQkpGE83AxJyNZDK1RNSaLyp3Z4r1zsrB mydir/b/foo.txt
added QmXrd35ja3kknnmgj5kyDM74jfG8GLJJQGtRpEQpXCLTR3 mydir/b/one/baz.txt
added QmSWJvCzotB3CbdxVu8mBvmLqpSuEQgUoJHTFy1azRfwhT mydir/b/one/muz.txt
added QmYs12A3CGSTHX4QrsvBe2AvLHEThrapXoTFQpyh8AzpFa mydir/b/one/three/far.txt
added QmTdg1b5eWEx4zJtrgvew1inkkZ29fp9mbQ4uHyKurW8Ub mydir/b/one/two/fuz.txt
added QmaLpwNPwftSQY3w4ZtMfZ8k38D5EgK2bcDuU4UwzREJpi mydir/c/one.jpg
added QmYLiWv2WXQd1m8YyHx4dMoj8B3Kuiuu7pCCoYibkqKyVj mydir/c/two.jpg
added QmT5YXeCfbMuVjanbHjQhECUQSACJLecfmjRBZHvmu5FDU mydir/a/one/two
added QmWh2Wx9Lec4wbEvFbsq4HmYjFmgUFtxNJ8wEVwXjhJ2uk mydir/a/one
added QmSujVHvG8Y3Jv21AbMFNQPphjyqNamh6cvdyXSD1jAtSZ mydir/a
added QmUGSorWDy2JiKYvQuJzEb4TnYDuDNLcdFyR6NhMwnwdvy mydir/b/one/three
added QmWvX7UVexbjXJtxKMyMSgGpPesFQD7teNTqUcDsP2mzW6 mydir/b/one/two
added QmPyMD67EgSZS1WpvgudHkxbA5zgjqmse8srPpFb9sVefT mydir/b/one
added QmQdAtg5NkwkvLtTbka3eci58UGj3m9AehC2sbksGSbjPZ mydir/b
added QmcjtVAF9PQfMKTc57vcvZeBrzww3TLxPcQfUQW7cXXLJL mydir/c
added QmcvkGF2t8Z94UqhdtdFRokGoqypbGyKkzRPVF4owmjVrE mydir
```

After adding the entire directory, we see the root Cid is `QmcvkGF2t8Z94UqhdtdFRokGoqypbGyKkzRPVF4owmjVrE`. Let's create the bucket using this Cid.

```
buck init --cid QmcvkGF2t8Z94UqhdtdFRokGoqypbGyKkzRPVF4owmjVrE
```

The files behind the Cid will be pulled into the new bucket.

```
+ a/bar.txt: QmcDkcMJXZsNnExehsE1Yh6SRWucHa9ruVT82gpL83431W
+ a/foo.txt: QmYiUq2U6euWnKag23wFppG12hon4EBDswdoe4MwrKzDBn
+ a/one/two/fuz.txt: QmTdg1b5eWEx4zJtrgvew1inkkZ29fp9mbQ4uHyKurW8Ub
+ a/one/baz.txt: QmXrd35ja3kknnmgj5kyDM74jfG8GLJJQGtRpEQpXCLTR3
+ c/two.jpg: QmYLiWv2WXQd1m8YyHx4dMoj8B3Kuiuu7pCCoYibkqKyVj
+ b/foo.txt: QmYiQAk1seXrmuQkpGE83AxJyNZDK1RNSaLyp3Z4r1zsrB
+ a/one/buz.txt: QmSWJvCzotB3CbdxVu8mBvmLqpSuEQgUoJHTFy1azRfwhT
+ a/one/two/boo.txt: QmT6h1eaBV74Sh75upE7ugFLkBnmyGr3WsQ8w8yx5NjgPV
+ b/one/muz.txt: QmSWJvCzotB3CbdxVu8mBvmLqpSuEQgUoJHTFy1azRfwhT
+ b/one/three/far.txt: QmYs12A3CGSTHX4QrsvBe2AvLHEThrapXoTFQpyh8AzpFa
+ b/one/baz.txt: QmXrd35ja3kknnmgj5kyDM74jfG8GLJJQGtRpEQpXCLTR3
+ b/one/two/fuz.txt: QmTdg1b5eWEx4zJtrgvew1inkkZ29fp9mbQ4uHyKurW8Ub
+ c/one.jpg: QmaLpwNPwftSQY3w4ZtMfZ8k38D5EgK2bcDuU4UwzREJpi
> Your bucket links:
> http://127.0.0.1:8006/thread/bafk3k3itq2rsybcvhf6wuvumruw3j6cw7ixhrtx4ek45qgvp3e7u2xa/buckets/bafzbeiawo6ghgsqjlorii4wghdl4tzz54x2kiwtcgtaq7b3h5gta2yok2i Thread link
> http://127.0.0.1:8006/ipns/bafzbeiawo6ghgsqjlorii4wghdl4tzz54x2kiwtcgtaq7b3h5gta2yok2i IPNS link (propagation can be slow)
> Success! Initialized /path/to/mybucket3 as a new bootstrapped bucket
```

Currently, UnixFS in `go-ipfs` uses Cid version 0, which is why we see all these old-style Cids started with `Qm`. Of course, you can also use UnixFS directories that use Cid version 1.

Similar to initializing a new bucket from an existing Cid, `buck add` allows you to _add_ and/or _merge in_ an existing UnixFS directory to an _existing bucket_. Like adding new files locally, this works by pulling down the UnixFS content from the IPFS network into the local bucket. Sync the changes with `buck push` as normal.

Pulling an existing UnixFS directory into a new or existing private bucket is also possible. Just opt-in to encryption during initialization as normal. `buckd` will recursively encrypt (without duplicating) the Cid's IPLD file and directory nodes as they are pulled into the new bucket.

### Exploring bucket contents

Use `buck ls [path]` to explore bucket contents. Omitting `[path]` will list the top-level directory.

```
buck ls

  NAME          SIZE     DIR    OBJECTS  CID
  .textileseed  32       false  n/a      bafkreiezexkrnk7yew6glm6sulhur66bbecc2aeaitf7uz4ymmp442lepu
  a             3726     true   3        QmSujVHvG8Y3Jv21AbMFNQPphjyqNamh6cvdyXSD1jAtSZ
  b             3191     true   2        QmQdAtg5NkwkvLtTbka3eci58UGj3m9AehC2sbksGSbjPZ
  c             1537626  true   2        QmcjtVAF9PQfMKTc57vcvZeBrzww3TLxPcQfUQW7cXXLJL
```

Use `[path]` to drill into directories, e.g.,

```
buck ls a

  NAME     SIZE  DIR    OBJECTS  CID
  bar.txt  517   false  n/a      QmcDkcMJXZsNnExehsE1Yh6SRWucHa9ruVT82gpL83431W
  foo.txt  557   false  n/a      QmYiUq2U6euWnKag23wFppG12hon4EBDswdoe4MwrKzDBn
  one      2502  true   3        QmWh2Wx9Lec4wbEvFbsq4HmYjFmgUFtxNJ8wEVwXjhJ2uk
```

`buck cat` functions a lot like `ls`, but cats file contents to stdout.

### Resetting bucket contents

Similar to a `git reset --hard`, you can use `buck pull --hard` to discard local changes that have not been pushed.

Continuing with the bucket above, add, modify, and/or delete some files. `buck status` should show your staged changes.

```
buck status
> modified:  a/bar.txt
> deleted:   a/one/baz.txt
> new file:  b/one/three/car.txt
> deleted:   b/foo.txt
```

Normally, `buck pull` will move your local changes to temporary `.buckpatch` files, apply the remote / upstream changes, then reapply your local changes. However, the `--hard` flag will prune all local changes, resetting the local bucket contents to match the remote exactly.

```
buck pull --hard
+ a/one/baz.txt: QmXrd35ja3kknnmgj5kyDM74jfG8GLJJQGtRpEQpXCLTR3
+ b/foo.txt: QmYiQAk1seXrmuQkpGE83AxJyNZDK1RNSaLyp3Z4r1zsrB
+ a/bar.txt: QmcDkcMJXZsNnExehsE1Yh6SRWucHa9ruVT82gpL83431W
- b/one/three/car.txt
> QmTz6HoC18QQqAEtYhfLc4Fse3LPbSCKV8vouvE88MKjFj
```

Now `buck status` will report `> Everything up-to-date`.

Try `buck pull --help` for more options when pulling the remote.

### Watching a bucket for changes

So far we've seen how a bucket can change locally, but the remote can also change. This could happen for a couple reasons:

* Changes are pushed from a different bucket copy against the same `buckd`.
* Changes are pushed from a different `buckd` at the ThreadDB layer. This is known as a multi-writer scenario. See [Multi-writer buckets](#multi-writer-buckets) for more.

In either case, it is possible to listen for and apply the remote changes using `buck watch`. This will also watch for local changes and auto-push them to the remote. In this way, multiple copies of the same bucket can be kept in sync.

`watch` will block until it's cancelled with a Ctrl-C.

```
buck watch
> Success! Watching /path/to/mybucket for changes...
```

`watch` will survive network interruptions, reconnecting when possible.

```
> Not connected. Trying to connect...
> Not connected. Trying to connect...
> Not connected. Trying to connect...
> Success! Watching /path/to/mybucket for changes...
```

While `watch` is active, file and folders dropped into the bucket will be automatically pushed.

### Protecting a file with a password

Private buckets handle encryption entirely within `buckd`, but you can use an additional client-side encryption layer with `buck encrypt` to password protect files. This encryption is also AES-CTR + AES-512 HMAC, which means you can efficiently encrypt large file streams. However, unlike bucket-wide encryption in private buckets, client-side encryption is only available for files, not IPLD directory nodes.

Let's create an encrypted version of the `hello.txt` file.

```
buck encrypt hello.txt supersecret > secret.txt
```

`encrypt` writes to stdout. So, here we redirect the output to a new file called `secret.txt`. [scrypt](https://pkg.go.dev/golang.org/x/crypto/scrypt?tab=doc) is used to derive the AES and HMAC keys from a password. This carries the normal tradeoff: _The encryption is only as good as the password_. Also, as with all client-side encryption, you must also store or otherwise remember the password!

`encrypt` only works on local files. You'll have to use `push` to sync the new file to the remote.

```
buck push --yes
+ secret.txt: bafkreiayymufgaut3wrfbzfdxiacxn64mxijj54g2osyk7qnco54iftovi
> bafybeidhffwg5ucwktn7iwyvnkhxpz7b2yrh643bo74cjvsbquzpdgpcd4
```

`decrypt`, on the other hand, works on remote files. So, after pushing `secret.txt`, we can decrypt it (if we can remember the password) and write the plaintext to stdout.

```
buck decrypt secret.txt supersecret
hello world
```

Looks like it worked!

### Sharing bucket files and folders

Bucket contents can be shared with other Hub accounts and users using the `buck roles` command. Each file and folder in a bucket maintains a set of public-key based access roles: `None`, `Reader`, `Writer`, and `Admin`. Only the `Admin` role can add and remove files and folders from a shared path. See `hub buck roles grant --help` for more about each role. For most applications, access roles only makes sense in the context of the Hub.

By default, public buckets have two roles located at the top-level path:

```
hub buck roles ls

  IDENTITY                                                     ROLE
  *                                                            Reader
  bbaareibzpb44ahd7oieqevvlqajidd4jajcvx2vdvti6bpw5wkqolwwerm  Admin

> Found 2 access roles
```

Since access roles are inherited down a bucket path, the single admin role grants the owner full access to all current and future files and folders. The default (`*`) `Read` role indicates that the entire bucket is open to the world. This is merely a reflection of the fact that the underlying UnixFS directory behind public (non-encrypted) buckets are discoverable on the IPFS Network.

Private buckets are not open to the world and are created with only the single admin role. However, we can still grant default (`*`) `Read` access to individual files, folders, or the entire bucket posteriori.

```
hub buck roles grant "*" myfolder
Use the arrow keys to navigate: ↓ ↑ → ←
? Select a role:
  None
  ▸ Reader
  Writer
  Admin
```

We can now see a new role added to `myfolder`.

```
 hub buck roles ls myfolder

  IDENTITY  ROLE
  *         Reader

> Found 1 access roles
```

Similarly, grant the `None` role to revoke access.

Manipulating access roles for a single Hub account or user (public key) can be cumbersome with the `buck` CLI. Applications in need of this level of granular access control should do so programmatically using the [Go client](https://pkg.go.dev/github.com/textileio/textile/v2/api/buckets/client), [JavaScript client](https://textileio.github.io/js-hub/docs/hub.buckets).

### Creating a Filecoin bucket archive

Bucket archiving requires a Powergate to be running in `buckd`. If you're curious how to do this, take a look at [this Docker Compose file](https://github.com/textileio/textile/blob/master/integrationtest/pg/docker-compose.yml).

Let's try archiving the bucket from the [Creating a bucket](#creating-a-bucket) section.

```
buck archive
> Warning! Archives are Filecoin Mainnet. Use with caution.
? Proceed? [y/N]
```

Please take note of the warning. Archiving should be considered experimental since Filecoin `mainnet` has not yet launched, and Powergate will either be running a `localnet` or `mainnet`.

You should see a success message if you proceed.

```
> Success! Archive queued successfully
```

This means that archiving has been initiated. It may take some time to complete...

```
buck archive status
> Archive is currently executing, grab a coffee and be patient...
```

Use the `archive status` command with `-w` to watch the progress of your archive as it moves through the Filecoin market deal stages.

```
buck archive status -w
> Archive is currently executing, grab a coffee and be patient...
>    Pushing new configuration...
>    Configuration saved successfully
>    Executing job 1006707f-efa8-48c2-98af-a1b320a59780...
>    Ensuring Hot-Storage satisfies the configuration...
>    No actions needed in Hot Storage.
>    Hot-Storage execution ran successfully.
>    Ensuring Cold-Storage satisfies the configuration...
>    Current replication factor is lower than desired, making 10 new deals...
>    Calculating piece size...
>    Estimated piece size is 256 bytes.
>    Proposing deal to miner t01459 with 0 fil per epoch...
>    Proposing deal to miner t0117734 with 500000000 fil per epoch...
>    Proposing deal to miner t0120993 with 500000000 fil per epoch...
>    Proposing deal to miner t0120642 with 500000000 fil per epoch...
>    Proposing deal to miner t0121477 with 500000000 fil per epoch...
>    Proposing deal to miner t0119390 with 500000000 fil per epoch...
>    Proposing deal to miner t0101180 with 10000000 fil per epoch...
>    Proposing deal to miner t0117803 with 500000000 fil per epoch...
>    Proposing deal to miner t0121852 with 500000000 fil per epoch...
>    Proposing deal to miner t0119822 with 500000000 fil per epoch...
>    Watching deals unfold...
>    Deal with miner t0117803 changed state to StorageDealClientFunding
>    Deal with miner t0121852 changed state to StorageDealClientFunding
>    Deal with miner t0121477 changed state to StorageDealClientFunding
>    Deal with miner t0101180 changed state to StorageDealClientFunding
>    Deal with miner t0119822 changed state to StorageDealClientFunding
>    Deal with miner t0119390 changed state to StorageDealClientFunding
>    Deal with miner t0120642 changed state to StorageDealClientFunding
>    Deal with miner t0117734 changed state to StorageDealClientFunding
>    Deal with miner t01459 changed state to StorageDealClientFunding
>    Deal with miner t0120993 changed state to StorageDealClientFunding
>    Deal with miner t0121477 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t0119822 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t0117734 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t0121852 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t01459 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t0120642 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t0120993 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t0117803 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t0101180 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t0119390 changed state to StorageDealWaitingForDataRequest
>    Deal with miner t01459 changed state to StorageDealProposalAccepted
>    Deal with miner t01459 changed state to StorageDealSealing
```

The output will look something like the above. With a little luck, you will start seeing some successful storage deals.

Bucket archiving allows you to leverage the purely decentralized nature of Filecoin in your buckets. Check out [this video](https://www.youtube.com/watch?v=jiBUxIi1zko&feature=emb_title) from a [blog post](https://blog.textile.io/buckets-diffing-syncing-archiving/) demonstrating Filecoin bucket recovery using the [Lotus client](https://github.com/filecoin-project/lotus).

### Multi-writer buckets

Multi-writer buckets leverage the distributed nature of ThreadDB by allowing multiple identities to write to the same bucket hosted by different Libp2p hosts. Since buckets are ThreadDB collection _instances_, this is no different than normal ThreadDB peer collaboration.

To-do: Demonstrate joining a bucket from a ThreadDB invite.

### Deleting a bucket

Deleting a bucket is easy... and permanent! `buck destroy` will delete your local bucket as well as the remote, making it unrecoverable with `buck init --existing`.

### Using the Buckets Library

The `buckets/local` library powers both the `buck` and `hub buck` CLIs. Everything possible in `buck`, from bucket diffing, pushing, pulling, watching, archiving, etc., is available to you in existing projects by importing the Buckets Library.

```
go get github.com/textileio/textile/v2/buckets/local
```

Visit the [GoDoc](https://pkg.go.dev/github.com/textileio/textile/v2/buckets/local) for a complete list of methods and more usage descriptions.

#### Creating a bucket

Create a new bucket by constructing a configuration object. Only `Path` is required.

```
// Setup the buckets lib
buckets := local.NewBuckets(cmd.NewClients("api.textile.io:443", false), local.DefaultConfConfig())

// Create a new bucket with config
mybuck, err := buckets.NewBucket(context.Background(), local.Config{
    Path: "path/to/bucket/folder"
})

// Check current status
diff, err := mybuck.DiffLocal() // diff contains staged changes
```

`buckets.NewBucket` will write a local config file and data repo.

See `local.WithName`, `local.WithStrategy`, `local.WithPrivate`, `local.WithCid`, `local.WithInitPathEvents` for more options when creating buckets.

To create a bucket from an existing remote, use its thread ID and instance ID (bucket `key`) in the config.

#### Getting an existing bucket

`GetLocalBucket` returns the bucket at path.

```
mybuck, err := buckets.GetLocalBucket(context.Background(), "path/to/bucket/folder")
```

#### Pushing local files

`PushLocal` pushes all staged changes to the remote and returns the new local and remote root Cids. These roots will only be different if the bucket is private (the remote is encrypted).

```
newRoots, err := mybuck.PushLocal()
```

See `local.PathOption` for more options when pushing.

#### Pulling remote changes

`PullRemote` pulls all remote changes locally and returns the new root Cids.

```
newRoots, err := mybuck.PullRemote()
```

See `local.PathOption` for more options when pulling.

### Using the Mail Library

The `mail/local` library provides mechanisms for sending and receiving messages between Hub users. Mailboxes are built on ThreadDB.

```
go get github.com/textileio/textile/v2/mail/local
```

Visit the [GoDoc](https://pkg.go.dev/github.com/textileio/textile/v2/mail/local) for a complete list of methods and more usage descriptions.

#### Creating a mailbox

Like creating a bucket, create a new mailbox by constructing a configuration object. All fields are required.

```
// Setup the mail lib
mail := local.NewMail(cmd.NewClients("api.textile.io:443", true), local.DefaultConfConfig())

// Create a libp2p identity (this can be any thread.Identity)
privKey, _, err := crypto.GenerateEd25519Key(rand.Reader)
id := thread.NewLibp2pIdentity(privKey)

// Create a new mailbox with config
mailbox, err := mail.NewMailbox(context.Background(), local.Config{
    Path: "path/to/mail/folder", // Usually a global location like ~/.textile/mail
    Identity: id,
    APIKey: <API_SECRET>,
    APISecret: <API_KEY>,
})
```

`APIKey` and `APISecret` are User Group API Keys. Read more about [creating API Keys](https://docs.textile.io/hub/app-apis/#creating-user-group-keys).

To recreate a user's mailbox, specify the same identity and API Key in the config.

#### Getting an existing mailbox

`GetLocalMailbox` returns the mailbox at path.

```
mailbox, err := mail.GetLocalMailbox(context.Background(), "path/to/mailbox/folder")
```

#### Sending a message

When a mailbox sends a message to another mailbox, the message is encrypted for the recipient's inbox _and_ for the senders sentbox. This allows both parties to control the message's lifecycle.

```
// Create two mailboxes (for most applications, this would not happen on the same machine)
box1, err := mail.NewMailbox(context.Background(), local.Config{...})
box2, err := mail.NewMailbox(context.Background(), local.Config{...})

// Send a message from the first mailbox to the second
message, err := box1.SendMessage(context.Background(), box2.Identity().GetPublic(), []byte("howdy"))

// List the recipient's inbox
inbox, err := box2.ListInboxMessages(context.Background())

// Open decrypts the message body
body, err := inbox[0].Open(context.Background(), box2.Identity())

// Mark the message as read
err = box2.ReadInboxMessage(context.Background(), inbox[0].ID)
```

#### Watching for new messages

Applications may watch for mailbox events in the inbox and/or sentbox.

```
// Handle mailbox events as they arrive
events := make(chan MailboxEvent)
defer close(events)
go func() {
    for e := range events {
        switch e.Type {
        case NewMessage:
            // handle new message
        case MessageRead:
            // handle message read (inbox only)
        case MessageDeleted:
            // handle message deleted
        }
    }
}()

// Start watching (the third param indicates we want to keep watching when offline)
state, err := mailbox.WatchInbox(context.Background(), events, true)
for s := range state {
    // handle connectivity state
}
```

Similarly, use `WatchSentbox` to watch a sentbox.

## Developing

The easiest way to develop against `hubd` or `buckd` is to use the Docker Compose files found in `cmd`. The `-dev` flavored files do not persist repos via Docker Volumes, which may be desirable in some cases.

## Contributing

Pull requests and bug reports are very welcome ❤️

This repository falls under the Textile [Code of Conduct](./CODE_OF_CONDUCT.md).

Feel free to get in touch by:
-   [Opening an issue](https://github.com/textileio/textile/issues/new)
-   Joining the [public Slack channel](https://slack.textile.io/)
-   Sending an email to contact@textile.io

## Changelog

A changelog is published along with each [release](https://github.com/textileio/textile/releases).

## License

[MIT](LICENSE)


================================================
FILE: api/apitest/apitest.go
================================================
package apitest

import (
	"context"
	"fmt"
	"log"
	"net/http"
	"os"
	"os/exec"
	"path"
	"runtime"
	"strings"
	"sync"
	"testing"
	"time"

	httpapi "github.com/ipfs/go-ipfs-http-client"
	ma "github.com/multiformats/go-multiaddr"
	"github.com/phayes/freeport"
	"github.com/stretchr/testify/require"
	billing "github.com/textileio/textile/v2/api/billingd/service"
	"github.com/textileio/textile/v2/api/hubd/client"
	pb "github.com/textileio/textile/v2/api/hubd/pb"
	"github.com/textileio/textile/v2/core"
	"github.com/textileio/textile/v2/util"
	"go.mongodb.org/mongo-driver/mongo"
	"go.mongodb.org/mongo-driver/mongo/options"
)

const SessionSecret = "hubsession"

func MakeTextile(t *testing.T) core.Config {
	conf := DefaultTextileConfig(t)
	MakeTextileWithConfig(t, conf)
	return conf
}

func DefaultTextileConfig(t util.TestingTWithCleanup) core.Config {
	apiPort, err := freeport.GetFreePort()
	require.NoError(t, err)
	gatewayPort, err := freeport.GetFreePort()
	require.NoError(t, err)

	return core.Config{
		Hub:                       true,
		Debug:                     true,
		AddrAPI:                   util.MustParseAddr(fmt.Sprintf("/ip4/127.0.0.1/tcp/%d", apiPort)),
		AddrAPIProxy:              util.MustParseAddr("/ip4/0.0.0.0/tcp/0"),
		AddrMongoURI:              GetMongoUri(),
		AddrMongoName:             util.MakeToken(12),
		AddrThreadsHost:           util.MustParseAddr("/ip4/0.0.0.0/tcp/0"),
		AddrIPFSAPI:               GetIPFSApiAddr(),
		AddrGatewayHost:           util.MustParseAddr(fmt.Sprintf("/ip4/127.0.0.1/tcp/%d", gatewayPort)),
		AddrGatewayURL:            fmt.Sprintf("http://127.0.0.1:%d", gatewayPort),
		IPNSRepublishSchedule:     "0 1 * * *",
		IPNSRepublishConcurrency:  5,
		CustomerioAPIKey:          os.Getenv("CUSTOMERIO_API_KEY"),
		CustomerioConfirmTmpl:     os.Getenv("CUSTOMERIO_CONFIRM_TMPL"),
		CustomerioInviteTmpl:      os.Getenv("CUSTOMERIO_INVITE_TMPL"),
		EmailSessionSecret:        SessionSecret,
		MaxBucketArchiveRepFactor: 4,
	}
}

type Options struct {
	RepoPath       string
	NoAutoShutdown bool
}

type Option func(*Options)

func WithRepoPath(repoPath string) Option {
	return func(o *Options) {
		o.RepoPath = repoPath
	}
}

func WithoutAutoShutdown() Option {
	return func(o *Options) {
		o.NoAutoShutdown = true
	}
}

func MakeTextileWithConfig(t util.TestingTWithCleanup, conf core.Config, opts ...Option) func() {
	var args Options
	for _, opt := range opts {
		opt(&args)
	}
	if args.RepoPath == "" {
		args.RepoPath = t.TempDir()
	}
	textile, err := core.NewTextile(context.Background(), conf, core.WithBadgerThreadsPersistence(args.RepoPath))
	require.NoError(t, err)
	time.Sleep(5 * time.Second) // Give the api a chance to get ready
	done := func() {
		time.Sleep(time.Second) // Give threads a chance to finish work
		err := textile.Close()
		require.NoError(t, err)
	}
	if !args.NoAutoShutdown {
		t.Cleanup(done)
	}
	return done
}

func DefaultBillingConfig(t util.TestingTWithCleanup) billing.Config {
	apiPort, err := freeport.GetFreePort()
	require.NoError(t, err)
	gatewayPort, err := freeport.GetFreePort()
	require.NoError(t, err)

	return billing.Config{
		ListenAddr:             util.MustParseAddr(fmt.Sprintf("/ip4/127.0.0.1/tcp/%d", apiPort)),
		StripeAPIURL:           "https://api.stripe.com",
		StripeAPIKey:           os.Getenv("STRIPE_API_KEY"),
		StripeSessionReturnURL: "http://127.0.0.1:8006/dashboard",
		SegmentAPIKey:          os.Getenv("SEGMENT_API_KEY"),
		SegmentPrefix:          "test_",
		DBURI:                  GetMongoUri(),
		DBName:                 util.MakeToken(8),
		GatewayHostAddr:        util.MustParseAddr(fmt.Sprintf("/ip4/127.0.0.1/tcp/%d", gatewayPort)),
		Debug:                  true,
	}
}

func MakeBillingWithConfig(t util.TestingTWithCleanup, conf billing.Config) {
	api, err := billing.NewService(context.Background(), conf)
	require.NoError(t, err)
	err = api.Start()
	require.NoError(t, err)
	t.Cleanup(func() {
		err := api.Stop()
		require.NoError(t, err)
	})
}

func NewUsername() string {
	return strings.ToLower(util.MakeToken(12))
}

func NewEmail() string {
	return fmt.Sprintf("%s@test.com", NewUsername())
}

func Signup(t util.TestingTWithCleanup, client *client.Client, conf core.Config, username, email string) *pb.SignupResponse {
	var err error
	var res *pb.SignupResponse
	var wg sync.WaitGroup
	wg.Add(1)
	go func() {
		defer wg.Done()
		res, err = client.Signup(context.Background(), username, email)
		require.NoError(t, err)
	}()
	ConfirmEmail(t, conf.AddrGatewayURL, SessionSecret)
	wg.Wait()
	require.NotNil(t, res)
	require.NotEmpty(t, res.Session)
	return res
}

func Signin(t *testing.T, client *client.Client, conf core.Config, usernameOrEmail string) *pb.SigninResponse {
	var err error
	var res *pb.SigninResponse
	var wg sync.WaitGroup
	wg.Add(1)
	go func() {
		defer wg.Done()
		res, err = client.Signin(context.Background(), usernameOrEmail)
		require.NoError(t, err)
	}()
	ConfirmEmail(t, conf.AddrGatewayURL, SessionSecret)
	wg.Wait()
	require.NotNil(t, res)
	require.NotEmpty(t, res.Session)
	return res
}

func ConfirmEmail(t util.TestingTWithCleanup, gurl string, secret string) {
	time.Sleep(time.Second)
	url := fmt.Sprintf("%s/confirm/%s", gurl, secret)
	_, err := http.Get(url)
	require.NoError(t, err)
	time.Sleep(time.Second)
}

// GetMongoUri returns env value or default.
func GetMongoUri() string {
	env := os.Getenv("MONGO_URI")
	if env != "" {
		return env
	}
	return "mongodb://127.0.0.1:27017"
}

// GetIPFSApiAddr returns env value or default.
func GetIPFSApiAddr() ma.Multiaddr {
	env := os.Getenv("IPFS_API_ADDR")
	if env != "" {
		return util.MustParseAddr(env)
	}
	return util.MustParseAddr("/ip4/127.0.0.1/tcp/5011")
}

// StartServices starts local mongodb and ipfs services.
func StartServices() (cleanup func()) {
	_, currentFilePath, _, _ := runtime.Caller(0)
	dirpath := path.Dir(currentFilePath)

	makeDown := func() {
		cmd := exec.Command(
			"docker-compose",
			"-f",
			fmt.Sprintf("%s/docker-compose.yml", dirpath),
			"down",
			"-v",
			"--remove-orphans",
		)
		cmd.Stdout = os.Stdout
		cmd.Stderr = os.Stderr
		if err := cmd.Run(); err != nil {
			log.Fatalf("docker-compose down: %s", err)
		}
	}
	makeDown()

	cmd := exec.Command(
		"docker-compose",
		"-f",
		fmt.Sprintf("%s/docker-compose.yml", dirpath),
		"build",
	)
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	if err := cmd.Run(); err != nil {
		log.Fatalf("docker-compose build: %s", err)
	}
	cmd = exec.Command(
		"docker-compose",
		"-f",
		fmt.Sprintf("%s/docker-compose.yml", dirpath),
		"up",
		"-V",
	)
	//cmd.Stdout = os.Stdout
	//cmd.Stderr = os.Stderr
	if err := cmd.Start(); err != nil {
		log.Fatalf("running docker-compose: %s", err)
	}

	limit := 5
	retries := 0
	var err error
	for retries < limit {
		err = checkServices()
		if err == nil {
			break
		}
		time.Sleep(time.Second)
		retries++
	}
	if retries == limit {
		makeDown()
		if err != nil {
			log.Fatalf("connecting to services: %s", err)
		}
		log.Fatalf("max retries exhausted connecting to services")
	}
	return makeDown
}

func checkServices() error {
	ctx, cancel := context.WithTimeout(context.Background(), time.Second*3)
	defer cancel()
	mc, err := mongo.Connect(ctx, options.Client().ApplyURI(GetMongoUri()))
	if err != nil {
		return err
	}
	if err = mc.Ping(ctx, nil); err != nil {
		return err
	}
	ic, err := httpapi.NewApi(GetIPFSApiAddr())
	if err != nil {
		return err
	}
	if _, err = ic.Key().Self(ctx); err != nil {
		return err
	}
	return nil
}


================================================
FILE: api/apitest/docker-compose.yml
================================================
version: "3"
services:
  ipfs:
    image: ipfs/go-ipfs:v0.8.0
    environment:
      - IPFS_PROFILE=test
    ports:
      - "127.0.0.1:5011:5001"
  mongo:
    image: mongo:latest
    ports:
      - "127.0.0.1:27017:27017"
    command:
      - /bin/bash
      - -c
      - |
        /usr/bin/mongod --fork --logpath /var/log/mongod.log --bind_ip_all --replSet rs0
        mongo --eval 'rs.initiate({_id: "rs0", version: 1, members: [{ _id: 0, host: "127.0.0.1:27017" }]})'
        tail -f /var/log/mongod.log

================================================
FILE: api/billingd/Dockerfile
================================================
FROM golang:1.16.0-buster
MAINTAINER Textile <contact@textile.io>

# This is (in large part) copied (with love) from
# https://hub.docker.com/r/ipfs/go-ipfs/dockerfile

# Install deps
RUN apt-get update && apt-get install -y \
  libssl-dev \
  ca-certificates

ENV SRC_DIR /textile

# Download packages first so they can be cached.
COPY go.mod go.sum $SRC_DIR/
RUN cd $SRC_DIR \
  && go mod download

COPY . $SRC_DIR

# Build the thing.
RUN cd $SRC_DIR \
  && TXTL_BUILD_FLAGS="CGO_ENABLED=0 GOOS=linux" make build-billingd

# Get su-exec, a very minimal tool for dropping privileges,
# and tini, a very minimal init daemon for containers
ENV SUEXEC_VERSION v0.2
ENV TINI_VERSION v0.19.0
RUN set -eux; \
    dpkgArch="$(dpkg --print-architecture)"; \
    case "${dpkgArch##*-}" in \
        "amd64" | "armhf" | "arm64") tiniArch="tini-static-$dpkgArch" ;;\
        *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
    esac; \
  cd /tmp \
  && git clone https://github.com/ncopa/su-exec.git \
  && cd su-exec \
  && git checkout -q $SUEXEC_VERSION \
  && make su-exec-static \
  && cd /tmp \
  && wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/$tiniArch \
  && chmod +x tini

# Now comes the actual target image, which aims to be as small as possible.
FROM busybox:1.31.1-glibc
LABEL maintainer="Textile <contact@textile.io>"

# Get the textile binary, entrypoint script, and TLS CAs from the build container.
ENV SRC_DIR /textile
COPY --from=0 $SRC_DIR/billingd /usr/local/bin/billingd
COPY --from=0 /tmp/su-exec/su-exec-static /sbin/su-exec
COPY --from=0 /tmp/tini /sbin/tini
COPY --from=0 /etc/ssl/certs /etc/ssl/certs

# This shared lib (part of glibc) doesn't seem to be included with busybox.
COPY --from=0 /lib/*-linux-gnu*/libdl.so.2 /lib/

# Copy over SSL libraries.
COPY --from=0 /usr/lib/*-linux-gnu*/libssl.so* /usr/lib/
COPY --from=0 /usr/lib/*-linux-gnu*/libcrypto.so* /usr/lib/

# addrApi; can be exposed to the public
EXPOSE 10006
# addrGatewayHost; can be exposed to the public.
EXPOSE 8010

# Create the repo directory.
ENV BILLING_PATH /data/billing
RUN mkdir -p $BILLING_PATH \
  && adduser -D -h $BILLING_PATH -u 1000 -G users billing \
  && chown billing:users $BILLING_PATH

# Switch to a non-privileged user.
USER billing

ENTRYPOINT ["/sbin/tini", "--", "billingd"]


================================================
FILE: api/billingd/Dockerfile.dev
================================================
FROM golang:1.16.0-buster

RUN apt-get update && apt-get install -y \
  libssl-dev \
  ca-certificates

RUN go get github.com/go-delve/delve/cmd/dlv

ENV SRC_DIR /textile

COPY go.mod go.sum $SRC_DIR/
RUN cd $SRC_DIR \
  && go mod download

COPY . $SRC_DIR

RUN cd $SRC_DIR \
  && CGO_ENABLED=0 GOOS=linux go build -gcflags "all=-N -l" -o billingd api/billingd/main.go

FROM debian:buster
LABEL maintainer="Textile <contact@textile.io>"

ENV SRC_DIR /textile
COPY --from=0 /go/bin/dlv /usr/local/bin/dlv
COPY --from=0 /etc/ssl/certs /etc/ssl/certs
COPY --from=0 $SRC_DIR/billingd /usr/local/bin/billingd

EXPOSE 10006
EXPOSE 8010
EXPOSE 40000

ENV BILLING_PATH /data/billing
RUN adduser --home $BILLING_PATH --disabled-login --gecos "" --ingroup users billing

USER billing

ENTRYPOINT ["dlv", "--listen=0.0.0.0:40000", "--headless=true", "--accept-multiclient", "--continue", "--api-version=2", "exec", "/usr/local/bin/billingd"]


================================================
FILE: api/billingd/analytics/analytics.go
================================================
package analytics

import (
	"time"

	logging "github.com/ipfs/go-log/v2"
	"github.com/textileio/go-threads/util"
	mdb "github.com/textileio/textile/v2/mongodb"
	segment "gopkg.in/segmentio/analytics-go.v3"
)

var (
	log = logging.Logger("analytics")
)

// Client uses segment to trigger life-cycle emails (quota, billing, etc).
type Client struct {
	api    segment.Client
	prefix string
}

// NewClient return a segment client.
func NewClient(segmentAPIKey, prefix string, debug bool) (*Client, error) {
	if debug {
		if err := util.SetLogLevels(map[string]logging.LogLevel{
			"analytics": logging.LevelDebug,
		}); err != nil {
			return nil, err
		}
	}

	var api segment.Client
	if segmentAPIKey != "" {
		config := segment.Config{
			Verbose: debug,
		}
		var err error
		api, err = segment.NewWithConfig(segmentAPIKey, config)
		if err != nil {
			return nil, err
		}
	}

	return &Client{
		api:    api,
		prefix: prefix,
	}, nil
}

// Identify creates or updates the user traits
func (c *Client) Identify(key string, accountType mdb.AccountType, active bool, email string, properties map[string]interface{}) {
	if c.api != nil && accountType != mdb.User {
		traits := segment.NewTraits()
		traits.Set("account_type", accountType)
		traits.Set(c.prefix+"signup", "true")
		if email != "" {
			traits.SetEmail(email)
		}
		for key, value := range properties {
			traits.Set(key, value)
		}
		if err := c.api.Enqueue(segment.Identify{
			UserId: key,
			Traits: traits,
			Context: &segment.Context{
				Extra: map[string]interface{}{
					"active": active,
				},
			},
		}); err != nil {
			log.Errorf("identifying user: %v", err)
		}
	}
}

// TrackEvent logs a new event
func (c *Client) TrackEvent(key string, accountType mdb.AccountType, active bool, event Event, properties map[string]string) {
	if c.api != nil && accountType != mdb.User {
		props := segment.NewProperties()
		for key, value := range properties {
			props.Set(key, value)
		}

		if err := c.api.Enqueue(segment.Track{
			UserId:     key,
			Event:      event.String(),
			Properties: props,
			Context: &segment.Context{
				Extra: map[string]interface{}{
					"active": active,
				},
			},
		}); err != nil {
			log.Errorf("tracking event: %v", err)
		}
	}
}

// FormatUnix converts seconds to string in same format for all analytics requests
func (c *Client) FormatUnix(seconds int64) string {
	return time.Unix(seconds, 0).Format(time.RFC3339)
}


================================================
FILE: api/billingd/analytics/events.go
================================================
package analytics

import (
	"fmt"
)

// Event is a type of usage event
type Event int

const (
	SignIn Event = iota
	AccountDestroyed
	KeyAccountCreated
	KeyUserCreated
	OrgCreated
	OrgLeave
	OrgDestroyed
	OrgInviteCreated
	GracePeriodStart
	GracePeriodEnd
	BillingSetup
	BucketCreated
	BucketArchiveCreated
	MailboxCreated
	ThreadDbCreated
)

func (e Event) String() string {
	switch e {
	case SignIn:
		return "signin"
	case AccountDestroyed:
		return "account_destroyed"
	case KeyAccountCreated:
		return "key_account_created"
	case KeyUserCreated:
		return "key_user_created"
	case OrgCreated:
		return "org_created"
	case OrgLeave:
		return "org_leave"
	case OrgDestroyed:
		return "org_destroyed"
	case OrgInviteCreated:
		return "org_invite_created"
	case GracePeriodStart:
		return "grace_period_start"
	case GracePeriodEnd:
		return "grace_period_end"
	case BillingSetup:
		return "billing_setup"
	case BucketCreated:
		return "bucket_created"
	case BucketArchiveCreated:
		return "bucket_archive_created"
	case MailboxCreated:
		return "mailbox_created"
	case ThreadDbCreated:
		return "threaddb_created"
	default:
		return fmt.Sprintf("%d", int(e))
	}
}


================================================
FILE: api/billingd/client/client.go
================================================
package client

import (
	"context"

	logging "github.com/ipfs/go-log/v2"
	stripe "github.com/stripe/stripe-go/v72"
	"github.com/textileio/go-threads/core/thread"
	"github.com/textileio/textile/v2/api/billingd/analytics"
	pb "github.com/textileio/textile/v2/api/billingd/pb"
	mdb "github.com/textileio/textile/v2/mongodb"
	"google.golang.org/grpc"
)

var log = logging.Logger("billing.client")

// Client provides the client api.
type Client struct {
	c    pb.APIServiceClient
	conn *grpc.ClientConn
}

// NewClient starts the client.
func NewClient(target string, opts ...grpc.DialOption) (*Client, error) {
	conn, err := grpc.Dial(target, opts...)
	if err != nil {
		return nil, err
	}
	return &Client{
		c:    pb.NewAPIServiceClient(conn),
		conn: conn,
	}, nil
}

// Close closes the client's grpc connection and cancels any active requests.
func (c *Client) Close() error {
	return c.conn.Close()
}

func (c *Client) CheckHealth(ctx context.Context) error {
	_, err := c.c.CheckHealth(ctx, &pb.CheckHealthRequest{})
	return err
}

func (c *Client) CreateCustomer(
	ctx context.Context,
	key thread.PubKey,
	email string,
	username string,
	accountType mdb.AccountType,
	opts ...Option,
) (string, error) {
	args := &options{}
	for _, opt := range opts {
		opt(args)
	}
	var parent *pb.CreateCustomerRequest_Params
	if args.parentKey != nil {
		parent = &pb.CreateCustomerRequest_Params{
			Key:         args.parentKey.String(),
			Email:       args.parentEmail,
			AccountType: int32(args.parentAccountType),
		}
	}
	res, err := c.c.CreateCustomer(ctx, &pb.CreateCustomerRequest{
		Customer: &pb.CreateCustomerRequest_Params{
			Key:         key.String(),
			Email:       email,
			AccountType: int32(accountType),
			Username:    username,
		},
		Parent: parent,
	})
	if err != nil {
		return "", err
	}
	return res.CustomerId, nil
}

func (c *Client) GetCustomer(ctx context.Context, key thread.PubKey) (*pb.GetCustomerResponse, error) {
	return c.c.GetCustomer(ctx, &pb.GetCustomerRequest{
		Key: key.String(),
	})
}

func (c *Client) GetCustomerSession(ctx context.Context, key thread.PubKey) (*pb.GetCustomerSessionResponse, error) {
	return c.c.GetCustomerSession(ctx, &pb.GetCustomerSessionRequest{
		Key: key.String(),
	})
}

func (c *Client) ListDependentCustomers(ctx context.Context, key thread.PubKey, opts ...ListOption) (
	*pb.ListDependentCustomersResponse, error) {
	args := &listOptions{}
	for _, opt := range opts {
		opt(args)
	}
	return c.c.ListDependentCustomers(ctx, &pb.ListDependentCustomersRequest{
		Key:    key.String(),
		Offset: args.offset,
		Limit:  args.limit,
	})
}

func (c *Client) UpdateCustomer(
	ctx context.Context,
	customerID string,
	balance int64,
	billable,
	delinquent bool,
) error {
	_, err := c.c.UpdateCustomer(ctx, &pb.UpdateCustomerRequest{
		CustomerId: customerID,
		Balance:    balance,
		Billable:   billable,
		Delinquent: delinquent,
	})
	return err
}

func (c *Client) UpdateCustomerSubscription(
	ctx context.Context,
	customerID string,
	status stripe.SubscriptionStatus,
	periodStart, periodEnd int64,
) error {
	_, err := c.c.UpdateCustomerSubscription(ctx, &pb.UpdateCustomerSubscriptionRequest{
		CustomerId: customerID,
		Status:     string(status),
		InvoicePeriod: &pb.Period{
			UnixStart: periodStart,
			UnixEnd:   periodEnd,
		},
	})
	return err
}

func (c *Client) RecreateCustomerSubscription(ctx context.Context, key thread.PubKey) error {
	_, err := c.c.RecreateCustomerSubscription(ctx, &pb.RecreateCustomerSubscriptionRequest{
		Key: key.String(),
	})
	return err
}

func (c *Client) DeleteCustomer(ctx context.Context, key thread.PubKey) error {
	_, err := c.c.DeleteCustomer(ctx, &pb.DeleteCustomerRequest{
		Key: key.String(),
	})
	return err
}

func (c *Client) GetCustomerUsage(ctx context.Context, key thread.PubKey) (*pb.GetCustomerUsageResponse, error) {
	return c.c.GetCustomerUsage(ctx, &pb.GetCustomerUsageRequest{
		Key: key.String(),
	})
}

func (c *Client) IncCustomerUsage(
	ctx context.Context,
	key thread.PubKey,
	productUsage map[string]int64,
) (*pb.IncCustomerUsageResponse, error) {
	return c.c.IncCustomerUsage(ctx, &pb.IncCustomerUsageRequest{
		Key:          key.String(),
		ProductUsage: productUsage,
	})
}

func (c *Client) ReportCustomerUsage(ctx context.Context, key thread.PubKey) error {
	_, err := c.c.ReportCustomerUsage(ctx, &pb.ReportCustomerUsageRequest{
		Key: key.String(),
	})
	return err
}

// Identify creates or updates the user traits
func (c *Client) Identify(
	ctx context.Context,
	key thread.PubKey,
	accountType mdb.AccountType,
	active bool,
	email string,
	properties map[string]string,
) {
	if _, err := c.c.Identify(ctx, &pb.IdentifyRequest{
		Key:         key.String(),
		AccountType: int32(accountType),
		Active:      active,
		Email:       email,
		Properties:  properties,
	}); err != nil {
		log.Error(err)
	}
}

// TrackEvent records a new event
func (c *Client) TrackEvent(
	ctx context.Context,
	key thread.PubKey,
	accountType mdb.AccountType,
	active bool,
	event analytics.Event,
	properties map[string]string,
) {
	if _, err := c.c.TrackEvent(ctx, &pb.TrackEventRequest{
		Key:         key.String(),
		AccountType: int32(accountType),
		Active:      active,
		Event:       int32(event),
		Properties:  properties,
	}); err != nil {
		log.Error(err)
	}
}


================================================
FILE: api/billingd/client/client_test.go
================================================
package client_test

import (
	"context"
	"crypto/rand"
	"math"
	"os"
	"testing"
	"time"

	"github.com/libp2p/go-libp2p-core/crypto"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	stripe "github.com/stripe/stripe-go/v72"
	"github.com/textileio/go-ds-mongo/test"
	"github.com/textileio/go-threads/core/thread"
	tutil "github.com/textileio/go-threads/util"
	"github.com/textileio/textile/v2/api/apitest"
	"github.com/textileio/textile/v2/api/billingd/client"
	"github.com/textileio/textile/v2/api/billingd/service"
	mdb "github.com/textileio/textile/v2/mongodb"
	"google.golang.org/grpc"
)

const (
	mib = 1024 * 1024
)

func TestMain(m *testing.M) {
	cleanup := func() {}
	if os.Getenv("SKIP_SERVICES") != "true" {
		cleanup = test.StartMongoDB()
	}
	exitVal := m.Run()
	cleanup()
	os.Exit(exitVal)
}

func TestClient_CheckHealth(t *testing.T) {
	c := setup(t)
	err := c.CheckHealth(context.Background())
	require.NoError(t, err)
}

func TestClient_CreateCustomer(t *testing.T) {
	c := setup(t)

	key := newKey(t)
	email := apitest.NewEmail()
	username := apitest.NewUsername()
	_, err := c.CreateCustomer(context.Background(), key, email, username, mdb.Dev)
	require.NoError(t, err)

	_, err = c.CreateCustomer(context.Background(), key, email, username, mdb.Dev)
	require.Error(t, err)

	_, err = c.CreateCustomer(
		context.Background(),
		newKey(t),
		apitest.NewEmail(),
		apitest.NewUsername(),
		mdb.User,
		client.WithParent(key, email, mdb.Dev),
	)
	require.NoError(t, err)

	nonExistentParentKey := newKey(t)
	_, err = c.CreateCustomer(
		context.Background(),
		newKey(t),
		apitest.NewEmail(),
		apitest.NewUsername(),
		mdb.User,
		client.WithParent(nonExistentParentKey, apitest.NewEmail(), mdb.Dev),
	)
	require.NoError(t, err)

	newParent, err := c.GetCustomer(context.Background(), nonExistentParentKey)
	require.NoError(t, err)
	assert.NotEmpty(t, newParent)
	assert.Equal(t, int64(1), newParent.Dependents)
}

func TestClient_GetCustomer(t *testing.T) {
	c := setup(t)
	key := newKey(t)
	_, err := c.CreateCustomer(context.Background(), key, apitest.NewEmail(), apitest.NewUsername(), mdb.Dev)
	require.NoError(t, err)

	cus, err := c.GetCustomer(context.Background(), key)
	require.NoError(t, err)
	assert.NotEmpty(t, cus.AccountStatus)
	assert.NotEmpty(t, cus.SubscriptionStatus)
	assert.Equal(t, 0, int(cus.Balance))
	assert.False(t, cus.Billable)
	assert.False(t, cus.Delinquent)
	assert.NotEmpty(t, cus.DailyUsage)
}

func TestClient_GetCustomerSession(t *testing.T) {
	c := setup(t)
	key := newKey(t)
	_, err := c.CreateCustomer(context.Background(), key, apitest.NewEmail(), apitest.NewUsername(), mdb.Dev)
	require.NoError(t, err)

	session, err := c.GetCustomerSession(context.Background(), key)
	require.NoError(t, err)
	assert.NotEmpty(t, session.Url)
}

func TestClient_ListDependentCustomers(t *testing.T) {
	c := setup(t)
	key := newKey(t)
	email := apitest.NewEmail()
	username := apitest.NewUsername()
	_, err := c.CreateCustomer(context.Background(), key, email, username, mdb.Org)
	require.NoError(t, err)

	for i := 0; i < 30; i++ {
		_, err = c.CreateCustomer(
			context.Background(),
			newKey(t),
			apitest.NewEmail(),
			apitest.NewUsername(),
			mdb.User,
			client.WithParent(key, email, mdb.Org),
		)
		require.NoError(t, err)
		time.Sleep(time.Second)
	}

	res, err := c.ListDependentCustomers(context.Background(), key, client.WithLimit(30))
	require.NoError(t, err)
	assert.Len(t, res.Customers, 30)

	res, err = c.ListDependentCustomers(context.Background(), key)
	require.NoError(t, err)
	assert.Len(t, res.Customers, 25)

	res, err = c.ListDependentCustomers(context.Background(), key, client.WithLimit(5))
	require.NoError(t, err)
	assert.Len(t, res.Customers, 5)

	res, err = c.ListDependentCustomers(context.Background(), key, client.WithOffset(res.NextOffset))
	require.NoError(t, err)
	assert.Len(t, res.Customers, 25)

	res, err = c.ListDependentCustomers(context.Background(), key, client.WithOffset(res.NextOffset))
	require.NoError(t, err)
	assert.Len(t, res.Customers, 0)
}

func TestClient_UpdateCustomer(t *testing.T) {
	c := setup(t)
	key := newKey(t)
	email := apitest.NewEmail()
	id, err := c.CreateCustomer(context.Background(), key, email, apitest.NewUsername(), mdb.Dev)
	require.NoError(t, err)

	childKey := newKey(t)
	childId, err := c.CreateCustomer(
		context.Background(),
		childKey,
		apitest.NewEmail(),
		apitest.NewUsername(),
		mdb.User,
		client.WithParent(key, email, mdb.Dev),
	)
	require.NoError(t, err)

	err = c.UpdateCustomer(context.Background(), id, 100, true, true)
	require.NoError(t, err)

	cus, err := c.GetCustomer(context.Background(), key)
	require.NoError(t, err)
	assert.Equal(t, 100, int(cus.Balance))
	assert.True(t, cus.Billable)
	assert.True(t, cus.Delinquent)

	// Child cannot be billable
	err = c.UpdateCustomer(context.Background(), childId, 0, true, false)
	require.Error(t, err)
}

func TestClient_UpdateCustomerSubscription(t *testing.T) {
	c := setup(t)
	key := newKey(t)
	id, err := c.CreateCustomer(context.Background(), key, apitest.NewEmail(), apitest.NewUsername(), mdb.Dev)
	require.NoError(t, err)

	start := time.Now().Add(-time.Hour).Unix()
	end := time.Now().Add(time.Hour).Unix()
	err = c.UpdateCustomerSubscription(context.Background(), id, stripe.SubscriptionStatusCanceled, start, end)
	require.NoError(t, err)

	cus, err := c.GetCustomer(context.Background(), key)
	require.NoError(t, err)
	assert.Equal(t, string(stripe.SubscriptionStatusCanceled), cus.SubscriptionStatus)
}

func TestClient_RecreateCustomerSubscription(t *testing.T) {
	c := setup(t)
	key := newKey(t)
	id, err := c.CreateCustomer(context.Background(), key, apitest.NewEmail(), apitest.NewUsername(), mdb.Dev)
	require.NoError(t, err)

	err = c.RecreateCustomerSubscription(context.Background(), key)
	require.Error(t, err)

	start := time.Now().Add(-time.Hour).Unix()
	end := time.Now().Add(time.Hour).Unix()
	err = c.UpdateCustomerSubscription(context.Background(), id, stripe.SubscriptionStatusCanceled, start, end)
	require.NoError(t, err)

	err = c.RecreateCustomerSubscription(context.Background(), key)
	require.NoError(t, err)

	cus, err := c.GetCustomer(context.Background(), key)
	require.NoError(t, err)
	assert.Equal(t, string(stripe.SubscriptionStatusActive), cus.SubscriptionStatus)
}

func TestClient_DeleteCustomer(t *testing.T) {
	c := setup(t)
	key := newKey(t)
	_, err := c.CreateCustomer(context.Background(), key, apitest.NewEmail(), apitest.NewUsername(), mdb.Dev)
	require.NoError(t, err)

	err = c.DeleteCustomer(context.Background(), key)
	require.NoError(t, err)
}

type usageTest struct {
	key            string
	initialIncSize int64
	unitPrice      float64
}

func TestClient_GetCustomerUsage(t *testing.T) {
	tests := []usageTest{
		{"stored_data", mib, 0.000007705471},
		{"network_egress", mib, 0.000025684903},
		{"instance_reads", 1, 0.000099999999},
		{"instance_writes", 1, 0.000199999999},
	}
	for _, tt := range tests {
		getCustomerUsage(t, tt)
	}
}

func getCustomerUsage(t *testing.T, test usageTest) {
	c := setup(t)
	key := newKey(t)
	id, err := c.CreateCustomer(context.Background(), key, apitest.NewEmail(), apitest.NewUsername(), mdb.Dev)
	require.NoError(t, err)

	product := getProduct(t, test.key)
	var inc, sizeTotal, unitsTotal int64

	err = c.UpdateCustomer(context.Background(), id, 0, true, false)
	require.NoError(t, err)

	inc = product.FreeQuotaSize * 2
	sizeTotal += inc
	unitsTotal += getUnits(inc, product)
	_, err = c.IncCustomerUsage(context.Background(), key, map[string]int64{test.key: inc})
	require.NoError(t, err)

	err = c.ReportCustomerUsage(context.Background(), key)
	require.NoError(t, err)

	res, err := c.GetCustomerUsage(context.Background(), key)
	require.NoError(t, err)
	assert.NotEmpty(t, res.Usage)
	assert.Equal(t, sizeTotal, res.Usage[test.key].Total)
	assert.Equal(t, unitsTotal, res.Usage[test.key].Units)
	assert.Equal(t, getCost(unitsTotal, product, test.unitPrice), res.Usage[test.key].Cost)
}

func TestClient_IncCustomerUsage(t *testing.T) {
	tests := []usageTest{
		{"stored_data", mib, 0.000007705471},
		{"network_egress", mib, 0.000025684903},
		{"instance_reads", 1, 0.000099999999},
		{"instance_writes", 1, 0.000199999999},
	}
	for _, tt := range tests {
		incCustomerUsage(t, tt)
	}
}

func incCustomerUsage(t *testing.T, test usageTest) {
	c := setup(t)
	key := newKey(t)
	email := apitest.NewEmail()
	username := apitest.NewUsername()
	id, err := c.CreateCustomer(context.Background(), key, email, username, mdb.Dev)
	require.NoError(t, err)

	childKey := newKey(t)
	_, err = c.CreateCustomer(
		context.Background(),
		childKey,
		apitest.NewEmail(),
		apitest.NewUsername(),
		mdb.User,
		client.WithParent(key, email, mdb.Dev),
	)
	require.NoError(t, err)

	product := getProduct(t, test.key)
	var inc, sizeTotal, unitsTotal int64

	// Add some under unit size
	inc = test.initialIncSize
	sizeTotal += inc
	unitsTotal += getUnits(inc, product)
	res, err := c.IncCustomerUsage(context.Background(), key, map[string]int64{test.key: inc})
	require.NoError(t, err)
	assert.Equal(t, sizeTotal, res.DailyUsage[test.key].Total)
	assert.Equal(t, unitsTotal, res.DailyUsage[test.key].Units)
	assert.Equal(t, getCost(unitsTotal, product, test.unitPrice), res.DailyUsage[test.key].Cost)

	// Add more to reach unit size
	inc = product.UnitSize - test.initialIncSize
	sizeTotal += inc
	unitsTotal += getUnits(inc, product)
	res, err = c.IncCustomerUsage(context.Background(), key, map[string]int64{test.key: inc})
	require.NoError(t, err)
	assert.Equal(t, sizeTotal, res.DailyUsage[test.key].Total)
	assert.Equal(t, unitsTotal, res.DailyUsage[test.key].Units)
	assert.Equal(t, getCost(unitsTotal, product, test.unitPrice), res.DailyUsage[test.key].Cost)

	// Add a bunch of units above free quota (should error)
	inc = product.FreeQuotaSize
	sizeTotal += inc
	unitsTotal += getUnits(inc, product)
	res, err = c.IncCustomerUsage(context.Background(), key, map[string]int64{test.key: inc})
	require.Error(t, err)

	// Add some more as a child (should error since parent is above free quota)
	// Child should only see their usage, but it should also be accrued on the parent
	childInc := product.UnitSize
	childSizeTotal := childInc
	childUnitsTotal := getUnits(childInc, product)
	inc = childInc
	sizeTotal += inc
	unitsTotal += getUnits(inc, product)
	res, err = c.IncCustomerUsage(context.Background(), childKey, map[string]int64{test.key: childInc})
	require.Error(t, err)

	// Flag parent as billable to remove the free quota limit
	err = c.UpdateCustomer(context.Background(), id, 0, true, false)
	require.NoError(t, err)

	// Try again
	inc = product.FreeQuotaSize
	sizeTotal += inc
	unitsTotal += getUnits(inc, product)
	res, err = c.IncCustomerUsage(context.Background(), key, map[string]int64{test.key: inc})
	require.NoError(t, err)
	assert.Equal(t, sizeTotal, res.DailyUsage[test.key].Total)
	assert.Equal(t, unitsTotal, res.DailyUsage[test.key].Units)
	assert.Equal(t, getCost(unitsTotal, product, test.unitPrice), res.DailyUsage[test.key].Cost)

	// Try again as a child
	childInc = product.UnitSize
	childSizeTotal += childInc
	childUnitsTotal += getUnits(childInc, product)
	inc = childInc
	sizeTotal += inc
	unitsTotal += getUnits(inc, product)
	res, err = c.IncCustomerUsage(context.Background(), childKey, map[string]int64{test.key: childInc})
	require.NoError(t, err)
	assert.Equal(t, childSizeTotal, res.DailyUsage[test.key].Total)
	assert.Equal(t, childUnitsTotal, res.DailyUsage[test.key].Units)
	assert.Equal(t, getCost(childUnitsTotal, product, test.unitPrice), res.DailyUsage[test.key].Cost)

	// Bump child to over _their_ free quota limit, since parent is billing, they should not see an error
	childInc = product.FreeQuotaSize
	childSizeTotal += childInc
	childUnitsTotal += getUnits(childInc, product)
	inc = childInc
	sizeTotal += inc
	unitsTotal += getUnits(inc, product)
	res, err = c.IncCustomerUsage(context.Background(), childKey, map[string]int64{test.key: childInc})
	require.NoError(t, err)
	assert.Equal(t, childSizeTotal, res.DailyUsage[test.key].Total)
	assert.Equal(t, childUnitsTotal, res.DailyUsage[test.key].Units)
	assert.Equal(t, getCost(childUnitsTotal, product, test.unitPrice), res.DailyUsage[test.key].Cost)

	// Check total usage
	cus, err := c.GetCustomer(context.Background(), key)
	require.NoError(t, err)
	assert.Equal(t, sizeTotal, cus.DailyUsage[test.key].Total)
	assert.Equal(t, unitsTotal, cus.DailyUsage[test.key].Units)
	assert.Equal(t, getCost(unitsTotal, product, test.unitPrice), cus.DailyUsage[test.key].Cost)
}

func getProduct(t *testing.T, key string) *service.Product {
	for _, p := range service.Products {
		if p.Key == key {
			return &p
		}
	}
	t.Fatalf("could not find product with key %s", key)
	return nil
}

func getUnits(size int64, product *service.Product) int64 {
	return int64(math.Round(float64(size) / float64(product.UnitSize)))
}

func getCost(units int64, product *service.Product, price float64) float64 {
	paidUnits := units - getUnits(product.FreeQuotaSize, product)
	if paidUnits < 0 {
		return 0
	}
	return float64(paidUnits) * price
}

func setup(t *testing.T) *client.Client {
	bconf := apitest.DefaultBillingConfig(t)
	bconf.FreeQuotaGracePeriod = 0
	bconf.DBURI = test.GetMongoUri()
	apitest.MakeBillingWithConfig(t, bconf)

	billingApi, err := tutil.TCPAddrFromMultiAddr(bconf.ListenAddr)
	require.NoError(t, err)
	c, err := client.NewClient(billingApi, grpc.WithInsecure())
	require.NoError(t, err)

	t.Cleanup(func() {
		err := c.Close()
		require.NoError(t, err)
	})
	return c
}

func newKey(t *testing.T) thread.PubKey {
	_, key, err := crypto.GenerateEd25519Key(rand.Reader)
	require.NoError(t, err)
	return thread.NewLibp2pPubKey(key)
}


================================================
FILE: api/billingd/client/options.go
================================================
package client

import (
	"github.com/textileio/go-threads/core/thread"
	mdb "github.com/textileio/textile/v2/mongodb"
)

type options struct {
	parentKey         thread.PubKey
	parentEmail       string
	parentAccountType mdb.AccountType
}

type Option func(*options)

// WithParent is used to create a billing hierarchy between two customers.
func WithParent(key thread.PubKey, email string, accountType mdb.AccountType) Option {
	return func(args *options) {
		args.parentKey = key
		args.parentEmail = email
		args.parentAccountType = accountType
	}
}

type listOptions struct {
	offset int64
	limit  int64
}

type ListOption func(*listOptions)

// WithOffset is used to fetch the next page when paginating.
func WithOffset(offset int64) ListOption {
	return func(args *listOptions) {
		args.offset = offset
	}
}

// WithLimit is used to set a page size when paginating.
func WithLimit(limit int64) ListOption {
	return func(args *listOptions) {
		args.limit = limit
	}
}


================================================
FILE: api/billingd/common/common.go
================================================
package common

import (
	"errors"
	"fmt"

	stripe "github.com/stripe/stripe-go/v72"
)

var (
	// ErrExceedsFreeQuota indicates the requested operation exceeds the free quota.
	ErrExceedsFreeQuota = errors.New("request exceeds free quota")

	// ErrSubscriptionExists indicates the subscription already exists and has a healthy status.
	ErrSubscriptionExists = errors.New("subscription exists")

	// ErrSubscriptionCanceled indicates the subscription was canceled by the user or as a result of failed payment.
	ErrSubscriptionCanceled = errors.New("subscription canceled")

	// ErrSubscriptionPaymentRequired indicates the subscription is in a terminal status as a result of failed payment.
	ErrSubscriptionPaymentRequired = errors.New("subscription payment required")
)

// StatusCheck returns a non-nil error if the subscription status is considered healthy.
func StatusCheck(status string) error {
	switch stripe.SubscriptionStatus(status) {
	case stripe.SubscriptionStatusActive,
		stripe.SubscriptionStatusIncomplete:
		return nil
	case stripe.SubscriptionStatusCanceled:
		return ErrSubscriptionCanceled
	case stripe.SubscriptionStatusIncompleteExpired,
		stripe.SubscriptionStatusPastDue,
		stripe.SubscriptionStatusUnpaid:
		return ErrSubscriptionPaymentRequired
	default:
		return fmt.Errorf("unhandled subscription status: %s", status)
	}
}


================================================
FILE: api/billingd/gateway/gateway.go
================================================
package gateway

import (
	"context"
	"encoding/json"
	"io/ioutil"
	"net/http"
	"strings"
	"time"

	"github.com/gin-contrib/pprof"
	"github.com/gin-gonic/gin"
	logging "github.com/ipfs/go-log/v2"
	ma "github.com/multiformats/go-multiaddr"
	stripe "github.com/stripe/stripe-go/v72"
	"github.com/stripe/stripe-go/v72/webhook"
	tutil "github.com/textileio/go-threads/util"
	billing "github.com/textileio/textile/v2/api/billingd/client"
	"github.com/textileio/textile/v2/api/common"
	"go.mongodb.org/mongo-driver/mongo"
	"google.golang.org/grpc"
)

var log = logging.Logger("billing.gateway")

const handlerTimeout = time.Minute

func init() {
	gin.SetMode(gin.ReleaseMode)
}

// Gateway provides an endpoint for Stripe webhooks.
type Gateway struct {
	addr                ma.Multiaddr
	server              *http.Server
	client              *billing.Client
	stripeWebhookSecret string
}

// Config defines the gateway configuration.
type Config struct {
	Addr                ma.Multiaddr
	APIAddr             ma.Multiaddr
	StripeWebhookSecret string
	SegmentAPIKey       string
	Debug               bool
}

// NewGateway returns a new gateway.
func NewGateway(conf Config) (*Gateway, error) {
	if conf.Debug {
		if err := tutil.SetLogLevels(map[string]logging.LogLevel{
			"billing.gateway": logging.LevelDebug,
			"billing.client":  logging.LevelDebug,
		}); err != nil {
			return nil, err
		}
	}
	apiTarget, err := tutil.TCPAddrFromMultiAddr(conf.APIAddr)
	if err != nil {
		return nil, err
	}
	client, err := billing.NewClient(
		apiTarget,
		grpc.WithInsecure(),
		grpc.WithPerRPCCredentials(common.Credentials{}),
	)
	if err != nil {
		return nil, err
	}
	return &Gateway{
		addr:                conf.Addr,
		client:              client,
		stripeWebhookSecret: conf.StripeWebhookSecret,
	}, nil
}

// Start the gateway.
func (g *Gateway) Start() {
	addr, err := tutil.TCPAddrFromMultiAddr(g.addr)
	if err != nil {
		log.Fatal(err)
	}

	router := gin.Default()
	pprof.Register(router)
	router.GET("/health", func(c *gin.Context) {
		c.Writer.WriteHeader(http.StatusOK)
	})
	router.POST("/webhooks", g.webhookHandler)

	g.server = &http.Server{
		Addr:    addr,
		Handler: router,
	}
	go func() {
		if err := g.server.ListenAndServe(); err != nil && err != http.ErrServerClosed {
			log.Fatalf("gateway error: %s", err)
		}
		log.Info("gateway was shutdown")
	}()
	log.Infof("gateway listening at %s", g.server.Addr)
}

// Addr returns the gateway's address.
func (g *Gateway) Addr() string {
	return g.server.Addr
}

// Stop the gateway.
func (g *Gateway) Stop() error {
	ctx, cancel := context.WithTimeout(context.Background(), time.Second)
	defer cancel()
	if err := g.server.Shutdown(ctx); err != nil {
		return err
	}
	if err := g.client.Close(); err != nil {
		return err
	}
	return nil
}

const webhookMaxBodyBytes = int64(65536) // 64 KiB

// webhookHandler handles stripe webhook events
func (g *Gateway) webhookHandler(c *gin.Context) {
	c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, webhookMaxBodyBytes)
	payload, err := ioutil.ReadAll(c.Request.Body)
	if err != nil {
		log.Errorf("reading request body: %v", err)
		c.Status(http.StatusBadRequest)
		return
	}

	event := stripe.Event{}
	if g.stripeWebhookSecret != "" {
		event, err = webhook.ConstructEvent(payload, c.Request.Header.Get("Stripe-Signature"), g.stripeWebhookSecret)
		if err != nil {
			log.Errorf("verifying webhook signature: %v", err)
			c.Status(http.StatusBadRequest)
			return
		}
	}

	log.Debugf("received event type: %s", event.Type)
	switch event.Type {
	case "customer.updated":
		var cus stripe.Customer
		if err := json.Unmarshal(event.Data.Raw, &cus); err != nil {
			log.Errorf("parsing webhook JSON: %v", err)
			c.Status(http.StatusBadRequest)
			return
		}
		var billable bool
		if !cus.Deleted {
			if cus.InvoiceSettings.DefaultPaymentMethod != nil {
				billable = true
			} else if cus.DefaultSource != nil && !cus.DefaultSource.Deleted {
				billable = true
			}
		}
		ctx, cancel := context.WithTimeout(context.Background(), handlerTimeout)
		defer cancel()
		if err := g.client.UpdateCustomer(ctx, cus.ID, cus.Balance, billable, cus.Delinquent); err != nil {
			// This webhook receives events from all deployments (production and staging),
			// which leads to a lot of "customer not found" errors.
			// To avoid this, we'll need a Stripe account for each deployment.
			// See https://github.com/textileio/textile/issues/523.
			if !strings.Contains(err.Error(), mongo.ErrNoDocuments.Error()) {
				log.Errorf("updating customer: %v", err)
			}
			c.Status(http.StatusOK)
			return
		}
		log.Debugf("%s was updated", cus.ID)
	case "customer.deleted":
		// @todo: Does this need to be handled?
	case "customer.subscription.updated",
		"customer.subscription.deleted":
		var sub stripe.Subscription
		err := json.Unmarshal(event.Data.Raw, &sub)
		if err != nil {
			log.Errorf("parsing webhook JSON: %v", err)
			c.Status(http.StatusBadRequest)
			return
		}
		ctx, cancel := context.WithTimeout(context.Background(), handlerTimeout)
		defer cancel()
		if err := g.client.UpdateCustomerSubscription(
			ctx,
			sub.Customer.ID,
			sub.Status,
			sub.CurrentPeriodStart,
			sub.CurrentPeriodEnd,
		); err != nil {
			// This webhook receives events from all deployments (production and staging),
			// which leads to a lot of "customer not found" errors.
			// To avoid this, we'll need a Stripe account for each deployment.
			// See https://github.com/textileio/textile/issues/523.
			if !strings.Contains(err.Error(), mongo.ErrNoDocuments.Error()) {
				log.Errorf("updating customer subscription: %v", err)
			}
			c.Status(http.StatusOK)
			return
		}
		log.Debugf("%s subscription was updated", sub.ID)
	}

	c.Status(http.StatusOK)
}


================================================
FILE: api/billingd/main.go
================================================
package main

import (
	"context"
	"encoding/json"
	"fmt"
	"time"

	logging "github.com/ipfs/go-log/v2"
	"github.com/spf13/cobra"
	"github.com/spf13/viper"
	"github.com/textileio/go-threads/util"
	"github.com/textileio/textile/v2/api/billingd/service"
	"github.com/textileio/textile/v2/cmd"
)

const daemonName = "billingd"

var (
	log = logging.Logger(daemonName)

	config = &cmd.Config{
		Viper: viper.New(),
		Dir:   "." + daemonName,
		Name:  "config",
		Flags: map[string]cmd.Flag{
			"debug": {
				Key:      "log.debug",
				DefValue: false,
			},
			"logFile": {
				Key:      "log.file",
				DefValue: "", // no log file
			},
			"addrApi": {
				Key:      "addr.api",
				DefValue: "/ip4/127.0.0.1/tcp/10006",
			},
			"addrMongoUri": {
				Key:      "addr.mongo_uri",
				DefValue: "mongodb://127.0.0.1:27017",
			},
			"addrMongoName": {
				Key:      "addr.mongo_name",
				DefValue: "textile_billing",
			},
			"addrGatewayHost": {
				Key:      "addr.gateway.host",
				DefValue: "/ip4/127.0.0.1/tcp/8010",
			},
			"stripeApiUrl": {
				Key:      "stripe.api_url",
				DefValue: "https://api.stripe.com",
			},
			"stripeApiKey": {
				Key:      "stripe.api_key",
				DefValue: "",
			},
			"stripeSessionReturnUrl": {
				Key:      "stripe.session_return_url",
				DefValue: "http://127.0.0.1:8006/dashboard",
			},
			"stripeWebhookSecret": {
				Key:      "stripe.webhook_secret",
				DefValue: "",
			},
			"segmentApiKey": {
				Key:      "segment.api_key",
				DefValue: "",
			},
			"segmentPrefix": {
				Key:      "segment.prefix",
				DefValue: "",
			},
			"freeQuotaGracePeriod": {
				Key:      "free_quota_grace_period",
				DefValue: time.Hour * 24 * 7,
			},
		},
		EnvPre: "BILLING",
		Global: true,
	}
)

func init() {
	cobra.OnInitialize(cmd.InitConfig(config))
	cmd.InitConfigCmd(rootCmd, config.Viper, config.Dir)

	rootCmd.PersistentFlags().StringVar(
		&config.File,
		"config",
		"",
		"Config file (default ${HOME}/"+config.Dir+"/"+config.Name+".yml)")
	rootCmd.PersistentFlags().BoolP(
		"debug",
		"d",
		config.Flags["debug"].DefValue.(bool),
		"Enable debug logging")
	rootCmd.PersistentFlags().String(
		"logFile",
		config.Flags["logFile"].DefValue.(string),
		"Write logs to file")

	// Address settings
	rootCmd.PersistentFlags().String(
		"addrApi",
		config.Flags["addrApi"].DefValue.(string),
		"Hub API listen address")
	rootCmd.PersistentFlags().String(
		"addrMongoUri",
		config.Flags["addrMongoUri"].DefValue.(string),
		"MongoDB connection URI")
	rootCmd.PersistentFlags().String(
		"addrMongoName",
		config.Flags["addrMongoName"].DefValue.(string),
		"MongoDB database name")
	rootCmd.PersistentFlags().String(
		"addrGatewayHost",
		config.Flags["addrGatewayHost"].DefValue.(string),
		"Local gateway host address")

	// Stripe settings
	rootCmd.PersistentFlags().String(
		"stripeApiUrl",
		config.Flags["stripeApiUrl"].DefValue.(string),
		"Stripe API URL")
	rootCmd.PersistentFlags().String(
		"stripeApiKey",
		config.Flags["stripeApiKey"].DefValue.(string),
		"Stripe API secret key")
	rootCmd.PersistentFlags().String(
		"stripeSessionReturnUrl",
		config.Flags["stripeSessionReturnUrl"].DefValue.(string),
		"Stripe portal session return URL")
	rootCmd.PersistentFlags().String(
		"stripeWebhookSecret",
		config.Flags["stripeWebhookSecret"].DefValue.(string),
		"Stripe webhook endpoint secret")

	rootCmd.PersistentFlags().Duration(
		"freeQuotaGracePeriod",
		config.Flags["freeQuotaGracePeriod"].DefValue.(time.Duration),
		"Grace period before blocking usage after free quota is exhausted")

	// Segment settings
	rootCmd.PersistentFlags().String(
		"segmentApiKey",
		config.Flags["segmentApiKey"].DefValue.(string),
		"Segment API key")
	rootCmd.PersistentFlags().String(
		"segmentPrefix",
		config.Flags["segmentPrefix"].DefValue.(string),
		"Segment trait source prefix")

	err := cmd.BindFlags(config.Viper, rootCmd, config.Flags)
	cmd.ErrCheck(err)
}

func main() {
	cmd.ErrCheck(rootCmd.Execute())
}

var rootCmd = &cobra.Command{
	Use:   daemonName,
	Short: "Billing daemon",
	Long:  `Textile's billing daemon.`,
	PersistentPreRun: func(c *cobra.Command, args []string) {
		config.Viper.SetConfigType("yaml")
		cmd.ExpandConfigVars(config.Viper, config.Flags)

		if config.Viper.GetBool("log.debug") {
			err := util.SetLogLevels(map[string]logging.LogLevel{
				daemonName: logging.LevelDebug,
			})
			cmd.ErrCheck(err)
		}
	},
	Run: func(c *cobra.Command, args []string) {
		settings, err := json.MarshalIndent(config.Viper.AllSettings(), "", "  ")
		cmd.ErrCheck(err)
		log.Debugf("loaded config: %s", string(settings))

		addrApi := cmd.AddrFromStr(config.Viper.GetString("addr.api"))
		addrMongoUri := config.Viper.GetString("addr.mongo_uri")
		addrMongoName := config.Viper.GetString("addr.mongo_name")

		addrGatewayHost := cmd.AddrFromStr(config.Viper.GetString("addr.gateway.host"))

		stripeApiUrl := config.Viper.GetString("stripe.api_url")
		stripeApiKey := config.Viper.GetString("stripe.api_key")
		stripeSessionReturnUrl := config.Viper.GetString("stripe.session_return_url")
		stripeWebhookSecret := config.Viper.GetString("stripe.webhook_secret")

		freeQuotaGracePeriod := config.Viper.GetDuration("free_quota_grace_period")

		segmentApiKey := config.Viper.GetString("segment.api_key")
		segmentPrefix := config.Viper.GetString("segment.prefix")

		logFile := config.Viper.GetString("log.file")
		err = cmd.SetupDefaultLoggingConfig(logFile)
		cmd.ErrCheck(err)

		ctx, cancel := context.WithCancel(context.Background())
		defer cancel()
		api, err := service.NewService(ctx, service.Config{
			ListenAddr:             addrApi,
			StripeAPIURL:           stripeApiUrl,
			StripeAPIKey:           stripeApiKey,
			StripeSessionReturnURL: stripeSessionReturnUrl,
			StripeWebhookSecret:    stripeWebhookSecret,
			SegmentAPIKey:          segmentApiKey,
			SegmentPrefix:          segmentPrefix,
			DBURI:                  addrMongoUri,
			DBName:                 addrMongoName,
			GatewayHostAddr:        addrGatewayHost,
			FreeQuotaGracePeriod:   freeQuotaGracePeriod,
			Debug:                  config.Viper.GetBool("log.debug"),
		})
		cmd.ErrCheck(err)

		err = api.Start()
		cmd.ErrCheck(err)

		fmt.Println("Welcome to Hub Billing!")

		cmd.HandleInterrupt(func() {
			if err := api.Stop(); err != nil {
				fmt.Println(err.Error())
			}
		})
	},
}


================================================
FILE: api/billingd/migrations/migrations.go
================================================
package migrations

import (
	"context"
	"time"

	logging "github.com/ipfs/go-log/v2"
	migrate "github.com/xakep666/mongo-migrate"
	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/mongo"
	"go.mongodb.org/mongo-driver/mongo/options"
)

var (
	log            = logging.Logger("migrations")
	migrateTimeout = time.Hour
)

var m001 = migrate.Migration{
	Version:     1,
	Description: "make customer_id index sparse",
	Up: func(db *mongo.Database) error {
		log.Info("migrating 001 up")
		ctx, cancel := context.WithTimeout(context.Background(), migrateTimeout)
		defer cancel()
		count, err := db.Collection("customers").CountDocuments(ctx, bson.M{})
		if err != nil {
			return err
		}
		if count == 0 {
			return nil // namespace doesn't exist
		}
		_, err = db.Collection("customers").Indexes().DropOne(ctx, "customer_id_1")
		if err != nil {
			return err
		}
		_, err = db.Collection("customers").Indexes().CreateOne(ctx, mongo.IndexModel{
			Keys:    bson.D{{"customer_id", 1}},
			Options: options.Index().SetUnique(true).SetSparse(true),
		})
		return err
	},
	Down: func(db *mongo.Database) error {
		log.Info("migrating 001 down")
		ctx, cancel := context.WithTimeout(context.Background(), migrateTimeout)
		defer cancel()
		count, err := db.Collection("customers").CountDocuments(ctx, bson.M{})
		if err != nil {
			return err
		}
		if count == 0 {
			return nil // namespace doesn't exist
		}
		_, err = db.Collection("customers").Indexes().DropOne(ctx, "customer_id_1")
		if err != nil {
			return err
		}
		_, err = db.Collection("customers").Indexes().CreateOne(ctx, mongo.IndexModel{
			Keys:    bson.D{{"customer_id", 1}},
			Options: options.Index().SetUnique(true),
		})
		return err
	},
}

func Migrate(db *mongo.Database) error {
	m := migrate.NewMigrate(
		db,
		m001,
	)
	return m.Up(migrate.AllAvailable)
}


================================================
FILE: api/billingd/migrations/migrations_test.go
================================================
package migrations

import (
	"context"
	"os"
	"testing"

	"github.com/stretchr/testify/require"
	"github.com/textileio/go-ds-mongo/test"
	migrate "github.com/xakep666/mongo-migrate"
	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/mongo"
	"go.mongodb.org/mongo-driver/mongo/options"
)

func TestMain(m *testing.M) {
	cleanup := func() {}
	if os.Getenv("SKIP_SERVICES") != "true" {
		cleanup = test.StartMongoDB()
	}
	exitVal := m.Run()
	cleanup()
	os.Exit(exitVal)
}

// Test make customer_id index sparse
func TestMigrations_m001(t *testing.T) {
	ctx := context.Background()
	db := setup(t, ctx)

	// Preload collection
	_, err := db.Collection("customers").Indexes().CreateOne(ctx, mongo.IndexModel{
		Keys:    bson.D{{"customer_id", 1}},
		Options: options.Index().SetUnique(true),
	})
	require.NoError(t, err)
	_, err = db.Collection("customers").InsertMany(ctx, []interface{}{
		bson.M{"customer_id": "one"},
		bson.M{"customer_id": "two"},
		bson.M{"customer_id": "three"},
	})
	require.NoError(t, err)

	// Test that nil customer_id causes duplicate key error
	docs := []interface{}{
		bson.M{"foo": 1}, // nil customer_id
		bson.M{"bar": 1}, // nil customer_id
	}
	_, err = db.Collection("customers").InsertMany(ctx, docs)
	require.Error(t, err) // Duplicate key error

	// Run up
	err = migrate.NewMigrate(db, m001).Up(migrate.AllAvailable)
	require.NoError(t, err)

	// No duplicate key error this time
	_, err = db.Collection("customers").InsertMany(ctx, docs)
	require.NoError(t, err)

	// Clean up
	_, err = db.Collection("customers").DeleteMany(ctx, bson.M{})
	require.NoError(t, err)

	// Run down
	err = migrate.NewMigrate(db, m001).Down(migrate.AllAvailable)
	require.NoError(t, err)
}

func setup(t *testing.T, ctx context.Context) *mongo.Database {
	client, err := mongo.Connect(ctx, options.Client().ApplyURI(test.GetMongoUri()))
	require.NoError(t, err)
	db := client.Database("test_billing_migrations")
	t.Cleanup(func() {
		err := db.Drop(ctx)
		require.NoError(t, err)
	})
	return db
}


================================================
FILE: api/billingd/pb/billingd.pb.go
================================================
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.23.0
// 	protoc        v3.13.0
// source: api/billingd/pb/billingd.proto

package pb

import (
	context "context"
	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4

type Period struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	UnixStart int64 `protobuf:"varint,1,opt,name=unix_start,json=unixStart,proto3" json:"unix_start,omitempty"`
	UnixEnd   int64 `protobuf:"varint,2,opt,name=unix_end,json=unixEnd,proto3" json:"unix_end,omitempty"`
}

func (x *Period) Reset() {
	*x = Period{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *Period) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Period) ProtoMessage() {}

func (x *Period) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Period.ProtoReflect.Descriptor instead.
func (*Period) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{0}
}

func (x *Period) GetUnixStart() int64 {
	if x != nil {
		return x.UnixStart
	}
	return 0
}

func (x *Period) GetUnixEnd() int64 {
	if x != nil {
		return x.UnixEnd
	}
	return 0
}

type Usage struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Description string  `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	Units       int64   `protobuf:"varint,2,opt,name=units,proto3" json:"units,omitempty"`
	Total       int64   `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
	Free        int64   `protobuf:"varint,4,opt,name=free,proto3" json:"free,omitempty"`
	Grace       int64   `protobuf:"varint,5,opt,name=grace,proto3" json:"grace,omitempty"`
	Cost        float64 `protobuf:"fixed64,6,opt,name=cost,proto3" json:"cost,omitempty"`
	Period      *Period `protobuf:"bytes,7,opt,name=period,proto3" json:"period,omitempty"`
}

func (x *Usage) Reset() {
	*x = Usage{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[1]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *Usage) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Usage) ProtoMessage() {}

func (x *Usage) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[1]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Usage.ProtoReflect.Descriptor instead.
func (*Usage) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{1}
}

func (x *Usage) GetDescription() string {
	if x != nil {
		return x.Description
	}
	return ""
}

func (x *Usage) GetUnits() int64 {
	if x != nil {
		return x.Units
	}
	return 0
}

func (x *Usage) GetTotal() int64 {
	if x != nil {
		return x.Total
	}
	return 0
}

func (x *Usage) GetFree() int64 {
	if x != nil {
		return x.Free
	}
	return 0
}

func (x *Usage) GetGrace() int64 {
	if x != nil {
		return x.Grace
	}
	return 0
}

func (x *Usage) GetCost() float64 {
	if x != nil {
		return x.Cost
	}
	return 0
}

func (x *Usage) GetPeriod() *Period {
	if x != nil {
		return x.Period
	}
	return nil
}

type CheckHealthRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *CheckHealthRequest) Reset() {
	*x = CheckHealthRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[2]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *CheckHealthRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CheckHealthRequest) ProtoMessage() {}

func (x *CheckHealthRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[2]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CheckHealthRequest.ProtoReflect.Descriptor instead.
func (*CheckHealthRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{2}
}

type CheckHealthResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *CheckHealthResponse) Reset() {
	*x = CheckHealthResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[3]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *CheckHealthResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CheckHealthResponse) ProtoMessage() {}

func (x *CheckHealthResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[3]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CheckHealthResponse.ProtoReflect.Descriptor instead.
func (*CheckHealthResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{3}
}

type CreateCustomerRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Customer *CreateCustomerRequest_Params `protobuf:"bytes,1,opt,name=customer,proto3" json:"customer,omitempty"`
	Parent   *CreateCustomerRequest_Params `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"`
}

func (x *CreateCustomerRequest) Reset() {
	*x = CreateCustomerRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[4]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *CreateCustomerRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CreateCustomerRequest) ProtoMessage() {}

func (x *CreateCustomerRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[4]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CreateCustomerRequest.ProtoReflect.Descriptor instead.
func (*CreateCustomerRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{4}
}

func (x *CreateCustomerRequest) GetCustomer() *CreateCustomerRequest_Params {
	if x != nil {
		return x.Customer
	}
	return nil
}

func (x *CreateCustomerRequest) GetParent() *CreateCustomerRequest_Params {
	if x != nil {
		return x.Parent
	}
	return nil
}

type CreateCustomerResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
}

func (x *CreateCustomerResponse) Reset() {
	*x = CreateCustomerResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[5]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *CreateCustomerResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CreateCustomerResponse) ProtoMessage() {}

func (x *CreateCustomerResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[5]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CreateCustomerResponse.ProtoReflect.Descriptor instead.
func (*CreateCustomerResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{5}
}

func (x *CreateCustomerResponse) GetCustomerId() string {
	if x != nil {
		return x.CustomerId
	}
	return ""
}

type GetCustomerRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (x *GetCustomerRequest) Reset() {
	*x = GetCustomerRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[6]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *GetCustomerRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCustomerRequest) ProtoMessage() {}

func (x *GetCustomerRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[6]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetCustomerRequest.ProtoReflect.Descriptor instead.
func (*GetCustomerRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{6}
}

func (x *GetCustomerRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

type GetCustomerResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key                string            `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	CustomerId         string            `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
	ParentKey          string            `protobuf:"bytes,3,opt,name=parent_key,json=parentKey,proto3" json:"parent_key,omitempty"`
	Email              string            `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	AccountType        int32             `protobuf:"varint,5,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"`
	AccountStatus      string            `protobuf:"bytes,6,opt,name=account_status,json=accountStatus,proto3" json:"account_status,omitempty"`
	SubscriptionStatus string            `protobuf:"bytes,7,opt,name=subscription_status,json=subscriptionStatus,proto3" json:"subscription_status,omitempty"`
	Balance            int64             `protobuf:"varint,8,opt,name=balance,proto3" json:"balance,omitempty"`
	Billable           bool              `protobuf:"varint,9,opt,name=billable,proto3" json:"billable,omitempty"`
	Delinquent         bool              `protobuf:"varint,10,opt,name=delinquent,proto3" json:"delinquent,omitempty"`
	CreatedAt          int64             `protobuf:"varint,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	GracePeriodEnd     int64             `protobuf:"varint,12,opt,name=grace_period_end,json=gracePeriodEnd,proto3" json:"grace_period_end,omitempty"`
	InvoicePeriod      *Period           `protobuf:"bytes,13,opt,name=invoice_period,json=invoicePeriod,proto3" json:"invoice_period,omitempty"`
	DailyUsage         map[string]*Usage `protobuf:"bytes,14,rep,name=daily_usage,json=dailyUsage,proto3" json:"daily_usage,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	Dependents         int64             `protobuf:"varint,15,opt,name=dependents,proto3" json:"dependents,omitempty"`
}

func (x *GetCustomerResponse) Reset() {
	*x = GetCustomerResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[7]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *GetCustomerResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCustomerResponse) ProtoMessage() {}

func (x *GetCustomerResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[7]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetCustomerResponse.ProtoReflect.Descriptor instead.
func (*GetCustomerResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{7}
}

func (x *GetCustomerResponse) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *GetCustomerResponse) GetCustomerId() string {
	if x != nil {
		return x.CustomerId
	}
	return ""
}

func (x *GetCustomerResponse) GetParentKey() string {
	if x != nil {
		return x.ParentKey
	}
	return ""
}

func (x *GetCustomerResponse) GetEmail() string {
	if x != nil {
		return x.Email
	}
	return ""
}

func (x *GetCustomerResponse) GetAccountType() int32 {
	if x != nil {
		return x.AccountType
	}
	return 0
}

func (x *GetCustomerResponse) GetAccountStatus() string {
	if x != nil {
		return x.AccountStatus
	}
	return ""
}

func (x *GetCustomerResponse) GetSubscriptionStatus() string {
	if x != nil {
		return x.SubscriptionStatus
	}
	return ""
}

func (x *GetCustomerResponse) GetBalance() int64 {
	if x != nil {
		return x.Balance
	}
	return 0
}

func (x *GetCustomerResponse) GetBillable() bool {
	if x != nil {
		return x.Billable
	}
	return false
}

func (x *GetCustomerResponse) GetDelinquent() bool {
	if x != nil {
		return x.Delinquent
	}
	return false
}

func (x *GetCustomerResponse) GetCreatedAt() int64 {
	if x != nil {
		return x.CreatedAt
	}
	return 0
}

func (x *GetCustomerResponse) GetGracePeriodEnd() int64 {
	if x != nil {
		return x.GracePeriodEnd
	}
	return 0
}

func (x *GetCustomerResponse) GetInvoicePeriod() *Period {
	if x != nil {
		return x.InvoicePeriod
	}
	return nil
}

func (x *GetCustomerResponse) GetDailyUsage() map[string]*Usage {
	if x != nil {
		return x.DailyUsage
	}
	return nil
}

func (x *GetCustomerResponse) GetDependents() int64 {
	if x != nil {
		return x.Dependents
	}
	return 0
}

type ListDependentCustomersRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key    string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Offset int64  `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit  int64  `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
}

func (x *ListDependentCustomersRequest) Reset() {
	*x = ListDependentCustomersRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[8]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *ListDependentCustomersRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ListDependentCustomersRequest) ProtoMessage() {}

func (x *ListDependentCustomersRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[8]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ListDependentCustomersRequest.ProtoReflect.Descriptor instead.
func (*ListDependentCustomersRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{8}
}

func (x *ListDependentCustomersRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *ListDependentCustomersRequest) GetOffset() int64 {
	if x != nil {
		return x.Offset
	}
	return 0
}

func (x *ListDependentCustomersRequest) GetLimit() int64 {
	if x != nil {
		return x.Limit
	}
	return 0
}

type ListDependentCustomersResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Customers  []*GetCustomerResponse `protobuf:"bytes,1,rep,name=customers,proto3" json:"customers,omitempty"`
	NextOffset int64                  `protobuf:"varint,2,opt,name=next_offset,json=nextOffset,proto3" json:"next_offset,omitempty"`
}

func (x *ListDependentCustomersResponse) Reset() {
	*x = ListDependentCustomersResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[9]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *ListDependentCustomersResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ListDependentCustomersResponse) ProtoMessage() {}

func (x *ListDependentCustomersResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[9]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ListDependentCustomersResponse.ProtoReflect.Descriptor instead.
func (*ListDependentCustomersResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{9}
}

func (x *ListDependentCustomersResponse) GetCustomers() []*GetCustomerResponse {
	if x != nil {
		return x.Customers
	}
	return nil
}

func (x *ListDependentCustomersResponse) GetNextOffset() int64 {
	if x != nil {
		return x.NextOffset
	}
	return 0
}

type GetCustomerSessionRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (x *GetCustomerSessionRequest) Reset() {
	*x = GetCustomerSessionRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[10]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *GetCustomerSessionRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCustomerSessionRequest) ProtoMessage() {}

func (x *GetCustomerSessionRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[10]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetCustomerSessionRequest.ProtoReflect.Descriptor instead.
func (*GetCustomerSessionRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{10}
}

func (x *GetCustomerSessionRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

type GetCustomerSessionResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
}

func (x *GetCustomerSessionResponse) Reset() {
	*x = GetCustomerSessionResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[11]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *GetCustomerSessionResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCustomerSessionResponse) ProtoMessage() {}

func (x *GetCustomerSessionResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[11]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetCustomerSessionResponse.ProtoReflect.Descriptor instead.
func (*GetCustomerSessionResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{11}
}

func (x *GetCustomerSessionResponse) GetUrl() string {
	if x != nil {
		return x.Url
	}
	return ""
}

type UpdateCustomerRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
	Balance    int64  `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
	Billable   bool   `protobuf:"varint,3,opt,name=billable,proto3" json:"billable,omitempty"`
	Delinquent bool   `protobuf:"varint,4,opt,name=delinquent,proto3" json:"delinquent,omitempty"`
}

func (x *UpdateCustomerRequest) Reset() {
	*x = UpdateCustomerRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[12]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *UpdateCustomerRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UpdateCustomerRequest) ProtoMessage() {}

func (x *UpdateCustomerRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[12]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use UpdateCustomerRequest.ProtoReflect.Descriptor instead.
func (*UpdateCustomerRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{12}
}

func (x *UpdateCustomerRequest) GetCustomerId() string {
	if x != nil {
		return x.CustomerId
	}
	return ""
}

func (x *UpdateCustomerRequest) GetBalance() int64 {
	if x != nil {
		return x.Balance
	}
	return 0
}

func (x *UpdateCustomerRequest) GetBillable() bool {
	if x != nil {
		return x.Billable
	}
	return false
}

func (x *UpdateCustomerRequest) GetDelinquent() bool {
	if x != nil {
		return x.Delinquent
	}
	return false
}

type UpdateCustomerResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *UpdateCustomerResponse) Reset() {
	*x = UpdateCustomerResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[13]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *UpdateCustomerResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UpdateCustomerResponse) ProtoMessage() {}

func (x *UpdateCustomerResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[13]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use UpdateCustomerResponse.ProtoReflect.Descriptor instead.
func (*UpdateCustomerResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{13}
}

type UpdateCustomerSubscriptionRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	CustomerId    string  `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
	Status        string  `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	InvoicePeriod *Period `protobuf:"bytes,3,opt,name=invoice_period,json=invoicePeriod,proto3" json:"invoice_period,omitempty"`
}

func (x *UpdateCustomerSubscriptionRequest) Reset() {
	*x = UpdateCustomerSubscriptionRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[14]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *UpdateCustomerSubscriptionRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UpdateCustomerSubscriptionRequest) ProtoMessage() {}

func (x *UpdateCustomerSubscriptionRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[14]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use UpdateCustomerSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*UpdateCustomerSubscriptionRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{14}
}

func (x *UpdateCustomerSubscriptionRequest) GetCustomerId() string {
	if x != nil {
		return x.CustomerId
	}
	return ""
}

func (x *UpdateCustomerSubscriptionRequest) GetStatus() string {
	if x != nil {
		return x.Status
	}
	return ""
}

func (x *UpdateCustomerSubscriptionRequest) GetInvoicePeriod() *Period {
	if x != nil {
		return x.InvoicePeriod
	}
	return nil
}

type UpdateCustomerSubscriptionResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *UpdateCustomerSubscriptionResponse) Reset() {
	*x = UpdateCustomerSubscriptionResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[15]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *UpdateCustomerSubscriptionResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UpdateCustomerSubscriptionResponse) ProtoMessage() {}

func (x *UpdateCustomerSubscriptionResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[15]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use UpdateCustomerSubscriptionResponse.ProtoReflect.Descriptor instead.
func (*UpdateCustomerSubscriptionResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{15}
}

type RecreateCustomerSubscriptionRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (x *RecreateCustomerSubscriptionRequest) Reset() {
	*x = RecreateCustomerSubscriptionRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[16]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *RecreateCustomerSubscriptionRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RecreateCustomerSubscriptionRequest) ProtoMessage() {}

func (x *RecreateCustomerSubscriptionRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[16]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RecreateCustomerSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*RecreateCustomerSubscriptionRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{16}
}

func (x *RecreateCustomerSubscriptionRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

type RecreateCustomerSubscriptionResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *RecreateCustomerSubscriptionResponse) Reset() {
	*x = RecreateCustomerSubscriptionResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[17]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *RecreateCustomerSubscriptionResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RecreateCustomerSubscriptionResponse) ProtoMessage() {}

func (x *RecreateCustomerSubscriptionResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[17]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RecreateCustomerSubscriptionResponse.ProtoReflect.Descriptor instead.
func (*RecreateCustomerSubscriptionResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{17}
}

type DeleteCustomerRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (x *DeleteCustomerRequest) Reset() {
	*x = DeleteCustomerRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[18]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *DeleteCustomerRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DeleteCustomerRequest) ProtoMessage() {}

func (x *DeleteCustomerRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[18]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use DeleteCustomerRequest.ProtoReflect.Descriptor instead.
func (*DeleteCustomerRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{18}
}

func (x *DeleteCustomerRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

type DeleteCustomerResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *DeleteCustomerResponse) Reset() {
	*x = DeleteCustomerResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[19]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *DeleteCustomerResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DeleteCustomerResponse) ProtoMessage() {}

func (x *DeleteCustomerResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[19]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use DeleteCustomerResponse.ProtoReflect.Descriptor instead.
func (*DeleteCustomerResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{19}
}

type GetCustomerUsageRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (x *GetCustomerUsageRequest) Reset() {
	*x = GetCustomerUsageRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[20]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *GetCustomerUsageRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCustomerUsageRequest) ProtoMessage() {}

func (x *GetCustomerUsageRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[20]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetCustomerUsageRequest.ProtoReflect.Descriptor instead.
func (*GetCustomerUsageRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{20}
}

func (x *GetCustomerUsageRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

type GetCustomerUsageResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Usage map[string]*Usage `protobuf:"bytes,1,rep,name=usage,proto3" json:"usage,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

func (x *GetCustomerUsageResponse) Reset() {
	*x = GetCustomerUsageResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[21]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *GetCustomerUsageResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCustomerUsageResponse) ProtoMessage() {}

func (x *GetCustomerUsageResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[21]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetCustomerUsageResponse.ProtoReflect.Descriptor instead.
func (*GetCustomerUsageResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{21}
}

func (x *GetCustomerUsageResponse) GetUsage() map[string]*Usage {
	if x != nil {
		return x.Usage
	}
	return nil
}

type IncCustomerUsageRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key          string           `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	ProductUsage map[string]int64 `protobuf:"bytes,2,rep,name=product_usage,json=productUsage,proto3" json:"product_usage,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}

func (x *IncCustomerUsageRequest) Reset() {
	*x = IncCustomerUsageRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[22]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *IncCustomerUsageRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*IncCustomerUsageRequest) ProtoMessage() {}

func (x *IncCustomerUsageRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[22]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use IncCustomerUsageRequest.ProtoReflect.Descriptor instead.
func (*IncCustomerUsageRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{22}
}

func (x *IncCustomerUsageRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *IncCustomerUsageRequest) GetProductUsage() map[string]int64 {
	if x != nil {
		return x.ProductUsage
	}
	return nil
}

type IncCustomerUsageResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	DailyUsage map[string]*Usage `protobuf:"bytes,1,rep,name=daily_usage,json=dailyUsage,proto3" json:"daily_usage,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

func (x *IncCustomerUsageResponse) Reset() {
	*x = IncCustomerUsageResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[23]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *IncCustomerUsageResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*IncCustomerUsageResponse) ProtoMessage() {}

func (x *IncCustomerUsageResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[23]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use IncCustomerUsageResponse.ProtoReflect.Descriptor instead.
func (*IncCustomerUsageResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{23}
}

func (x *IncCustomerUsageResponse) GetDailyUsage() map[string]*Usage {
	if x != nil {
		return x.DailyUsage
	}
	return nil
}

type ReportCustomerUsageRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (x *ReportCustomerUsageRequest) Reset() {
	*x = ReportCustomerUsageRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[24]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *ReportCustomerUsageRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ReportCustomerUsageRequest) ProtoMessage() {}

func (x *ReportCustomerUsageRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[24]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ReportCustomerUsageRequest.ProtoReflect.Descriptor instead.
func (*ReportCustomerUsageRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{24}
}

func (x *ReportCustomerUsageRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

type ReportCustomerUsageResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *ReportCustomerUsageResponse) Reset() {
	*x = ReportCustomerUsageResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[25]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *ReportCustomerUsageResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ReportCustomerUsageResponse) ProtoMessage() {}

func (x *ReportCustomerUsageResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[25]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ReportCustomerUsageResponse.ProtoReflect.Descriptor instead.
func (*ReportCustomerUsageResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{25}
}

type IdentifyRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key         string            `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	AccountType int32             `protobuf:"varint,2,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"`
	Active      bool              `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"`
	Email       string            `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	Properties  map[string]string `protobuf:"bytes,5,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

func (x *IdentifyRequest) Reset() {
	*x = IdentifyRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[26]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *IdentifyRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*IdentifyRequest) ProtoMessage() {}

func (x *IdentifyRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[26]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use IdentifyRequest.ProtoReflect.Descriptor instead.
func (*IdentifyRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{26}
}

func (x *IdentifyRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *IdentifyRequest) GetAccountType() int32 {
	if x != nil {
		return x.AccountType
	}
	return 0
}

func (x *IdentifyRequest) GetActive() bool {
	if x != nil {
		return x.Active
	}
	return false
}

func (x *IdentifyRequest) GetEmail() string {
	if x != nil {
		return x.Email
	}
	return ""
}

func (x *IdentifyRequest) GetProperties() map[string]string {
	if x != nil {
		return x.Properties
	}
	return nil
}

type IdentifyResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *IdentifyResponse) Reset() {
	*x = IdentifyResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[27]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *IdentifyResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*IdentifyResponse) ProtoMessage() {}

func (x *IdentifyResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[27]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use IdentifyResponse.ProtoReflect.Descriptor instead.
func (*IdentifyResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{27}
}

type TrackEventRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key         string            `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	AccountType int32             `protobuf:"varint,2,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"`
	Active      bool              `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"`
	Event       int32             `protobuf:"varint,4,opt,name=event,proto3" json:"event,omitempty"`
	Properties  map[string]string `protobuf:"bytes,5,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

func (x *TrackEventRequest) Reset() {
	*x = TrackEventRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[28]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *TrackEventRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*TrackEventRequest) ProtoMessage() {}

func (x *TrackEventRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[28]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use TrackEventRequest.ProtoReflect.Descriptor instead.
func (*TrackEventRequest) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{28}
}

func (x *TrackEventRequest) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *TrackEventRequest) GetAccountType() int32 {
	if x != nil {
		return x.AccountType
	}
	return 0
}

func (x *TrackEventRequest) GetActive() bool {
	if x != nil {
		return x.Active
	}
	return false
}

func (x *TrackEventRequest) GetEvent() int32 {
	if x != nil {
		return x.Event
	}
	return 0
}

func (x *TrackEventRequest) GetProperties() map[string]string {
	if x != nil {
		return x.Properties
	}
	return nil
}

type TrackEventResponse struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields
}

func (x *TrackEventResponse) Reset() {
	*x = TrackEventResponse{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[29]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *TrackEventResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*TrackEventResponse) ProtoMessage() {}

func (x *TrackEventResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[29]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use TrackEventResponse.ProtoReflect.Descriptor instead.
func (*TrackEventResponse) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{29}
}

type CreateCustomerRequest_Params struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Key         string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Email       string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	AccountType int32  `protobuf:"varint,3,opt,name=account_type,json=accountType,proto3" json:"account_type,omitempty"`
	Username    string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
}

func (x *CreateCustomerRequest_Params) Reset() {
	*x = CreateCustomerRequest_Params{}
	if protoimpl.UnsafeEnabled {
		mi := &file_api_billingd_pb_billingd_proto_msgTypes[30]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *CreateCustomerRequest_Params) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CreateCustomerRequest_Params) ProtoMessage() {}

func (x *CreateCustomerRequest_Params) ProtoReflect() protoreflect.Message {
	mi := &file_api_billingd_pb_billingd_proto_msgTypes[30]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CreateCustomerRequest_Params.ProtoReflect.Descriptor instead.
func (*CreateCustomerRequest_Params) Descriptor() ([]byte, []int) {
	return file_api_billingd_pb_billingd_proto_rawDescGZIP(), []int{4, 0}
}

func (x *CreateCustomerRequest_Params) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *CreateCustomerRequest_Params) GetEmail() string {
	if x != nil {
		return x.Email
	}
	return ""
}

func (x *CreateCustomerRequest_Params) GetAccountType() int32 {
	if x != nil {
		return x.AccountType
	}
	return 0
}

func (x *CreateCustomerRequest_Params) GetUsername() string {
	if x != nil {
		return x.Username
	}
	return ""
}

var File_api_billingd_pb_billingd_proto protoreflect.FileDescriptor

var file_api_billingd_pb_billingd_proto_rawDesc = []byte{
	0x0a, 0x1e, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2f, 0x70,
	0x62, 0x2f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
	0x12, 0x0f, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70,
	0x62, 0x22, 0x42, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x75,
	0x6e, 0x69, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
	0x09, 0x75, 0x6e, 0x69, 0x78, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x6e,
	0x69, 0x78, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x75, 0x6e,
	0x69, 0x78, 0x45, 0x6e, 0x64, 0x22, 0xc4, 0x01, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12,
	0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
	0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
	0x6e, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
	0x52, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
	0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a,
	0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x65,
	0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
	0x52, 0x05, 0x67, 0x72, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18,
	0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x70,
	0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70,
	0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65,
	0x72, 0x69, 0x6f, 0x64, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x14, 0x0a, 0x12,
	0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
	0x73, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74,
	0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x02, 0x0a, 0x15, 0x43, 0x72,
	0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
	0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x18,
	0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c,
	0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75,
	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61,
	0x72, 0x61, 0x6d, 0x73, 0x52, 0x08, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x45,
	0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d,
	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62,
	0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52,
	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70,
	0x61, 0x72, 0x65, 0x6e, 0x74, 0x1a, 0x6f, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
	0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
	0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75,
	0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61,
	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73,
	0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73,
	0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x39, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
	0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
	0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49,
	0x64, 0x22, 0x26, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
	0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0xa5, 0x05, 0x0a, 0x13, 0x47, 0x65,
	0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
	0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
	0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f,
	0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
	0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6b,
	0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
	0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01,
	0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63,
	0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
	0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e,
	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06,
	0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61,
	0x74, 0x75, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
	0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x12, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
	0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18,
	0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a,
	0x0a, 0x08, 0x62, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08,
	0x52, 0x08, 0x62, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65,
	0x6c, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
	0x64, 0x65, 0x6c, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72,
	0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
	0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x72, 0x61,
	0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x18, 0x0c, 0x20,
	0x01, 0x28, 0x03, 0x52, 0x0e, 0x67, 0x72, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64,
	0x45, 0x6e, 0x64, 0x12, 0x3e, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x70,
	0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70,
	0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65,
	0x72, 0x69, 0x6f, 0x64, 0x52, 0x0d, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72,
	0x69, 0x6f, 0x64, 0x12, 0x55, 0x0a, 0x0b, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x5f, 0x75, 0x73, 0x61,
	0x67, 0x65, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62,
	0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75,
	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44,
	0x61, 0x69, 0x6c, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a,
	0x64, 0x61, 0x69, 0x6c, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65,
	0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
	0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x44, 0x61,
	0x69, 0x6c, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
	0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
	0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62,
	0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
	0x01, 0x22, 0x5f, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65,
	0x6e, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
	0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
	0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02,
	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05,
	0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d,
	0x69, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x65, 0x6e,
	0x64, 0x65, 0x6e, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73,
	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
	0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62,
	0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75,
	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09,
	0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x78,
	0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
	0x6e, 0x65, 0x78, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x2d, 0x0a, 0x19, 0x47, 0x65,
	0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
	0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x2e, 0x0a, 0x1a, 0x47, 0x65, 0x74,
	0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52,
	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01,
	0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x8e, 0x01, 0x0a, 0x15, 0x55, 0x70,
	0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
	0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f,
	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
	0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18,
	0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1a,
	0x0a, 0x08, 0x62, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
	0x52, 0x08, 0x62, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65,
	0x6c, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
	0x64, 0x65, 0x6c, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x55, 0x70,
	0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
	0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43,
	0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75,
	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
	0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73,
	0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61,
	0x74, 0x75, 0x73, 0x12, 0x3e, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x70,
	0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70,
	0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65,
	0x72, 0x69, 0x6f, 0x64, 0x52, 0x0d, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72,
	0x69, 0x6f, 0x64, 0x22, 0x24, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73,
	0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
	0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, 0x23, 0x52, 0x65, 0x63,
	0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x75, 0x62,
	0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
	0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
	0x65, 0x79, 0x22, 0x26, 0x0a, 0x24, 0x52, 0x65, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75,
	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
	0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x44, 0x65,
	0x6c, 0x65, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
	0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43,
	0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
	0x2b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73,
	0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
	0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0xb8, 0x01, 0x0a,
	0x18, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73, 0x61, 0x67,
	0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x05, 0x75, 0x73, 0x61,
	0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62,
	0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75,
	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
	0x6e, 0x73, 0x65, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05,
	0x75, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x50, 0x0a, 0x0a, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e,
	0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69,
	0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61,
	0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcd, 0x01, 0x0a, 0x17, 0x49, 0x6e, 0x63, 0x43,
	0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75,
	0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x5f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
	0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x61,
	0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x49,
	0x6e, 0x63, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52,
	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x55, 0x73,
	0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
	0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
	0x74, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
	0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
	0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61,
	0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcd, 0x01, 0x0a, 0x18, 0x49, 0x6e, 0x63, 0x43,
	0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x5f, 0x75, 0x73,
	0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x2e,
	0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x63, 0x43,
	0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
	0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45,
	0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65,
	0x1a, 0x55, 0x0a, 0x0f, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e,
	0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69,
	0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61,
	0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2e, 0x0a, 0x1a, 0x52, 0x65, 0x70, 0x6f, 0x72,
	0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
	0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
	0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x70, 0x6f, 0x72,
	0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x85, 0x02, 0x0a, 0x0f, 0x49, 0x64, 0x65, 0x6e, 0x74,
	0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
	0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c,
	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
	0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,
	0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
	0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x50, 0x0a,
	0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
	0x0b, 0x32, 0x30, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64,
	0x2e, 0x70, 0x62, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75,
	0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e,
	0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a,
	0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74,
	0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
	0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
	0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x12,
	0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
	0x73, 0x65, 0x22, 0x89, 0x02, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e,
	0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63,
	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
	0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a,
	0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61,
	0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04,
	0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x52, 0x0a, 0x0a, 0x70,
	0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
	0x32, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70,
	0x62, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
	0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e,
	0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a,
	0x3d, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74,
	0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
	0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
	0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x14,
	0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
	0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf1, 0x0b, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x53, 0x65, 0x72, 0x76,
	0x69, 0x63, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c,
	0x74, 0x68, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67,
	0x64, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68,
	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69,
	0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48,
	0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
	0x63, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
	0x72, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64,
	0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
	0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e,
	0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
	0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
	0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f,
	0x6d, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e,
	0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
	0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62,
	0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75,
	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
	0x12, 0x7b, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e,
	0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x2e, 0x61, 0x70, 0x69,
	0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73,
	0x74, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
	0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x61, 0x70, 0x69,
	0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73,
	0x74, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
	0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6f, 0x0a,
	0x12, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x73, 0x73,
	0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e,
	0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
	0x72, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
	0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70,
	0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x73,
	0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63,
	0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
	0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e,
	0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
	0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62,
	0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
	0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
	0x65, 0x22, 0x00, 0x12, 0x87, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75,
	0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
	0x6f, 0x6e, 0x12, 0x32, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67,
	0x64, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f,
	0x6d, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52,
	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c,
	0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43,
	0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8d, 0x01,
	0x0a, 0x1c, 0x52, 0x65, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
	0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34,
	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62,
	0x2e, 0x52, 0x65, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
	0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
	0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69,
	0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43,
	0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a,
	0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12,
	0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70,
	0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69,
	0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
	0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
	0x22, 0x00, 0x12, 0x69, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
	0x72, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c,
	0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74,
	0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
	0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x64, 0x2e,
	0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x55, 0x73,
	0x61, 0x67, 0x65, 0x52, 0x65, 0x7
Download .txt
gitextract_nehb9hlu/

├── .bingo/
│   ├── .gitignore
│   ├── README.md
│   ├── Variables.mk
│   ├── bingo.mod
│   ├── buf.mod
│   ├── go.mod
│   ├── gomplate.mod
│   ├── govvv.mod
│   ├── gox.mod
│   ├── protoc-gen-buf-breaking.mod
│   ├── protoc-gen-buf-lint.mod
│   └── variables.env
├── .github/
│   └── workflows/
│       ├── build.yml
│       ├── docker.yml
│       ├── publish-js-libs.yml
│       ├── release.yml
│       └── test.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── LICENSE
├── Makefile
├── README.md
├── api/
│   ├── apitest/
│   │   ├── apitest.go
│   │   └── docker-compose.yml
│   ├── billingd/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.dev
│   │   ├── analytics/
│   │   │   ├── analytics.go
│   │   │   └── events.go
│   │   ├── client/
│   │   │   ├── client.go
│   │   │   ├── client_test.go
│   │   │   └── options.go
│   │   ├── common/
│   │   │   └── common.go
│   │   ├── gateway/
│   │   │   └── gateway.go
│   │   ├── main.go
│   │   ├── migrations/
│   │   │   ├── migrations.go
│   │   │   └── migrations_test.go
│   │   ├── pb/
│   │   │   ├── billingd.pb.go
│   │   │   └── billingd.proto
│   │   └── service/
│   │       └── service.go
│   ├── bucketsd/
│   │   ├── client/
│   │   │   ├── client.go
│   │   │   ├── client_test.go
│   │   │   └── options.go
│   │   ├── pb/
│   │   │   ├── bucketsd.pb.go
│   │   │   ├── bucketsd.proto
│   │   │   └── javascript/
│   │   │       └── package.json
│   │   └── service.go
│   ├── common/
│   │   └── common.go
│   ├── filecoin/
│   │   └── client/
│   │       └── client.go
│   ├── hubd/
│   │   ├── client/
│   │   │   ├── client.go
│   │   │   ├── client_test.go
│   │   │   └── options.go
│   │   ├── pb/
│   │   │   ├── hubd.pb.go
│   │   │   ├── hubd.proto
│   │   │   └── javascript/
│   │   │       └── package.json
│   │   └── service.go
│   ├── mindexd/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.dev
│   │   ├── client/
│   │   │   └── client.go
│   │   ├── collector/
│   │   │   ├── collector.go
│   │   │   ├── config.go
│   │   │   └── daemon.go
│   │   ├── indexer/
│   │   │   ├── config.go
│   │   │   ├── daemon.go
│   │   │   └── indexer.go
│   │   ├── main.go
│   │   ├── migrations/
│   │   │   └── migrations.go
│   │   ├── model/
│   │   │   ├── index.go
│   │   │   └── record.go
│   │   ├── pb/
│   │   │   ├── google/
│   │   │   │   └── api/
│   │   │   │       ├── annotations.proto
│   │   │   │       ├── field_behavior.proto
│   │   │   │       ├── http.proto
│   │   │   │       └── httpbody.proto
│   │   │   ├── mindexd.pb.go
│   │   │   ├── mindexd.pb.gw.go
│   │   │   ├── mindexd.proto
│   │   │   ├── mindexd.swagger.json
│   │   │   └── protoc-gen-openapiv2/
│   │   │       └── options/
│   │   │           ├── annotations.proto
│   │   │           └── openapiv2.proto
│   │   ├── service/
│   │   │   ├── cast.go
│   │   │   └── service.go
│   │   └── store/
│   │       ├── gen.go
│   │       ├── gen_test.go
│   │       ├── index_snapshot.go
│   │       ├── index_snapshot_test.go
│   │       ├── onchain.go
│   │       ├── onchain_test.go
│   │       ├── query.go
│   │       ├── query_test.go
│   │       ├── records.go
│   │       ├── records_test.go
│   │       └── store.go
│   └── usersd/
│       ├── client/
│       │   ├── client.go
│       │   ├── client_test.go
│       │   └── options.go
│       ├── pb/
│       │   ├── javascript/
│       │   │   └── package.json
│       │   ├── usersd.pb.go
│       │   └── usersd.proto
│       └── service.go
├── buckets/
│   ├── archive/
│   │   ├── events.go
│   │   ├── retrieval/
│   │   │   └── retrieval.go
│   │   └── tracker/
│   │       └── tracker.go
│   ├── buckets.go
│   └── local/
│       ├── access.go
│       ├── add.go
│       ├── archive.go
│       ├── bucket.go
│       ├── bucket_test.go
│       ├── buckets.go
│       ├── buckets_test.go
│       ├── crypto.go
│       ├── diff.go
│       ├── list.go
│       ├── options.go
│       ├── pull.go
│       ├── push.go
│       ├── repo.go
│       ├── repo_test.go
│       ├── testdata/
│       │   ├── a/
│       │   │   ├── bar.txt
│       │   │   ├── foo.txt
│       │   │   └── one/
│       │   │       ├── baz.txt
│       │   │       ├── buz.txt
│       │   │       └── two/
│       │   │           ├── boo.txt
│       │   │           └── fuz.txt
│       │   └── b/
│       │       ├── foo.txt
│       │       └── one/
│       │           ├── baz.txt
│       │           ├── muz.txt
│       │           ├── three/
│       │           │   └── far.txt
│       │           └── two/
│       │               └── fuz.txt
│       └── watch.go
├── buf.yaml
├── buildinfo/
│   └── buildinfo.go
├── buildtools/
│   └── install_protoc.bash
├── cmd/
│   ├── buck/
│   │   ├── cli/
│   │   │   ├── add.go
│   │   │   ├── archive.go
│   │   │   ├── cli.go
│   │   │   ├── init.go
│   │   │   ├── pull.go
│   │   │   ├── push.go
│   │   │   ├── remote.go
│   │   │   ├── roles.go
│   │   │   ├── util.go
│   │   │   └── watch.go
│   │   └── main.go
│   ├── buckd/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.dev
│   │   ├── docker-compose-dev.yml
│   │   ├── docker-compose.yml
│   │   └── main.go
│   ├── cmd.go
│   ├── config.go
│   ├── hub/
│   │   ├── cli/
│   │   │   ├── archives.go
│   │   │   ├── billing.go
│   │   │   ├── buck.go
│   │   │   ├── cli.go
│   │   │   ├── destroy.go
│   │   │   ├── fil.go
│   │   │   ├── fil_index.go
│   │   │   ├── init.go
│   │   │   ├── keys.go
│   │   │   ├── login.go
│   │   │   ├── logout.go
│   │   │   ├── orgs.go
│   │   │   ├── retrievals.go
│   │   │   ├── threads.go
│   │   │   ├── update.go
│   │   │   ├── version.go
│   │   │   └── whoami.go
│   │   └── main.go
│   ├── hubd/
│   │   ├── Dockerfile
│   │   ├── Dockerfile.dev
│   │   ├── docker-compose-dev.yml
│   │   ├── docker-compose.yml
│   │   └── main.go
│   ├── output.go
│   └── watch.go
├── core/
│   ├── auth_interceptor.go
│   ├── core.go
│   ├── options.go
│   ├── pow_interceptor.go
│   ├── stats_handler.go
│   ├── thread_interceptor.go
│   ├── thread_interceptor_test.go
│   └── usage_interceptor.go
├── dist/
│   └── install.tmpl
├── dns/
│   └── dns.go
├── email/
│   └── email.go
├── gateway/
│   ├── Makefile
│   ├── assets.go
│   ├── buckets.go
│   ├── gateway.go
│   ├── ipfs.go
│   ├── public/
│   │   ├── css/
│   │   │   └── style.css
│   │   ├── html/
│   │   │   ├── 404.gohtml
│   │   │   ├── confirm.gohtml
│   │   │   ├── consent.gohtml
│   │   │   ├── error.gohtml
│   │   │   ├── index.gohtml
│   │   │   └── unixfs.gohtml
│   │   └── img/
│   │       └── site.webmanifest
│   └── threads.go
├── go.mod
├── go.sum
├── integrationtest/
│   └── pg/
│       ├── docker-compose.yml
│       ├── pg_test.go
│       ├── pow_client_test.go
│       ├── powcli/
│       │   ├── Makefile
│       │   └── docker-compose-pow.yml
│       ├── powergate.go
│       └── testdata/
│           ├── Data1.txt
│           ├── Data2.txt
│           └── Data3.txt
├── ipns/
│   └── ipns.go
├── mail/
│   ├── local/
│   │   ├── mail.go
│   │   ├── mail_test.go
│   │   ├── mailbox.go
│   │   └── mailbox_test.go
│   └── mail.go
├── mongodb/
│   ├── accounts.go
│   ├── accounts_test.go
│   ├── apikeys.go
│   ├── apikeys_test.go
│   ├── archivetracking.go
│   ├── archivetracking_test.go
│   ├── bucketarchives.go
│   ├── bucketarchives_test.go
│   ├── collections.go
│   ├── collections_test.go
│   ├── common.go
│   ├── invites.go
│   ├── invites_test.go
│   ├── ipnskeys.go
│   ├── ipnskeys_test.go
│   ├── migrations/
│   │   ├── migrations.go
│   │   └── migrations_test.go
│   ├── sessions.go
│   ├── sessions_test.go
│   ├── threads.go
│   └── threads_test.go
├── scripts/
│   ├── gen_js_protos.bash
│   ├── protoc_gen_plugin.bash
│   └── publish_js_protos.bash
├── threaddb/
│   ├── buckets.go
│   ├── mail.go
│   └── threaddb.go
└── util/
    ├── ctxutil.go
    ├── flakyt.go
    └── util.go
Download .txt
Showing preview only (308K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3439 symbols across 148 files)

FILE: api/apitest/apitest.go
  constant SessionSecret (line 30) | SessionSecret = "hubsession"
  function MakeTextile (line 32) | func MakeTextile(t *testing.T) core.Config {
  function DefaultTextileConfig (line 38) | func DefaultTextileConfig(t util.TestingTWithCleanup) core.Config {
  type Options (line 65) | type Options struct
  type Option (line 70) | type Option
  function WithRepoPath (line 72) | func WithRepoPath(repoPath string) Option {
  function WithoutAutoShutdown (line 78) | func WithoutAutoShutdown() Option {
  function MakeTextileWithConfig (line 84) | func MakeTextileWithConfig(t util.TestingTWithCleanup, conf core.Config,...
  function DefaultBillingConfig (line 106) | func DefaultBillingConfig(t util.TestingTWithCleanup) billing.Config {
  function MakeBillingWithConfig (line 126) | func MakeBillingWithConfig(t util.TestingTWithCleanup, conf billing.Conf...
  function NewUsername (line 137) | func NewUsername() string {
  function NewEmail (line 141) | func NewEmail() string {
  function Signup (line 145) | func Signup(t util.TestingTWithCleanup, client *client.Client, conf core...
  function Signin (line 162) | func Signin(t *testing.T, client *client.Client, conf core.Config, usern...
  function ConfirmEmail (line 179) | func ConfirmEmail(t util.TestingTWithCleanup, gurl string, secret string) {
  function GetMongoUri (line 188) | func GetMongoUri() string {
  function GetIPFSApiAddr (line 197) | func GetIPFSApiAddr() ma.Multiaddr {
  function StartServices (line 206) | func StartServices() (cleanup func()) {
  function checkServices (line 272) | func checkServices() error {

FILE: api/billingd/analytics/analytics.go
  type Client (line 17) | type Client struct
    method Identify (line 51) | func (c *Client) Identify(key string, accountType mdb.AccountType, act...
    method TrackEvent (line 77) | func (c *Client) TrackEvent(key string, accountType mdb.AccountType, a...
    method FormatUnix (line 100) | func (c *Client) FormatUnix(seconds int64) string {
  function NewClient (line 23) | func NewClient(segmentAPIKey, prefix string, debug bool) (*Client, error) {

FILE: api/billingd/analytics/events.go
  type Event (line 8) | type Event
    method String (line 28) | func (e Event) String() string {
  constant SignIn (line 11) | SignIn Event = iota
  constant AccountDestroyed (line 12) | AccountDestroyed
  constant KeyAccountCreated (line 13) | KeyAccountCreated
  constant KeyUserCreated (line 14) | KeyUserCreated
  constant OrgCreated (line 15) | OrgCreated
  constant OrgLeave (line 16) | OrgLeave
  constant OrgDestroyed (line 17) | OrgDestroyed
  constant OrgInviteCreated (line 18) | OrgInviteCreated
  constant GracePeriodStart (line 19) | GracePeriodStart
  constant GracePeriodEnd (line 20) | GracePeriodEnd
  constant BillingSetup (line 21) | BillingSetup
  constant BucketCreated (line 22) | BucketCreated
  constant BucketArchiveCreated (line 23) | BucketArchiveCreated
  constant MailboxCreated (line 24) | MailboxCreated
  constant ThreadDbCreated (line 25) | ThreadDbCreated

FILE: api/billingd/client/client.go
  type Client (line 18) | type Client struct
    method Close (line 36) | func (c *Client) Close() error {
    method CheckHealth (line 40) | func (c *Client) CheckHealth(ctx context.Context) error {
    method CreateCustomer (line 45) | func (c *Client) CreateCustomer(
    method GetCustomer (line 80) | func (c *Client) GetCustomer(ctx context.Context, key thread.PubKey) (...
    method GetCustomerSession (line 86) | func (c *Client) GetCustomerSession(ctx context.Context, key thread.Pu...
    method ListDependentCustomers (line 92) | func (c *Client) ListDependentCustomers(ctx context.Context, key threa...
    method UpdateCustomer (line 105) | func (c *Client) UpdateCustomer(
    method UpdateCustomerSubscription (line 121) | func (c *Client) UpdateCustomerSubscription(
    method RecreateCustomerSubscription (line 138) | func (c *Client) RecreateCustomerSubscription(ctx context.Context, key...
    method DeleteCustomer (line 145) | func (c *Client) DeleteCustomer(ctx context.Context, key thread.PubKey...
    method GetCustomerUsage (line 152) | func (c *Client) GetCustomerUsage(ctx context.Context, key thread.PubK...
    method IncCustomerUsage (line 158) | func (c *Client) IncCustomerUsage(
    method ReportCustomerUsage (line 169) | func (c *Client) ReportCustomerUsage(ctx context.Context, key thread.P...
    method Identify (line 177) | func (c *Client) Identify(
    method TrackEvent (line 197) | func (c *Client) TrackEvent(
  function NewClient (line 24) | func NewClient(target string, opts ...grpc.DialOption) (*Client, error) {

FILE: api/billingd/client/client_test.go
  constant mib (line 26) | mib = 1024 * 1024
  function TestMain (line 29) | func TestMain(m *testing.M) {
  function TestClient_CheckHealth (line 39) | func TestClient_CheckHealth(t *testing.T) {
  function TestClient_CreateCustomer (line 45) | func TestClient_CreateCustomer(t *testing.T) {
  function TestClient_GetCustomer (line 84) | func TestClient_GetCustomer(t *testing.T) {
  function TestClient_GetCustomerSession (line 100) | func TestClient_GetCustomerSession(t *testing.T) {
  function TestClient_ListDependentCustomers (line 111) | func TestClient_ListDependentCustomers(t *testing.T) {
  function TestClient_UpdateCustomer (line 153) | func TestClient_UpdateCustomer(t *testing.T) {
  function TestClient_UpdateCustomerSubscription (line 185) | func TestClient_UpdateCustomerSubscription(t *testing.T) {
  function TestClient_RecreateCustomerSubscription (line 201) | func TestClient_RecreateCustomerSubscription(t *testing.T) {
  function TestClient_DeleteCustomer (line 223) | func TestClient_DeleteCustomer(t *testing.T) {
  type usageTest (line 233) | type usageTest struct
  function TestClient_GetCustomerUsage (line 239) | func TestClient_GetCustomerUsage(t *testing.T) {
  function getCustomerUsage (line 251) | func getCustomerUsage(t *testing.T, test usageTest) {
  function TestClient_IncCustomerUsage (line 280) | func TestClient_IncCustomerUsage(t *testing.T) {
  function incCustomerUsage (line 292) | func incCustomerUsage(t *testing.T, test usageTest) {
  function getProduct (line 400) | func getProduct(t *testing.T, key string) *service.Product {
  function getUnits (line 410) | func getUnits(size int64, product *service.Product) int64 {
  function getCost (line 414) | func getCost(units int64, product *service.Product, price float64) float...
  function setup (line 422) | func setup(t *testing.T) *client.Client {
  function newKey (line 440) | func newKey(t *testing.T) thread.PubKey {

FILE: api/billingd/client/options.go
  type options (line 8) | type options struct
  type Option (line 14) | type Option
  function WithParent (line 17) | func WithParent(key thread.PubKey, email string, accountType mdb.Account...
  type listOptions (line 25) | type listOptions struct
  type ListOption (line 30) | type ListOption
  function WithOffset (line 33) | func WithOffset(offset int64) ListOption {
  function WithLimit (line 40) | func WithLimit(limit int64) ListOption {

FILE: api/billingd/common/common.go
  function StatusCheck (line 25) | func StatusCheck(status string) error {

FILE: api/billingd/gateway/gateway.go
  constant handlerTimeout (line 26) | handlerTimeout = time.Minute
  function init (line 28) | func init() {
  type Gateway (line 33) | type Gateway struct
    method Start (line 79) | func (g *Gateway) Start() {
    method Addr (line 106) | func (g *Gateway) Addr() string {
    method Stop (line 111) | func (g *Gateway) Stop() error {
    method webhookHandler (line 126) | func (g *Gateway) webhookHandler(c *gin.Context) {
  type Config (line 41) | type Config struct
  function NewGateway (line 50) | func NewGateway(conf Config) (*Gateway, error) {
  constant webhookMaxBodyBytes (line 123) | webhookMaxBodyBytes = int64(65536)

FILE: api/billingd/main.go
  constant daemonName (line 17) | daemonName = "billingd"
  function init (line 85) | func init() {
  function main (line 159) | func main() {

FILE: api/billingd/migrations/migrations.go
  function Migrate (line 66) | func Migrate(db *mongo.Database) error {

FILE: api/billingd/migrations/migrations_test.go
  function TestMain (line 16) | func TestMain(m *testing.M) {
  function TestMigrations_m001 (line 27) | func TestMigrations_m001(t *testing.T) {
  function setup (line 69) | func setup(t *testing.T, ctx context.Context) *mongo.Database {

FILE: api/billingd/pb/billingd.pb.go
  constant _ (line 23) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 25) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  constant _ (line 30) | _ = proto.ProtoPackageIsVersion4
  type Period (line 32) | type Period struct
    method Reset (line 41) | func (x *Period) Reset() {
    method String (line 50) | func (x *Period) String() string {
    method ProtoMessage (line 54) | func (*Period) ProtoMessage() {}
    method ProtoReflect (line 56) | func (x *Period) ProtoReflect() protoreflect.Message {
    method Descriptor (line 69) | func (*Period) Descriptor() ([]byte, []int) {
    method GetUnixStart (line 73) | func (x *Period) GetUnixStart() int64 {
    method GetUnixEnd (line 80) | func (x *Period) GetUnixEnd() int64 {
  type Usage (line 87) | type Usage struct
    method Reset (line 101) | func (x *Usage) Reset() {
    method String (line 110) | func (x *Usage) String() string {
    method ProtoMessage (line 114) | func (*Usage) ProtoMessage() {}
    method ProtoReflect (line 116) | func (x *Usage) ProtoReflect() protoreflect.Message {
    method Descriptor (line 129) | func (*Usage) Descriptor() ([]byte, []int) {
    method GetDescription (line 133) | func (x *Usage) GetDescription() string {
    method GetUnits (line 140) | func (x *Usage) GetUnits() int64 {
    method GetTotal (line 147) | func (x *Usage) GetTotal() int64 {
    method GetFree (line 154) | func (x *Usage) GetFree() int64 {
    method GetGrace (line 161) | func (x *Usage) GetGrace() int64 {
    method GetCost (line 168) | func (x *Usage) GetCost() float64 {
    method GetPeriod (line 175) | func (x *Usage) GetPeriod() *Period {
  type CheckHealthRequest (line 182) | type CheckHealthRequest struct
    method Reset (line 188) | func (x *CheckHealthRequest) Reset() {
    method String (line 197) | func (x *CheckHealthRequest) String() string {
    method ProtoMessage (line 201) | func (*CheckHealthRequest) ProtoMessage() {}
    method ProtoReflect (line 203) | func (x *CheckHealthRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 216) | func (*CheckHealthRequest) Descriptor() ([]byte, []int) {
  type CheckHealthResponse (line 220) | type CheckHealthResponse struct
    method Reset (line 226) | func (x *CheckHealthResponse) Reset() {
    method String (line 235) | func (x *CheckHealthResponse) String() string {
    method ProtoMessage (line 239) | func (*CheckHealthResponse) ProtoMessage() {}
    method ProtoReflect (line 241) | func (x *CheckHealthResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 254) | func (*CheckHealthResponse) Descriptor() ([]byte, []int) {
  type CreateCustomerRequest (line 258) | type CreateCustomerRequest struct
    method Reset (line 267) | func (x *CreateCustomerRequest) Reset() {
    method String (line 276) | func (x *CreateCustomerRequest) String() string {
    method ProtoMessage (line 280) | func (*CreateCustomerRequest) ProtoMessage() {}
    method ProtoReflect (line 282) | func (x *CreateCustomerRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 295) | func (*CreateCustomerRequest) Descriptor() ([]byte, []int) {
    method GetCustomer (line 299) | func (x *CreateCustomerRequest) GetCustomer() *CreateCustomerRequest_P...
    method GetParent (line 306) | func (x *CreateCustomerRequest) GetParent() *CreateCustomerRequest_Par...
  type CreateCustomerResponse (line 313) | type CreateCustomerResponse struct
    method Reset (line 321) | func (x *CreateCustomerResponse) Reset() {
    method String (line 330) | func (x *CreateCustomerResponse) String() string {
    method ProtoMessage (line 334) | func (*CreateCustomerResponse) ProtoMessage() {}
    method ProtoReflect (line 336) | func (x *CreateCustomerResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 349) | func (*CreateCustomerResponse) Descriptor() ([]byte, []int) {
    method GetCustomerId (line 353) | func (x *CreateCustomerResponse) GetCustomerId() string {
  type GetCustomerRequest (line 360) | type GetCustomerRequest struct
    method Reset (line 368) | func (x *GetCustomerRequest) Reset() {
    method String (line 377) | func (x *GetCustomerRequest) String() string {
    method ProtoMessage (line 381) | func (*GetCustomerRequest) ProtoMessage() {}
    method ProtoReflect (line 383) | func (x *GetCustomerRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 396) | func (*GetCustomerRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 400) | func (x *GetCustomerRequest) GetKey() string {
  type GetCustomerResponse (line 407) | type GetCustomerResponse struct
    method Reset (line 429) | func (x *GetCustomerResponse) Reset() {
    method String (line 438) | func (x *GetCustomerResponse) String() string {
    method ProtoMessage (line 442) | func (*GetCustomerResponse) ProtoMessage() {}
    method ProtoReflect (line 444) | func (x *GetCustomerResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 457) | func (*GetCustomerResponse) Descriptor() ([]byte, []int) {
    method GetKey (line 461) | func (x *GetCustomerResponse) GetKey() string {
    method GetCustomerId (line 468) | func (x *GetCustomerResponse) GetCustomerId() string {
    method GetParentKey (line 475) | func (x *GetCustomerResponse) GetParentKey() string {
    method GetEmail (line 482) | func (x *GetCustomerResponse) GetEmail() string {
    method GetAccountType (line 489) | func (x *GetCustomerResponse) GetAccountType() int32 {
    method GetAccountStatus (line 496) | func (x *GetCustomerResponse) GetAccountStatus() string {
    method GetSubscriptionStatus (line 503) | func (x *GetCustomerResponse) GetSubscriptionStatus() string {
    method GetBalance (line 510) | func (x *GetCustomerResponse) GetBalance() int64 {
    method GetBillable (line 517) | func (x *GetCustomerResponse) GetBillable() bool {
    method GetDelinquent (line 524) | func (x *GetCustomerResponse) GetDelinquent() bool {
    method GetCreatedAt (line 531) | func (x *GetCustomerResponse) GetCreatedAt() int64 {
    method GetGracePeriodEnd (line 538) | func (x *GetCustomerResponse) GetGracePeriodEnd() int64 {
    method GetInvoicePeriod (line 545) | func (x *GetCustomerResponse) GetInvoicePeriod() *Period {
    method GetDailyUsage (line 552) | func (x *GetCustomerResponse) GetDailyUsage() map[string]*Usage {
    method GetDependents (line 559) | func (x *GetCustomerResponse) GetDependents() int64 {
  type ListDependentCustomersRequest (line 566) | type ListDependentCustomersRequest struct
    method Reset (line 576) | func (x *ListDependentCustomersRequest) Reset() {
    method String (line 585) | func (x *ListDependentCustomersRequest) String() string {
    method ProtoMessage (line 589) | func (*ListDependentCustomersRequest) ProtoMessage() {}
    method ProtoReflect (line 591) | func (x *ListDependentCustomersRequest) ProtoReflect() protoreflect.Me...
    method Descriptor (line 604) | func (*ListDependentCustomersRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 608) | func (x *ListDependentCustomersRequest) GetKey() string {
    method GetOffset (line 615) | func (x *ListDependentCustomersRequest) GetOffset() int64 {
    method GetLimit (line 622) | func (x *ListDependentCustomersRequest) GetLimit() int64 {
  type ListDependentCustomersResponse (line 629) | type ListDependentCustomersResponse struct
    method Reset (line 638) | func (x *ListDependentCustomersResponse) Reset() {
    method String (line 647) | func (x *ListDependentCustomersResponse) String() string {
    method ProtoMessage (line 651) | func (*ListDependentCustomersResponse) ProtoMessage() {}
    method ProtoReflect (line 653) | func (x *ListDependentCustomersResponse) ProtoReflect() protoreflect.M...
    method Descriptor (line 666) | func (*ListDependentCustomersResponse) Descriptor() ([]byte, []int) {
    method GetCustomers (line 670) | func (x *ListDependentCustomersResponse) GetCustomers() []*GetCustomer...
    method GetNextOffset (line 677) | func (x *ListDependentCustomersResponse) GetNextOffset() int64 {
  type GetCustomerSessionRequest (line 684) | type GetCustomerSessionRequest struct
    method Reset (line 692) | func (x *GetCustomerSessionRequest) Reset() {
    method String (line 701) | func (x *GetCustomerSessionRequest) String() string {
    method ProtoMessage (line 705) | func (*GetCustomerSessionRequest) ProtoMessage() {}
    method ProtoReflect (line 707) | func (x *GetCustomerSessionRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 720) | func (*GetCustomerSessionRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 724) | func (x *GetCustomerSessionRequest) GetKey() string {
  type GetCustomerSessionResponse (line 731) | type GetCustomerSessionResponse struct
    method Reset (line 739) | func (x *GetCustomerSessionResponse) Reset() {
    method String (line 748) | func (x *GetCustomerSessionResponse) String() string {
    method ProtoMessage (line 752) | func (*GetCustomerSessionResponse) ProtoMessage() {}
    method ProtoReflect (line 754) | func (x *GetCustomerSessionResponse) ProtoReflect() protoreflect.Messa...
    method Descriptor (line 767) | func (*GetCustomerSessionResponse) Descriptor() ([]byte, []int) {
    method GetUrl (line 771) | func (x *GetCustomerSessionResponse) GetUrl() string {
  type UpdateCustomerRequest (line 778) | type UpdateCustomerRequest struct
    method Reset (line 789) | func (x *UpdateCustomerRequest) Reset() {
    method String (line 798) | func (x *UpdateCustomerRequest) String() string {
    method ProtoMessage (line 802) | func (*UpdateCustomerRequest) ProtoMessage() {}
    method ProtoReflect (line 804) | func (x *UpdateCustomerRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 817) | func (*UpdateCustomerRequest) Descriptor() ([]byte, []int) {
    method GetCustomerId (line 821) | func (x *UpdateCustomerRequest) GetCustomerId() string {
    method GetBalance (line 828) | func (x *UpdateCustomerRequest) GetBalance() int64 {
    method GetBillable (line 835) | func (x *UpdateCustomerRequest) GetBillable() bool {
    method GetDelinquent (line 842) | func (x *UpdateCustomerRequest) GetDelinquent() bool {
  type UpdateCustomerResponse (line 849) | type UpdateCustomerResponse struct
    method Reset (line 855) | func (x *UpdateCustomerResponse) Reset() {
    method String (line 864) | func (x *UpdateCustomerResponse) String() string {
    method ProtoMessage (line 868) | func (*UpdateCustomerResponse) ProtoMessage() {}
    method ProtoReflect (line 870) | func (x *UpdateCustomerResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 883) | func (*UpdateCustomerResponse) Descriptor() ([]byte, []int) {
  type UpdateCustomerSubscriptionRequest (line 887) | type UpdateCustomerSubscriptionRequest struct
    method Reset (line 897) | func (x *UpdateCustomerSubscriptionRequest) Reset() {
    method String (line 906) | func (x *UpdateCustomerSubscriptionRequest) String() string {
    method ProtoMessage (line 910) | func (*UpdateCustomerSubscriptionRequest) ProtoMessage() {}
    method ProtoReflect (line 912) | func (x *UpdateCustomerSubscriptionRequest) ProtoReflect() protoreflec...
    method Descriptor (line 925) | func (*UpdateCustomerSubscriptionRequest) Descriptor() ([]byte, []int) {
    method GetCustomerId (line 929) | func (x *UpdateCustomerSubscriptionRequest) GetCustomerId() string {
    method GetStatus (line 936) | func (x *UpdateCustomerSubscriptionRequest) GetStatus() string {
    method GetInvoicePeriod (line 943) | func (x *UpdateCustomerSubscriptionRequest) GetInvoicePeriod() *Period {
  type UpdateCustomerSubscriptionResponse (line 950) | type UpdateCustomerSubscriptionResponse struct
    method Reset (line 956) | func (x *UpdateCustomerSubscriptionResponse) Reset() {
    method String (line 965) | func (x *UpdateCustomerSubscriptionResponse) String() string {
    method ProtoMessage (line 969) | func (*UpdateCustomerSubscriptionResponse) ProtoMessage() {}
    method ProtoReflect (line 971) | func (x *UpdateCustomerSubscriptionResponse) ProtoReflect() protorefle...
    method Descriptor (line 984) | func (*UpdateCustomerSubscriptionResponse) Descriptor() ([]byte, []int) {
  type RecreateCustomerSubscriptionRequest (line 988) | type RecreateCustomerSubscriptionRequest struct
    method Reset (line 996) | func (x *RecreateCustomerSubscriptionRequest) Reset() {
    method String (line 1005) | func (x *RecreateCustomerSubscriptionRequest) String() string {
    method ProtoMessage (line 1009) | func (*RecreateCustomerSubscriptionRequest) ProtoMessage() {}
    method ProtoReflect (line 1011) | func (x *RecreateCustomerSubscriptionRequest) ProtoReflect() protorefl...
    method Descriptor (line 1024) | func (*RecreateCustomerSubscriptionRequest) Descriptor() ([]byte, []in...
    method GetKey (line 1028) | func (x *RecreateCustomerSubscriptionRequest) GetKey() string {
  type RecreateCustomerSubscriptionResponse (line 1035) | type RecreateCustomerSubscriptionResponse struct
    method Reset (line 1041) | func (x *RecreateCustomerSubscriptionResponse) Reset() {
    method String (line 1050) | func (x *RecreateCustomerSubscriptionResponse) String() string {
    method ProtoMessage (line 1054) | func (*RecreateCustomerSubscriptionResponse) ProtoMessage() {}
    method ProtoReflect (line 1056) | func (x *RecreateCustomerSubscriptionResponse) ProtoReflect() protoref...
    method Descriptor (line 1069) | func (*RecreateCustomerSubscriptionResponse) Descriptor() ([]byte, []i...
  type DeleteCustomerRequest (line 1073) | type DeleteCustomerRequest struct
    method Reset (line 1081) | func (x *DeleteCustomerRequest) Reset() {
    method String (line 1090) | func (x *DeleteCustomerRequest) String() string {
    method ProtoMessage (line 1094) | func (*DeleteCustomerRequest) ProtoMessage() {}
    method ProtoReflect (line 1096) | func (x *DeleteCustomerRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1109) | func (*DeleteCustomerRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1113) | func (x *DeleteCustomerRequest) GetKey() string {
  type DeleteCustomerResponse (line 1120) | type DeleteCustomerResponse struct
    method Reset (line 1126) | func (x *DeleteCustomerResponse) Reset() {
    method String (line 1135) | func (x *DeleteCustomerResponse) String() string {
    method ProtoMessage (line 1139) | func (*DeleteCustomerResponse) ProtoMessage() {}
    method ProtoReflect (line 1141) | func (x *DeleteCustomerResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1154) | func (*DeleteCustomerResponse) Descriptor() ([]byte, []int) {
  type GetCustomerUsageRequest (line 1158) | type GetCustomerUsageRequest struct
    method Reset (line 1166) | func (x *GetCustomerUsageRequest) Reset() {
    method String (line 1175) | func (x *GetCustomerUsageRequest) String() string {
    method ProtoMessage (line 1179) | func (*GetCustomerUsageRequest) ProtoMessage() {}
    method ProtoReflect (line 1181) | func (x *GetCustomerUsageRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1194) | func (*GetCustomerUsageRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1198) | func (x *GetCustomerUsageRequest) GetKey() string {
  type GetCustomerUsageResponse (line 1205) | type GetCustomerUsageResponse struct
    method Reset (line 1213) | func (x *GetCustomerUsageResponse) Reset() {
    method String (line 1222) | func (x *GetCustomerUsageResponse) String() string {
    method ProtoMessage (line 1226) | func (*GetCustomerUsageResponse) ProtoMessage() {}
    method ProtoReflect (line 1228) | func (x *GetCustomerUsageResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1241) | func (*GetCustomerUsageResponse) Descriptor() ([]byte, []int) {
    method GetUsage (line 1245) | func (x *GetCustomerUsageResponse) GetUsage() map[string]*Usage {
  type IncCustomerUsageRequest (line 1252) | type IncCustomerUsageRequest struct
    method Reset (line 1261) | func (x *IncCustomerUsageRequest) Reset() {
    method String (line 1270) | func (x *IncCustomerUsageRequest) String() string {
    method ProtoMessage (line 1274) | func (*IncCustomerUsageRequest) ProtoMessage() {}
    method ProtoReflect (line 1276) | func (x *IncCustomerUsageRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1289) | func (*IncCustomerUsageRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1293) | func (x *IncCustomerUsageRequest) GetKey() string {
    method GetProductUsage (line 1300) | func (x *IncCustomerUsageRequest) GetProductUsage() map[string]int64 {
  type IncCustomerUsageResponse (line 1307) | type IncCustomerUsageResponse struct
    method Reset (line 1315) | func (x *IncCustomerUsageResponse) Reset() {
    method String (line 1324) | func (x *IncCustomerUsageResponse) String() string {
    method ProtoMessage (line 1328) | func (*IncCustomerUsageResponse) ProtoMessage() {}
    method ProtoReflect (line 1330) | func (x *IncCustomerUsageResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1343) | func (*IncCustomerUsageResponse) Descriptor() ([]byte, []int) {
    method GetDailyUsage (line 1347) | func (x *IncCustomerUsageResponse) GetDailyUsage() map[string]*Usage {
  type ReportCustomerUsageRequest (line 1354) | type ReportCustomerUsageRequest struct
    method Reset (line 1362) | func (x *ReportCustomerUsageRequest) Reset() {
    method String (line 1371) | func (x *ReportCustomerUsageRequest) String() string {
    method ProtoMessage (line 1375) | func (*ReportCustomerUsageRequest) ProtoMessage() {}
    method ProtoReflect (line 1377) | func (x *ReportCustomerUsageRequest) ProtoReflect() protoreflect.Messa...
    method Descriptor (line 1390) | func (*ReportCustomerUsageRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1394) | func (x *ReportCustomerUsageRequest) GetKey() string {
  type ReportCustomerUsageResponse (line 1401) | type ReportCustomerUsageResponse struct
    method Reset (line 1407) | func (x *ReportCustomerUsageResponse) Reset() {
    method String (line 1416) | func (x *ReportCustomerUsageResponse) String() string {
    method ProtoMessage (line 1420) | func (*ReportCustomerUsageResponse) ProtoMessage() {}
    method ProtoReflect (line 1422) | func (x *ReportCustomerUsageResponse) ProtoReflect() protoreflect.Mess...
    method Descriptor (line 1435) | func (*ReportCustomerUsageResponse) Descriptor() ([]byte, []int) {
  type IdentifyRequest (line 1439) | type IdentifyRequest struct
    method Reset (line 1451) | func (x *IdentifyRequest) Reset() {
    method String (line 1460) | func (x *IdentifyRequest) String() string {
    method ProtoMessage (line 1464) | func (*IdentifyRequest) ProtoMessage() {}
    method ProtoReflect (line 1466) | func (x *IdentifyRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1479) | func (*IdentifyRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1483) | func (x *IdentifyRequest) GetKey() string {
    method GetAccountType (line 1490) | func (x *IdentifyRequest) GetAccountType() int32 {
    method GetActive (line 1497) | func (x *IdentifyRequest) GetActive() bool {
    method GetEmail (line 1504) | func (x *IdentifyRequest) GetEmail() string {
    method GetProperties (line 1511) | func (x *IdentifyRequest) GetProperties() map[string]string {
  type IdentifyResponse (line 1518) | type IdentifyResponse struct
    method Reset (line 1524) | func (x *IdentifyResponse) Reset() {
    method String (line 1533) | func (x *IdentifyResponse) String() string {
    method ProtoMessage (line 1537) | func (*IdentifyResponse) ProtoMessage() {}
    method ProtoReflect (line 1539) | func (x *IdentifyResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1552) | func (*IdentifyResponse) Descriptor() ([]byte, []int) {
  type TrackEventRequest (line 1556) | type TrackEventRequest struct
    method Reset (line 1568) | func (x *TrackEventRequest) Reset() {
    method String (line 1577) | func (x *TrackEventRequest) String() string {
    method ProtoMessage (line 1581) | func (*TrackEventRequest) ProtoMessage() {}
    method ProtoReflect (line 1583) | func (x *TrackEventRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1596) | func (*TrackEventRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1600) | func (x *TrackEventRequest) GetKey() string {
    method GetAccountType (line 1607) | func (x *TrackEventRequest) GetAccountType() int32 {
    method GetActive (line 1614) | func (x *TrackEventRequest) GetActive() bool {
    method GetEvent (line 1621) | func (x *TrackEventRequest) GetEvent() int32 {
    method GetProperties (line 1628) | func (x *TrackEventRequest) GetProperties() map[string]string {
  type TrackEventResponse (line 1635) | type TrackEventResponse struct
    method Reset (line 1641) | func (x *TrackEventResponse) Reset() {
    method String (line 1650) | func (x *TrackEventResponse) String() string {
    method ProtoMessage (line 1654) | func (*TrackEventResponse) ProtoMessage() {}
    method ProtoReflect (line 1656) | func (x *TrackEventResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1669) | func (*TrackEventResponse) Descriptor() ([]byte, []int) {
  type CreateCustomerRequest_Params (line 1673) | type CreateCustomerRequest_Params struct
    method Reset (line 1684) | func (x *CreateCustomerRequest_Params) Reset() {
    method String (line 1693) | func (x *CreateCustomerRequest_Params) String() string {
    method ProtoMessage (line 1697) | func (*CreateCustomerRequest_Params) ProtoMessage() {}
    method ProtoReflect (line 1699) | func (x *CreateCustomerRequest_Params) ProtoReflect() protoreflect.Mes...
    method Descriptor (line 1712) | func (*CreateCustomerRequest_Params) Descriptor() ([]byte, []int) {
    method GetKey (line 1716) | func (x *CreateCustomerRequest_Params) GetKey() string {
    method GetEmail (line 1723) | func (x *CreateCustomerRequest_Params) GetEmail() string {
    method GetAccountType (line 1730) | func (x *CreateCustomerRequest_Params) GetAccountType() int32 {
    method GetUsername (line 1737) | func (x *CreateCustomerRequest_Params) GetUsername() string {
  function file_api_billingd_pb_billingd_proto_rawDescGZIP (line 2078) | func file_api_billingd_pb_billingd_proto_rawDescGZIP() []byte {
  function init (line 2176) | func init() { file_api_billingd_pb_billingd_proto_init() }
  function file_api_billingd_pb_billingd_proto_init (line 2177) | func file_api_billingd_pb_billingd_proto_init() {
  constant _ (line 2581) | _ = grpc.SupportPackageIsVersion6
  type APIServiceClient (line 2586) | type APIServiceClient interface
  type aPIServiceClient (line 2603) | type aPIServiceClient struct
    method CheckHealth (line 2611) | func (c *aPIServiceClient) CheckHealth(ctx context.Context, in *CheckH...
    method CreateCustomer (line 2620) | func (c *aPIServiceClient) CreateCustomer(ctx context.Context, in *Cre...
    method GetCustomer (line 2629) | func (c *aPIServiceClient) GetCustomer(ctx context.Context, in *GetCus...
    method ListDependentCustomers (line 2638) | func (c *aPIServiceClient) ListDependentCustomers(ctx context.Context,...
    method GetCustomerSession (line 2647) | func (c *aPIServiceClient) GetCustomerSession(ctx context.Context, in ...
    method UpdateCustomer (line 2656) | func (c *aPIServiceClient) UpdateCustomer(ctx context.Context, in *Upd...
    method UpdateCustomerSubscription (line 2665) | func (c *aPIServiceClient) UpdateCustomerSubscription(ctx context.Cont...
    method RecreateCustomerSubscription (line 2674) | func (c *aPIServiceClient) RecreateCustomerSubscription(ctx context.Co...
    method DeleteCustomer (line 2683) | func (c *aPIServiceClient) DeleteCustomer(ctx context.Context, in *Del...
    method GetCustomerUsage (line 2692) | func (c *aPIServiceClient) GetCustomerUsage(ctx context.Context, in *G...
    method IncCustomerUsage (line 2701) | func (c *aPIServiceClient) IncCustomerUsage(ctx context.Context, in *I...
    method ReportCustomerUsage (line 2710) | func (c *aPIServiceClient) ReportCustomerUsage(ctx context.Context, in...
    method Identify (line 2719) | func (c *aPIServiceClient) Identify(ctx context.Context, in *IdentifyR...
    method TrackEvent (line 2728) | func (c *aPIServiceClient) TrackEvent(ctx context.Context, in *TrackEv...
  function NewAPIServiceClient (line 2607) | func NewAPIServiceClient(cc grpc.ClientConnInterface) APIServiceClient {
  type APIServiceServer (line 2738) | type APIServiceServer interface
  type UnimplementedAPIServiceServer (line 2756) | type UnimplementedAPIServiceServer struct
    method CheckHealth (line 2759) | func (*UnimplementedAPIServiceServer) CheckHealth(context.Context, *Ch...
    method CreateCustomer (line 2762) | func (*UnimplementedAPIServiceServer) CreateCustomer(context.Context, ...
    method GetCustomer (line 2765) | func (*UnimplementedAPIServiceServer) GetCustomer(context.Context, *Ge...
    method ListDependentCustomers (line 2768) | func (*UnimplementedAPIServiceServer) ListDependentCustomers(context.C...
    method GetCustomerSession (line 2771) | func (*UnimplementedAPIServiceServer) GetCustomerSession(context.Conte...
    method UpdateCustomer (line 2774) | func (*UnimplementedAPIServiceServer) UpdateCustomer(context.Context, ...
    method UpdateCustomerSubscription (line 2777) | func (*UnimplementedAPIServiceServer) UpdateCustomerSubscription(conte...
    method RecreateCustomerSubscription (line 2780) | func (*UnimplementedAPIServiceServer) RecreateCustomerSubscription(con...
    method DeleteCustomer (line 2783) | func (*UnimplementedAPIServiceServer) DeleteCustomer(context.Context, ...
    method GetCustomerUsage (line 2786) | func (*UnimplementedAPIServiceServer) GetCustomerUsage(context.Context...
    method IncCustomerUsage (line 2789) | func (*UnimplementedAPIServiceServer) IncCustomerUsage(context.Context...
    method ReportCustomerUsage (line 2792) | func (*UnimplementedAPIServiceServer) ReportCustomerUsage(context.Cont...
    method Identify (line 2795) | func (*UnimplementedAPIServiceServer) Identify(context.Context, *Ident...
    method TrackEvent (line 2798) | func (*UnimplementedAPIServiceServer) TrackEvent(context.Context, *Tra...
  function RegisterAPIServiceServer (line 2802) | func RegisterAPIServiceServer(s *grpc.Server, srv APIServiceServer) {
  function _APIService_CheckHealth_Handler (line 2806) | func _APIService_CheckHealth_Handler(srv interface{}, ctx context.Contex...
  function _APIService_CreateCustomer_Handler (line 2824) | func _APIService_CreateCustomer_Handler(srv interface{}, ctx context.Con...
  function _APIService_GetCustomer_Handler (line 2842) | func _APIService_GetCustomer_Handler(srv interface{}, ctx context.Contex...
  function _APIService_ListDependentCustomers_Handler (line 2860) | func _APIService_ListDependentCustomers_Handler(srv interface{}, ctx con...
  function _APIService_GetCustomerSession_Handler (line 2878) | func _APIService_GetCustomerSession_Handler(srv interface{}, ctx context...
  function _APIService_UpdateCustomer_Handler (line 2896) | func _APIService_UpdateCustomer_Handler(srv interface{}, ctx context.Con...
  function _APIService_UpdateCustomerSubscription_Handler (line 2914) | func _APIService_UpdateCustomerSubscription_Handler(srv interface{}, ctx...
  function _APIService_RecreateCustomerSubscription_Handler (line 2932) | func _APIService_RecreateCustomerSubscription_Handler(srv interface{}, c...
  function _APIService_DeleteCustomer_Handler (line 2950) | func _APIService_DeleteCustomer_Handler(srv interface{}, ctx context.Con...
  function _APIService_GetCustomerUsage_Handler (line 2968) | func _APIService_GetCustomerUsage_Handler(srv interface{}, ctx context.C...
  function _APIService_IncCustomerUsage_Handler (line 2986) | func _APIService_IncCustomerUsage_Handler(srv interface{}, ctx context.C...
  function _APIService_ReportCustomerUsage_Handler (line 3004) | func _APIService_ReportCustomerUsage_Handler(srv interface{}, ctx contex...
  function _APIService_Identify_Handler (line 3022) | func _APIService_Identify_Handler(srv interface{}, ctx context.Context, ...
  function _APIService_TrackEvent_Handler (line 3040) | func _APIService_TrackEvent_Handler(srv interface{}, ctx context.Context...

FILE: api/billingd/service/service.go
  constant numDaysPerMonth (line 36) | numDaysPerMonth    = 30.4167
  constant unitPricePrecision (line 37) | unitPricePrecision = 1e12
  constant reporterTimeout (line 39) | reporterTimeout = time.Hour
  constant defaultPageSize (line 41) | defaultPageSize = 25
  constant maxPageSize (line 42) | maxPageSize     = 1000
  constant mib (line 44) | mib = 1024 * 1024
  constant gib (line 45) | gib = 1024 * mib
  constant duplicateKeyMsg (line 47) | duplicateKeyMsg = "E11000 duplicate key error"
  type Product (line 57) | type Product struct
  type PriceType (line 73) | type PriceType
  constant PriceTypeTemporal (line 76) | PriceTypeTemporal    PriceType = "temporal"
  constant PriceTypeIncremental (line 77) | PriceTypeIncremental           = "incremental"
  type FreeQuotaInterval (line 80) | type FreeQuotaInterval
  constant FreeQuotaMonthly (line 83) | FreeQuotaMonthly FreeQuotaInterval = "monthly"
  constant FreeQuotaDaily (line 84) | FreeQuotaDaily                     = "daily"
  type Customer (line 132) | type Customer struct
    method AccountStatus (line 162) | func (c *Customer) AccountStatus() string {
  type Period (line 150) | type Period struct
  type Usage (line 155) | type Usage struct
  type Service (line 174) | type Service struct
    method createPrice (line 362) | func (s *Service) createPrice(client *stripec.API, productName string,...
    method Start (line 393) | func (s *Service) Start() error {
    method Stop (line 415) | func (s *Service) Stop() error {
    method CheckHealth (line 446) | func (s *Service) CheckHealth(_ context.Context, _ *pb.CheckHealthRequ...
    method CreateCustomer (line 451) | func (s *Service) CreateCustomer(ctx context.Context, req *pb.CreateCu...
    method createCustomer (line 470) | func (s *Service) createCustomer(
    method getCustomer (line 518) | func (s *Service) getCustomer(ctx context.Context, key, val string) (*...
    method createSubscription (line 527) | func (s *Service) createSubscription(cus *Customer) error {
    method GetCustomer (line 574) | func (s *Service) GetCustomer(ctx context.Context, req *pb.GetCustomer...
    method dailyUsageToPb (line 590) | func (s *Service) dailyUsageToPb(usage map[string]Usage) map[string]*p...
    method getSummary (line 663) | func (s *Service) getSummary(cus *Customer, deps int64) map[string]int...
    method customerToPb (line 682) | func (s *Service) customerToPb(ctx context.Context, doc *Customer) (*p...
    method GetCustomerSession (line 744) | func (s *Service) GetCustomerSession(ctx context.Context, req *pb.GetC...
    method ListDependentCustomers (line 767) | func (s *Service) ListDependentCustomers(ctx context.Context, req *pb....
    method UpdateCustomer (line 817) | func (s *Service) UpdateCustomer(ctx context.Context, req *pb.UpdateCu...
    method UpdateCustomerSubscription (line 840) | func (s *Service) UpdateCustomerSubscription(ctx context.Context, req ...
    method RecreateCustomerSubscription (line 872) | func (s *Service) RecreateCustomerSubscription(ctx context.Context, re...
    method DeleteCustomer (line 903) | func (s *Service) DeleteCustomer(ctx context.Context, req *pb.DeleteCu...
    method GetCustomerUsage (line 923) | func (s *Service) GetCustomerUsage(
    method getPeriodUsageItem (line 958) | func (s *Service) getPeriodUsageItem(id string) (sum *stripe.UsageReco...
    method IncCustomerUsage (line 977) | func (s *Service) IncCustomerUsage(
    method handleCustomerUsage (line 984) | func (s *Service) handleCustomerUsage(
    method handleUsage (line 1030) | func (s *Service) handleUsage(ctx context.Context, cus *Customer, prod...
    method ReportCustomerUsage (line 1067) | func (s *Service) ReportCustomerUsage(
    method reportUsage (line 1081) | func (s *Service) reportUsage() error {
    method reportCustomerUsage (line 1104) | func (s *Service) reportCustomerUsage(ctx context.Context, cus *Custom...
    method reportUnits (line 1138) | func (s *Service) reportUnits(product Product, usage Usage, parentKey ...
    method Identify (line 1168) | func (s *Service) Identify(_ context.Context, req *pb.IdentifyRequest)...
    method TrackEvent (line 1184) | func (s *Service) TrackEvent(_ context.Context, req *pb.TrackEventRequ...
  type customerLock (line 193) | type customerLock
    method Key (line 195) | func (l customerLock) Key() string {
  type Config (line 199) | type Config struct
  function NewService (line 220) | func NewService(ctx context.Context, config Config) (*Service, error) {
  function getUnitPrice (line 326) | func getUnitPrice(product Product) float64 {
  function newStripeClient (line 337) | func newStripeClient(url, key string) (*stripec.API, error) {
  function periodToPb (line 583) | func periodToPb(period Period) *pb.Period {
  function getCurrentDayBounds (line 601) | func getCurrentDayBounds() (int64, int64) {
  function getCost (line 608) | func getCost(product Product, paidUnits int64) float64 {
  function getUsage (line 615) | func getUsage(product Product, total int64, period Period) *pb.Usage {
  function getUnits (line 638) | func getUnits(product Product, total int64) (freeUnits, paidUnits int64) {
  function addProductToSummary (line 651) | func addProductToSummary(summary map[string]interface{}, product Product...

FILE: api/bucketsd/client/client.go
  constant chunkSize (line 26) | chunkSize = 1024 * 32
  type Client (line 35) | type Client struct
    method Close (line 53) | func (c *Client) Close() error {
    method Create (line 59) | func (c *Client) Create(ctx context.Context, opts ...CreateOption) (*p...
    method Root (line 77) | func (c *Client) Root(ctx context.Context, key string) (*pb.RootRespon...
    method Links (line 84) | func (c *Client) Links(ctx context.Context, key, pth string) (*pb.Link...
    method List (line 92) | func (c *Client) List(ctx context.Context) (*pb.ListResponse, error) {
    method ListIpfsPath (line 97) | func (c *Client) ListIpfsPath(ctx context.Context, pth path.Path) (*pb...
    method ListPath (line 102) | func (c *Client) ListPath(ctx context.Context, key, pth string) (*pb.L...
    method SetPath (line 110) | func (c *Client) SetPath(ctx context.Context, key, pth string, remoteC...
    method MovePath (line 119) | func (c *Client) MovePath(ctx context.Context, key, pth string, dest s...
    method PushPath (line 136) | func (c *Client) PushPath(
    method PushPaths (line 449) | func (c *Client) PushPaths(ctx context.Context, key string, opts ...Op...
    method PullPath (line 601) | func (c *Client) PullPath(ctx context.Context, key, pth string, writer...
    method PullIpfsPath (line 637) | func (c *Client) PullIpfsPath(ctx context.Context, pth path.Path, writ...
    method Remove (line 672) | func (c *Client) Remove(ctx context.Context, key string) error {
    method RemovePath (line 681) | func (c *Client) RemovePath(ctx context.Context, key, pth string, opts...
    method PushPathAccessRoles (line 705) | func (c *Client) PushPathAccessRoles(ctx context.Context, key, pth str...
    method PullPathAccessRoles (line 719) | func (c *Client) PullPathAccessRoles(ctx context.Context, key, pth str...
    method DefaultArchiveConfig (line 731) | func (c *Client) DefaultArchiveConfig(ctx context.Context, key string)...
    method SetDefaultArchiveConfig (line 740) | func (c *Client) SetDefaultArchiveConfig(ctx context.Context, key stri...
    method Archive (line 750) | func (c *Client) Archive(ctx context.Context, key string, opts ...Arch...
    method Archives (line 762) | func (c *Client) Archives(ctx context.Context, key string) (*pb.Archiv...
    method ArchiveWatch (line 767) | func (c *Client) ArchiveWatch(ctx context.Context, key string, ch chan...
  function NewClient (line 41) | func NewClient(target string, opts ...grpc.DialOption) (*Client, error) {
  type pushPathResult (line 128) | type pushPathResult struct
  type PushPathsResult (line 236) | type PushPathsResult struct
  type PushPathsQueue (line 247) | type PushPathsQueue struct
    method AddFile (line 278) | func (c *PushPathsQueue) AddFile(pth, name string) error {
    method AddReader (line 314) | func (c *PushPathsQueue) AddReader(pth string, r io.Reader, size int64...
    method Size (line 334) | func (c *PushPathsQueue) Size() int64 {
    method Complete (line 339) | func (c *PushPathsQueue) Complete() int64 {
    method Next (line 345) | func (c *PushPathsQueue) Next() (ok bool) {
    method start (line 376) | func (c *PushPathsQueue) start() {
    method stop (line 407) | func (c *PushPathsQueue) stop() {
    method Err (line 415) | func (c *PushPathsQueue) Err() error {
    method Close (line 423) | func (c *PushPathsQueue) Close() error {
  type pushPath (line 270) | type pushPath struct

FILE: api/bucketsd/client/client_test.go
  function TestMain (line 37) | func TestMain(m *testing.M) {
  function TestClient_Create (line 47) | func TestClient_Create(t *testing.T) {
  function TestClient_CreateWithCid (line 79) | func TestClient_CreateWithCid(t *testing.T) {
  function createWithCid (line 91) | func createWithCid(t *testing.T, ctx context.Context, client *c.Client, ...
  function TestClient_Root (line 134) | func TestClient_Root(t *testing.T) {
  function TestClient_Links (line 152) | func TestClient_Links(t *testing.T) {
  function TestClient_List (line 164) | func TestClient_List(t *testing.T) {
  function TestClient_ListPath (line 187) | func TestClient_ListPath(t *testing.T) {
  function listPath (line 199) | func listPath(t *testing.T, ctx context.Context, client *c.Client, priva...
  function TestClient_ListIpfsPath (line 251) | func TestClient_ListIpfsPath(t *testing.T) {
  function TestClient_PushPath (line 280) | func TestClient_PushPath(t *testing.T) {
  function pushPath (line 292) | func pushPath(t *testing.T, ctx context.Context, client *c.Client, priva...
  function TestClient_PushPaths (line 381) | func TestClient_PushPaths(t *testing.T) {
  function pushPaths (line 393) | func pushPaths(t *testing.T, ctx context.Context, client *c.Client, priv...
  function TestClient_PullPath (line 489) | func TestClient_PullPath(t *testing.T) {
  function pullPath (line 501) | func pullPath(t *testing.T, ctx context.Context, client *c.Client, priva...
  function TestClient_PullIpfsPath (line 549) | func TestClient_PullIpfsPath(t *testing.T) {
  function TestClient_SetPath (line 595) | func TestClient_SetPath(t *testing.T) {
  function setPath (line 605) | func setPath(t *testing.T, private bool) {
  function TestClient_Move (line 715) | func TestClient_Move(t *testing.T) {
  function move (line 727) | func move(t *testing.T, ctx context.Context, client *c.Client, private b...
  function TestClient_Remove (line 815) | func TestClient_Remove(t *testing.T) {
  function remove (line 827) | func remove(t *testing.T, ctx context.Context, client *c.Client, private...
  function TestClient_RemovePath (line 849) | func TestClient_RemovePath(t *testing.T) {
  function removePath (line 861) | func removePath(t *testing.T, ctx context.Context, client *c.Client, pri...
  function TestClient_PushPathAccessRoles (line 894) | func TestClient_PushPathAccessRoles(t *testing.T) {
  function pushPathAccessRoles (line 906) | func pushPathAccessRoles(
  type accessCheck (line 1138) | type accessCheck struct
  function checkAccess (line 1147) | func checkAccess(t *testing.T, ctx context.Context, client *c.Client, ch...
  function TestClient_PullPathAccessRoles (line 1189) | func TestClient_PullPathAccessRoles(t *testing.T) {
  function TestClose (line 1221) | func TestClose(t *testing.T) {
  function setup (line 1234) | func setup(t *testing.T) (context.Context, *c.Client) {
  function setupForUsers (line 1246) | func setupForUsers(t *testing.T) (context.Context, context.Context, *tc....
  function setupWithConf (line 1263) | func setupWithConf(t *testing.T, conf core.Config) (context.Context, *hc...
  function newUser (line 1290) | func newUser(t *testing.T, ctx context.Context, threadsclient *tc.Client...

FILE: api/bucketsd/client/options.go
  type createOptions (line 9) | type createOptions struct
  type CreateOption (line 16) | type CreateOption
  function WithName (line 19) | func WithName(name string) CreateOption {
  function WithPrivate (line 26) | func WithPrivate(private bool) CreateOption {
  function WithCid (line 34) | func WithCid(c cid.Cid) CreateOption {
  function WithUnfreeze (line 42) | func WithUnfreeze(enabled bool) CreateOption {
  type options (line 48) | type options struct
  type Option (line 53) | type Option
  function WithFastForwardOnly (line 56) | func WithFastForwardOnly(root path.Resolved) Option {
  function WithProgress (line 63) | func WithProgress(ch chan<- int64) Option {
  type ArchiveOption (line 69) | type ArchiveOption
  function WithArchiveConfig (line 72) | func WithArchiveConfig(config *pb.ArchiveConfig) ArchiveOption {
  function WithSkipAutomaticVerifiedDeal (line 80) | func WithSkipAutomaticVerifiedDeal(enabled bool) ArchiveOption {

FILE: api/bucketsd/pb/bucketsd.pb.go
  constant _ (line 23) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 25) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  constant _ (line 30) | _ = proto.ProtoPackageIsVersion4
  type PathAccessRole (line 32) | type PathAccessRole
    method Enum (line 57) | func (x PathAccessRole) Enum() *PathAccessRole {
    method String (line 63) | func (x PathAccessRole) String() string {
    method Descriptor (line 67) | func (PathAccessRole) Descriptor() protoreflect.EnumDescriptor {
    method Type (line 71) | func (PathAccessRole) Type() protoreflect.EnumType {
    method Number (line 75) | func (x PathAccessRole) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 80) | func (PathAccessRole) EnumDescriptor() ([]byte, []int) {
  constant PathAccessRole_PATH_ACCESS_ROLE_UNSPECIFIED (line 35) | PathAccessRole_PATH_ACCESS_ROLE_UNSPECIFIED PathAccessRole = 0
  constant PathAccessRole_PATH_ACCESS_ROLE_READER (line 36) | PathAccessRole_PATH_ACCESS_ROLE_READER      PathAccessRole = 1
  constant PathAccessRole_PATH_ACCESS_ROLE_WRITER (line 37) | PathAccessRole_PATH_ACCESS_ROLE_WRITER      PathAccessRole = 2
  constant PathAccessRole_PATH_ACCESS_ROLE_ADMIN (line 38) | PathAccessRole_PATH_ACCESS_ROLE_ADMIN       PathAccessRole = 3
  type ArchiveStatus (line 84) | type ArchiveStatus
    method Enum (line 115) | func (x ArchiveStatus) Enum() *ArchiveStatus {
    method String (line 121) | func (x ArchiveStatus) String() string {
    method Descriptor (line 125) | func (ArchiveStatus) Descriptor() protoreflect.EnumDescriptor {
    method Type (line 129) | func (ArchiveStatus) Type() protoreflect.EnumType {
    method Number (line 133) | func (x ArchiveStatus) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 138) | func (ArchiveStatus) EnumDescriptor() ([]byte, []int) {
  constant ArchiveStatus_ARCHIVE_STATUS_UNSPECIFIED (line 87) | ArchiveStatus_ARCHIVE_STATUS_UNSPECIFIED ArchiveStatus = 0
  constant ArchiveStatus_ARCHIVE_STATUS_QUEUED (line 88) | ArchiveStatus_ARCHIVE_STATUS_QUEUED      ArchiveStatus = 1
  constant ArchiveStatus_ARCHIVE_STATUS_EXECUTING (line 89) | ArchiveStatus_ARCHIVE_STATUS_EXECUTING   ArchiveStatus = 2
  constant ArchiveStatus_ARCHIVE_STATUS_FAILED (line 90) | ArchiveStatus_ARCHIVE_STATUS_FAILED      ArchiveStatus = 3
  constant ArchiveStatus_ARCHIVE_STATUS_CANCELED (line 91) | ArchiveStatus_ARCHIVE_STATUS_CANCELED    ArchiveStatus = 4
  constant ArchiveStatus_ARCHIVE_STATUS_SUCCESS (line 92) | ArchiveStatus_ARCHIVE_STATUS_SUCCESS     ArchiveStatus = 5
  type Metadata (line 142) | type Metadata struct
    method Reset (line 152) | func (x *Metadata) Reset() {
    method String (line 161) | func (x *Metadata) String() string {
    method ProtoMessage (line 165) | func (*Metadata) ProtoMessage() {}
    method ProtoReflect (line 167) | func (x *Metadata) ProtoReflect() protoreflect.Message {
    method Descriptor (line 180) | func (*Metadata) Descriptor() ([]byte, []int) {
    method GetRoles (line 184) | func (x *Metadata) GetRoles() map[string]PathAccessRole {
    method GetUpdatedAt (line 191) | func (x *Metadata) GetUpdatedAt() int64 {
    method GetKey (line 198) | func (x *Metadata) GetKey() string {
  type Root (line 205) | type Root struct
    method Reset (line 224) | func (x *Root) Reset() {
    method String (line 233) | func (x *Root) String() string {
    method ProtoMessage (line 237) | func (*Root) ProtoMessage() {}
    method ProtoReflect (line 239) | func (x *Root) ProtoReflect() protoreflect.Message {
    method Descriptor (line 252) | func (*Root) Descriptor() ([]byte, []int) {
    method GetKey (line 256) | func (x *Root) GetKey() string {
    method GetName (line 263) | func (x *Root) GetName() string {
    method GetPath (line 270) | func (x *Root) GetPath() string {
    method GetCreatedAt (line 277) | func (x *Root) GetCreatedAt() int64 {
    method GetUpdatedAt (line 284) | func (x *Root) GetUpdatedAt() int64 {
    method GetThread (line 291) | func (x *Root) GetThread() string {
    method GetOwner (line 298) | func (x *Root) GetOwner() string {
    method GetVersion (line 305) | func (x *Root) GetVersion() int32 {
    method GetMetadata (line 312) | func (x *Root) GetMetadata() *Metadata {
    method GetLinkKey (line 319) | func (x *Root) GetLinkKey() string {
    method GetPathMetadata (line 326) | func (x *Root) GetPathMetadata() map[string]*Metadata {
    method GetArchives (line 333) | func (x *Root) GetArchives() *Archives {
  type ListRequest (line 340) | type ListRequest struct
    method Reset (line 346) | func (x *ListRequest) Reset() {
    method String (line 355) | func (x *ListRequest) String() string {
    method ProtoMessage (line 359) | func (*ListRequest) ProtoMessage() {}
    method ProtoReflect (line 361) | func (x *ListRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 374) | func (*ListRequest) Descriptor() ([]byte, []int) {
  type ListResponse (line 378) | type ListResponse struct
    method Reset (line 386) | func (x *ListResponse) Reset() {
    method String (line 395) | func (x *ListResponse) String() string {
    method ProtoMessage (line 399) | func (*ListResponse) ProtoMessage() {}
    method ProtoReflect (line 401) | func (x *ListResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 414) | func (*ListResponse) Descriptor() ([]byte, []int) {
    method GetRoots (line 418) | func (x *ListResponse) GetRoots() []*Root {
  type CreateRequest (line 425) | type CreateRequest struct
    method Reset (line 436) | func (x *CreateRequest) Reset() {
    method String (line 445) | func (x *CreateRequest) String() string {
    method ProtoMessage (line 449) | func (*CreateRequest) ProtoMessage() {}
    method ProtoReflect (line 451) | func (x *CreateRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 464) | func (*CreateRequest) Descriptor() ([]byte, []int) {
    method GetName (line 468) | func (x *CreateRequest) GetName() string {
    method GetBootstrapCid (line 475) | func (x *CreateRequest) GetBootstrapCid() string {
    method GetPrivate (line 482) | func (x *CreateRequest) GetPrivate() bool {
    method GetUnfreeze (line 489) | func (x *CreateRequest) GetUnfreeze() bool {
  type CreateResponse (line 496) | type CreateResponse struct
    method Reset (line 509) | func (x *CreateResponse) Reset() {
    method String (line 518) | func (x *CreateResponse) String() string {
    method ProtoMessage (line 522) | func (*CreateResponse) ProtoMessage() {}
    method ProtoReflect (line 524) | func (x *CreateResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 537) | func (*CreateResponse) Descriptor() ([]byte, []int) {
    method GetRoot (line 541) | func (x *CreateResponse) GetRoot() *Root {
    method GetLinks (line 548) | func (x *CreateResponse) GetLinks() *LinksResponse {
    method GetSeed (line 555) | func (x *CreateResponse) GetSeed() []byte {
    method GetSeedCid (line 562) | func (x *CreateResponse) GetSeedCid() string {
    method GetPinned (line 569) | func (x *CreateResponse) GetPinned() int64 {
    method GetRetrievalId (line 576) | func (x *CreateResponse) GetRetrievalId() string {
  type RootRequest (line 583) | type RootRequest struct
    method Reset (line 591) | func (x *RootRequest) Reset() {
    method String (line 600) | func (x *RootRequest) String() string {
    method ProtoMessage (line 604) | func (*RootRequest) ProtoMessage() {}
    method ProtoReflect (line 606) | func (x *RootRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 619) | func (*RootRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 623) | func (x *RootRequest) GetKey() string {
  type RootResponse (line 630) | type RootResponse struct
    method Reset (line 638) | func (x *RootResponse) Reset() {
    method String (line 647) | func (x *RootResponse) String() string {
    method ProtoMessage (line 651) | func (*RootResponse) ProtoMessage() {}
    method ProtoReflect (line 653) | func (x *RootResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 666) | func (*RootResponse) Descriptor() ([]byte, []int) {
    method GetRoot (line 670) | func (x *RootResponse) GetRoot() *Root {
  type LinksRequest (line 677) | type LinksRequest struct
    method Reset (line 686) | func (x *LinksRequest) Reset() {
    method String (line 695) | func (x *LinksRequest) String() string {
    method ProtoMessage (line 699) | func (*LinksRequest) ProtoMessage() {}
    method ProtoReflect (line 701) | func (x *LinksRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 714) | func (*LinksRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 718) | func (x *LinksRequest) GetKey() string {
    method GetPath (line 725) | func (x *LinksRequest) GetPath() string {
  type LinksResponse (line 732) | type LinksResponse struct
    method Reset (line 742) | func (x *LinksResponse) Reset() {
    method String (line 751) | func (x *LinksResponse) String() string {
    method ProtoMessage (line 755) | func (*LinksResponse) ProtoMessage() {}
    method ProtoReflect (line 757) | func (x *LinksResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 770) | func (*LinksResponse) Descriptor() ([]byte, []int) {
    method GetUrl (line 774) | func (x *LinksResponse) GetUrl() string {
    method GetWww (line 781) | func (x *LinksResponse) GetWww() string {
    method GetIpns (line 788) | func (x *LinksResponse) GetIpns() string {
  type ListPathRequest (line 795) | type ListPathRequest struct
    method Reset (line 804) | func (x *ListPathRequest) Reset() {
    method String (line 813) | func (x *ListPathRequest) String() string {
    method ProtoMessage (line 817) | func (*ListPathRequest) ProtoMessage() {}
    method ProtoReflect (line 819) | func (x *ListPathRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 832) | func (*ListPathRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 836) | func (x *ListPathRequest) GetKey() string {
    method GetPath (line 843) | func (x *ListPathRequest) GetPath() string {
  type ListPathResponse (line 850) | type ListPathResponse struct
    method Reset (line 859) | func (x *ListPathResponse) Reset() {
    method String (line 868) | func (x *ListPathResponse) String() string {
    method ProtoMessage (line 872) | func (*ListPathResponse) ProtoMessage() {}
    method ProtoReflect (line 874) | func (x *ListPathResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 887) | func (*ListPathResponse) Descriptor() ([]byte, []int) {
    method GetItem (line 891) | func (x *ListPathResponse) GetItem() *PathItem {
    method GetRoot (line 898) | func (x *ListPathResponse) GetRoot() *Root {
  type PathItem (line 905) | type PathItem struct
    method Reset (line 920) | func (x *PathItem) Reset() {
    method String (line 929) | func (x *PathItem) String() string {
    method ProtoMessage (line 933) | func (*PathItem) ProtoMessage() {}
    method ProtoReflect (line 935) | func (x *PathItem) ProtoReflect() protoreflect.Message {
    method Descriptor (line 948) | func (*PathItem) Descriptor() ([]byte, []int) {
    method GetCid (line 952) | func (x *PathItem) GetCid() string {
    method GetName (line 959) | func (x *PathItem) GetName() string {
    method GetPath (line 966) | func (x *PathItem) GetPath() string {
    method GetSize (line 973) | func (x *PathItem) GetSize() int64 {
    method GetIsDir (line 980) | func (x *PathItem) GetIsDir() bool {
    method GetItems (line 987) | func (x *PathItem) GetItems() []*PathItem {
    method GetItemsCount (line 994) | func (x *PathItem) GetItemsCount() int32 {
    method GetMetadata (line 1001) | func (x *PathItem) GetMetadata() *Metadata {
  type ListIpfsPathRequest (line 1008) | type ListIpfsPathRequest struct
    method Reset (line 1016) | func (x *ListIpfsPathRequest) Reset() {
    method String (line 1025) | func (x *ListIpfsPathRequest) String() string {
    method ProtoMessage (line 1029) | func (*ListIpfsPathRequest) ProtoMessage() {}
    method ProtoReflect (line 1031) | func (x *ListIpfsPathRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1044) | func (*ListIpfsPathRequest) Descriptor() ([]byte, []int) {
    method GetPath (line 1048) | func (x *ListIpfsPathRequest) GetPath() string {
  type ListIpfsPathResponse (line 1055) | type ListIpfsPathResponse struct
    method Reset (line 1063) | func (x *ListIpfsPathResponse) Reset() {
    method String (line 1072) | func (x *ListIpfsPathResponse) String() string {
    method ProtoMessage (line 1076) | func (*ListIpfsPathResponse) ProtoMessage() {}
    method ProtoReflect (line 1078) | func (x *ListIpfsPathResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1091) | func (*ListIpfsPathResponse) Descriptor() ([]byte, []int) {
    method GetItem (line 1095) | func (x *ListIpfsPathResponse) GetItem() *PathItem {
  type PushPathRequest (line 1102) | type PushPathRequest struct
    method Reset (line 1113) | func (x *PushPathRequest) Reset() {
    method String (line 1122) | func (x *PushPathRequest) String() string {
    method ProtoMessage (line 1126) | func (*PushPathRequest) ProtoMessage() {}
    method ProtoReflect (line 1128) | func (x *PushPathRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1141) | func (*PushPathRequest) Descriptor() ([]byte, []int) {
    method GetPayload (line 1145) | func (m *PushPathRequest) GetPayload() isPushPathRequest_Payload {
    method GetHeader (line 1152) | func (x *PushPathRequest) GetHeader() *PushPathRequest_Header {
    method GetChunk (line 1159) | func (x *PushPathRequest) GetChunk() []byte {
  type isPushPathRequest_Payload (line 1166) | type isPushPathRequest_Payload interface
  type PushPathRequest_Header_ (line 1170) | type PushPathRequest_Header_ struct
    method isPushPathRequest_Payload (line 1178) | func (*PushPathRequest_Header_) isPushPathRequest_Payload() {}
  type PushPathRequest_Chunk (line 1174) | type PushPathRequest_Chunk struct
    method isPushPathRequest_Payload (line 1180) | func (*PushPathRequest_Chunk) isPushPathRequest_Payload() {}
  type PushPathResponse (line 1182) | type PushPathResponse struct
    method Reset (line 1190) | func (x *PushPathResponse) Reset() {
    method String (line 1199) | func (x *PushPathResponse) String() string {
    method ProtoMessage (line 1203) | func (*PushPathResponse) ProtoMessage() {}
    method ProtoReflect (line 1205) | func (x *PushPathResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1218) | func (*PushPathResponse) Descriptor() ([]byte, []int) {
    method GetEvent (line 1222) | func (x *PushPathResponse) GetEvent() *PushPathResponse_Event {
  type PushPathsRequest (line 1229) | type PushPathsRequest struct
    method Reset (line 1240) | func (x *PushPathsRequest) Reset() {
    method String (line 1249) | func (x *PushPathsRequest) String() string {
    method ProtoMessage (line 1253) | func (*PushPathsRequest) ProtoMessage() {}
    method ProtoReflect (line 1255) | func (x *PushPathsRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1268) | func (*PushPathsRequest) Descriptor() ([]byte, []int) {
    method GetPayload (line 1272) | func (m *PushPathsRequest) GetPayload() isPushPathsRequest_Payload {
    method GetHeader (line 1279) | func (x *PushPathsRequest) GetHeader() *PushPathsRequest_Header {
    method GetChunk (line 1286) | func (x *PushPathsRequest) GetChunk() *PushPathsRequest_Chunk {
  type isPushPathsRequest_Payload (line 1293) | type isPushPathsRequest_Payload interface
  type PushPathsRequest_Header_ (line 1297) | type PushPathsRequest_Header_ struct
    method isPushPathsRequest_Payload (line 1305) | func (*PushPathsRequest_Header_) isPushPathsRequest_Payload() {}
  type PushPathsRequest_Chunk_ (line 1301) | type PushPathsRequest_Chunk_ struct
    method isPushPathsRequest_Payload (line 1307) | func (*PushPathsRequest_Chunk_) isPushPathsRequest_Payload() {}
  type PushPathsResponse (line 1309) | type PushPathsResponse struct
    method Reset (line 1321) | func (x *PushPathsResponse) Reset() {
    method String (line 1330) | func (x *PushPathsResponse) String() string {
    method ProtoMessage (line 1334) | func (*PushPathsResponse) ProtoMessage() {}
    method ProtoReflect (line 1336) | func (x *PushPathsResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1349) | func (*PushPathsResponse) Descriptor() ([]byte, []int) {
    method GetPath (line 1353) | func (x *PushPathsResponse) GetPath() string {
    method GetCid (line 1360) | func (x *PushPathsResponse) GetCid() string {
    method GetSize (line 1367) | func (x *PushPathsResponse) GetSize() int64 {
    method GetPinned (line 1374) | func (x *PushPathsResponse) GetPinned() int64 {
    method GetRoot (line 1381) | func (x *PushPathsResponse) GetRoot() *Root {
  type PullPathRequest (line 1388) | type PullPathRequest struct
    method Reset (line 1397) | func (x *PullPathRequest) Reset() {
    method String (line 1406) | func (x *PullPathRequest) String() string {
    method ProtoMessage (line 1410) | func (*PullPathRequest) ProtoMessage() {}
    method ProtoReflect (line 1412) | func (x *PullPathRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1425) | func (*PullPathRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1429) | func (x *PullPathRequest) GetKey() string {
    method GetPath (line 1436) | func (x *PullPathRequest) GetPath() string {
  type PullPathResponse (line 1443) | type PullPathResponse struct
    method Reset (line 1451) | func (x *PullPathResponse) Reset() {
    method String (line 1460) | func (x *PullPathResponse) String() string {
    method ProtoMessage (line 1464) | func (*PullPathResponse) ProtoMessage() {}
    method ProtoReflect (line 1466) | func (x *PullPathResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1479) | func (*PullPathResponse) Descriptor() ([]byte, []int) {
    method GetChunk (line 1483) | func (x *PullPathResponse) GetChunk() []byte {
  type PullIpfsPathRequest (line 1490) | type PullIpfsPathRequest struct
    method Reset (line 1498) | func (x *PullIpfsPathRequest) Reset() {
    method String (line 1507) | func (x *PullIpfsPathRequest) String() string {
    method ProtoMessage (line 1511) | func (*PullIpfsPathRequest) ProtoMessage() {}
    method ProtoReflect (line 1513) | func (x *PullIpfsPathRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1526) | func (*PullIpfsPathRequest) Descriptor() ([]byte, []int) {
    method GetPath (line 1530) | func (x *PullIpfsPathRequest) GetPath() string {
  type PullIpfsPathResponse (line 1537) | type PullIpfsPathResponse struct
    method Reset (line 1545) | func (x *PullIpfsPathResponse) Reset() {
    method String (line 1554) | func (x *PullIpfsPathResponse) String() string {
    method ProtoMessage (line 1558) | func (*PullIpfsPathResponse) ProtoMessage() {}
    method ProtoReflect (line 1560) | func (x *PullIpfsPathResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1573) | func (*PullIpfsPathResponse) Descriptor() ([]byte, []int) {
    method GetChunk (line 1577) | func (x *PullIpfsPathResponse) GetChunk() []byte {
  type SetPathRequest (line 1584) | type SetPathRequest struct
    method Reset (line 1594) | func (x *SetPathRequest) Reset() {
    method String (line 1603) | func (x *SetPathRequest) String() string {
    method ProtoMessage (line 1607) | func (*SetPathRequest) ProtoMessage() {}
    method ProtoReflect (line 1609) | func (x *SetPathRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1622) | func (*SetPathRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1626) | func (x *SetPathRequest) GetKey() string {
    method GetPath (line 1633) | func (x *SetPathRequest) GetPath() string {
    method GetCid (line 1640) | func (x *SetPathRequest) GetCid() string {
  type SetPathResponse (line 1647) | type SetPathResponse struct
    method Reset (line 1655) | func (x *SetPathResponse) Reset() {
    method String (line 1664) | func (x *SetPathResponse) String() string {
    method ProtoMessage (line 1668) | func (*SetPathResponse) ProtoMessage() {}
    method ProtoReflect (line 1670) | func (x *SetPathResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1683) | func (*SetPathResponse) Descriptor() ([]byte, []int) {
    method GetPinned (line 1687) | func (x *SetPathResponse) GetPinned() int64 {
  type MovePathRequest (line 1694) | type MovePathRequest struct
    method Reset (line 1704) | func (x *MovePathRequest) Reset() {
    method String (line 1713) | func (x *MovePathRequest) String() string {
    method ProtoMessage (line 1717) | func (*MovePathRequest) ProtoMessage() {}
    method ProtoReflect (line 1719) | func (x *MovePathRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1732) | func (*MovePathRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1736) | func (x *MovePathRequest) GetKey() string {
    method GetFromPath (line 1743) | func (x *MovePathRequest) GetFromPath() string {
    method GetToPath (line 1750) | func (x *MovePathRequest) GetToPath() string {
  type MovePathResponse (line 1757) | type MovePathResponse struct
    method Reset (line 1763) | func (x *MovePathResponse) Reset() {
    method String (line 1772) | func (x *MovePathResponse) String() string {
    method ProtoMessage (line 1776) | func (*MovePathResponse) ProtoMessage() {}
    method ProtoReflect (line 1778) | func (x *MovePathResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1791) | func (*MovePathResponse) Descriptor() ([]byte, []int) {
  type RemoveRequest (line 1795) | type RemoveRequest struct
    method Reset (line 1803) | func (x *RemoveRequest) Reset() {
    method String (line 1812) | func (x *RemoveRequest) String() string {
    method ProtoMessage (line 1816) | func (*RemoveRequest) ProtoMessage() {}
    method ProtoReflect (line 1818) | func (x *RemoveRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1831) | func (*RemoveRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1835) | func (x *RemoveRequest) GetKey() string {
  type RemoveResponse (line 1842) | type RemoveResponse struct
    method Reset (line 1850) | func (x *RemoveResponse) Reset() {
    method String (line 1859) | func (x *RemoveResponse) String() string {
    method ProtoMessage (line 1863) | func (*RemoveResponse) ProtoMessage() {}
    method ProtoReflect (line 1865) | func (x *RemoveResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1878) | func (*RemoveResponse) Descriptor() ([]byte, []int) {
    method GetPinned (line 1882) | func (x *RemoveResponse) GetPinned() int64 {
  type RemovePathRequest (line 1889) | type RemovePathRequest struct
    method Reset (line 1899) | func (x *RemovePathRequest) Reset() {
    method String (line 1908) | func (x *RemovePathRequest) String() string {
    method ProtoMessage (line 1912) | func (*RemovePathRequest) ProtoMessage() {}
    method ProtoReflect (line 1914) | func (x *RemovePathRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1927) | func (*RemovePathRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 1931) | func (x *RemovePathRequest) GetKey() string {
    method GetPath (line 1938) | func (x *RemovePathRequest) GetPath() string {
    method GetRoot (line 1945) | func (x *RemovePathRequest) GetRoot() string {
  type RemovePathResponse (line 1952) | type RemovePathResponse struct
    method Reset (line 1961) | func (x *RemovePathResponse) Reset() {
    method String (line 1970) | func (x *RemovePathResponse) String() string {
    method ProtoMessage (line 1974) | func (*RemovePathResponse) ProtoMessage() {}
    method ProtoReflect (line 1976) | func (x *RemovePathResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1989) | func (*RemovePathResponse) Descriptor() ([]byte, []int) {
    method GetRoot (line 1993) | func (x *RemovePathResponse) GetRoot() *Root {
    method GetPinned (line 2000) | func (x *RemovePathResponse) GetPinned() int64 {
  type PushPathAccessRolesRequest (line 2007) | type PushPathAccessRolesRequest struct
    method Reset (line 2017) | func (x *PushPathAccessRolesRequest) Reset() {
    method String (line 2026) | func (x *PushPathAccessRolesRequest) String() string {
    method ProtoMessage (line 2030) | func (*PushPathAccessRolesRequest) ProtoMessage() {}
    method ProtoReflect (line 2032) | func (x *PushPathAccessRolesRequest) ProtoReflect() protoreflect.Messa...
    method Descriptor (line 2045) | func (*PushPathAccessRolesRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 2049) | func (x *PushPathAccessRolesRequest) GetKey() string {
    method GetPath (line 2056) | func (x *PushPathAccessRolesRequest) GetPath() string {
    method GetRoles (line 2063) | func (x *PushPathAccessRolesRequest) GetRoles() map[string]PathAccessR...
  type PushPathAccessRolesResponse (line 2070) | type PushPathAccessRolesResponse struct
    method Reset (line 2078) | func (x *PushPathAccessRolesResponse) Reset() {
    method String (line 2087) | func (x *PushPathAccessRolesResponse) String() string {
    method ProtoMessage (line 2091) | func (*PushPathAccessRolesResponse) ProtoMessage() {}
    method ProtoReflect (line 2093) | func (x *PushPathAccessRolesResponse) ProtoReflect() protoreflect.Mess...
    method Descriptor (line 2106) | func (*PushPathAccessRolesResponse) Descriptor() ([]byte, []int) {
    method GetPinned (line 2110) | func (x *PushPathAccessRolesResponse) GetPinned() int64 {
  type PullPathAccessRolesRequest (line 2117) | type PullPathAccessRolesRequest struct
    method Reset (line 2126) | func (x *PullPathAccessRolesRequest) Reset() {
    method String (line 2135) | func (x *PullPathAccessRolesRequest) String() string {
    method ProtoMessage (line 2139) | func (*PullPathAccessRolesRequest) ProtoMessage() {}
    method ProtoReflect (line 2141) | func (x *PullPathAccessRolesRequest) ProtoReflect() protoreflect.Messa...
    method Descriptor (line 2154) | func (*PullPathAccessRolesRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 2158) | func (x *PullPathAccessRolesRequest) GetKey() string {
    method GetPath (line 2165) | func (x *PullPathAccessRolesRequest) GetPath() string {
  type PullPathAccessRolesResponse (line 2172) | type PullPathAccessRolesResponse struct
    method Reset (line 2180) | func (x *PullPathAccessRolesResponse) Reset() {
    method String (line 2189) | func (x *PullPathAccessRolesResponse) String() string {
    method ProtoMessage (line 2193) | func (*PullPathAccessRolesResponse) ProtoMessage() {}
    method ProtoReflect (line 2195) | func (x *PullPathAccessRolesResponse) ProtoReflect() protoreflect.Mess...
    method Descriptor (line 2208) | func (*PullPathAccessRolesResponse) Descriptor() ([]byte, []int) {
    method GetRoles (line 2212) | func (x *PullPathAccessRolesResponse) GetRoles() map[string]PathAccess...
  type ArchiveConfig (line 2219) | type ArchiveConfig struct
    method Reset (line 2236) | func (x *ArchiveConfig) Reset() {
    method String (line 2245) | func (x *ArchiveConfig) String() string {
    method ProtoMessage (line 2249) | func (*ArchiveConfig) ProtoMessage() {}
    method ProtoReflect (line 2251) | func (x *ArchiveConfig) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2264) | func (*ArchiveConfig) Descriptor() ([]byte, []int) {
    method GetRepFactor (line 2268) | func (x *ArchiveConfig) GetRepFactor() int32 {
    method GetDealMinDuration (line 2275) | func (x *ArchiveConfig) GetDealMinDuration() int64 {
    method GetExcludedMiners (line 2282) | func (x *ArchiveConfig) GetExcludedMiners() []string {
    method GetTrustedMiners (line 2289) | func (x *ArchiveConfig) GetTrustedMiners() []string {
    method GetCountryCodes (line 2296) | func (x *ArchiveConfig) GetCountryCodes() []string {
    method GetRenew (line 2303) | func (x *ArchiveConfig) GetRenew() *ArchiveRenew {
    method GetMaxPrice (line 2310) | func (x *ArchiveConfig) GetMaxPrice() uint64 {
    method GetFastRetrieval (line 2317) | func (x *ArchiveConfig) GetFastRetrieval() bool {
    method GetDealStartOffset (line 2324) | func (x *ArchiveConfig) GetDealStartOffset() int64 {
    method GetVerifiedDeal (line 2331) | func (x *ArchiveConfig) GetVerifiedDeal() bool {
  type Archives (line 2338) | type Archives struct
    method Reset (line 2347) | func (x *Archives) Reset() {
    method String (line 2356) | func (x *Archives) String() string {
    method ProtoMessage (line 2360) | func (*Archives) ProtoMessage() {}
    method ProtoReflect (line 2362) | func (x *Archives) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2375) | func (*Archives) Descriptor() ([]byte, []int) {
    method GetCurrent (line 2379) | func (x *Archives) GetCurrent() *Archive {
    method GetHistory (line 2386) | func (x *Archives) GetHistory() []*Archive {
  type Archive (line 2393) | type Archive struct
    method Reset (line 2408) | func (x *Archive) Reset() {
    method String (line 2417) | func (x *Archive) String() string {
    method ProtoMessage (line 2421) | func (*Archive) ProtoMessage() {}
    method ProtoReflect (line 2423) | func (x *Archive) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2436) | func (*Archive) Descriptor() ([]byte, []int) {
    method GetCid (line 2440) | func (x *Archive) GetCid() string {
    method GetJobId (line 2447) | func (x *Archive) GetJobId() string {
    method GetArchiveStatus (line 2454) | func (x *Archive) GetArchiveStatus() ArchiveStatus {
    method GetAborted (line 2461) | func (x *Archive) GetAborted() bool {
    method GetAbortedMsg (line 2468) | func (x *Archive) GetAbortedMsg() string {
    method GetFailureMsg (line 2475) | func (x *Archive) GetFailureMsg() string {
    method GetCreatedAt (line 2482) | func (x *Archive) GetCreatedAt() int64 {
    method GetDealInfo (line 2489) | func (x *Archive) GetDealInfo() []*DealInfo {
  type DealInfo (line 2496) | type DealInfo struct
    method Reset (line 2515) | func (x *DealInfo) Reset() {
    method String (line 2524) | func (x *DealInfo) String() string {
    method ProtoMessage (line 2528) | func (*DealInfo) ProtoMessage() {}
    method ProtoReflect (line 2530) | func (x *DealInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2543) | func (*DealInfo) Descriptor() ([]byte, []int) {
    method GetProposalCid (line 2547) | func (x *DealInfo) GetProposalCid() string {
    method GetStateId (line 2554) | func (x *DealInfo) GetStateId() uint64 {
    method GetStateName (line 2561) | func (x *DealInfo) GetStateName() string {
    method GetMiner (line 2568) | func (x *DealInfo) GetMiner() string {
    method GetPieceCid (line 2575) | func (x *DealInfo) GetPieceCid() string {
    method GetSize (line 2582) | func (x *DealInfo) GetSize() uint64 {
    method GetPricePerEpoch (line 2589) | func (x *DealInfo) GetPricePerEpoch() uint64 {
    method GetStartEpoch (line 2596) | func (x *DealInfo) GetStartEpoch() uint64 {
    method GetDuration (line 2603) | func (x *DealInfo) GetDuration() uint64 {
    method GetDealId (line 2610) | func (x *DealInfo) GetDealId() uint64 {
    method GetActivationEpoch (line 2617) | func (x *DealInfo) GetActivationEpoch() int64 {
    method GetMessage (line 2624) | func (x *DealInfo) GetMessage() string {
  type ArchiveRenew (line 2631) | type ArchiveRenew struct
    method Reset (line 2640) | func (x *ArchiveRenew) Reset() {
    method String (line 2649) | func (x *ArchiveRenew) String() string {
    method ProtoMessage (line 2653) | func (*ArchiveRenew) ProtoMessage() {}
    method ProtoReflect (line 2655) | func (x *ArchiveRenew) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2668) | func (*ArchiveRenew) Descriptor() ([]byte, []int) {
    method GetEnabled (line 2672) | func (x *ArchiveRenew) GetEnabled() bool {
    method GetThreshold (line 2679) | func (x *ArchiveRenew) GetThreshold() int32 {
  type DefaultArchiveConfigRequest (line 2686) | type DefaultArchiveConfigRequest struct
    method Reset (line 2694) | func (x *DefaultArchiveConfigRequest) Reset() {
    method String (line 2703) | func (x *DefaultArchiveConfigRequest) String() string {
    method ProtoMessage (line 2707) | func (*DefaultArchiveConfigRequest) ProtoMessage() {}
    method ProtoReflect (line 2709) | func (x *DefaultArchiveConfigRequest) ProtoReflect() protoreflect.Mess...
    method Descriptor (line 2722) | func (*DefaultArchiveConfigRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 2726) | func (x *DefaultArchiveConfigRequest) GetKey() string {
  type DefaultArchiveConfigResponse (line 2733) | type DefaultArchiveConfigResponse struct
    method Reset (line 2741) | func (x *DefaultArchiveConfigResponse) Reset() {
    method String (line 2750) | func (x *DefaultArchiveConfigResponse) String() string {
    method ProtoMessage (line 2754) | func (*DefaultArchiveConfigResponse) ProtoMessage() {}
    method ProtoReflect (line 2756) | func (x *DefaultArchiveConfigResponse) ProtoReflect() protoreflect.Mes...
    method Descriptor (line 2769) | func (*DefaultArchiveConfigResponse) Descriptor() ([]byte, []int) {
    method GetArchiveConfig (line 2773) | func (x *DefaultArchiveConfigResponse) GetArchiveConfig() *ArchiveConf...
  type SetDefaultArchiveConfigRequest (line 2780) | type SetDefaultArchiveConfigRequest struct
    method Reset (line 2789) | func (x *SetDefaultArchiveConfigRequest) Reset() {
    method String (line 2798) | func (x *SetDefaultArchiveConfigRequest) String() string {
    method ProtoMessage (line 2802) | func (*SetDefaultArchiveConfigRequest) ProtoMessage() {}
    method ProtoReflect (line 2804) | func (x *SetDefaultArchiveConfigRequest) ProtoReflect() protoreflect.M...
    method Descriptor (line 2817) | func (*SetDefaultArchiveConfigRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 2821) | func (x *SetDefaultArchiveConfigRequest) GetKey() string {
    method GetArchiveConfig (line 2828) | func (x *SetDefaultArchiveConfigRequest) GetArchiveConfig() *ArchiveCo...
  type SetDefaultArchiveConfigResponse (line 2835) | type SetDefaultArchiveConfigResponse struct
    method Reset (line 2841) | func (x *SetDefaultArchiveConfigResponse) Reset() {
    method String (line 2850) | func (x *SetDefaultArchiveConfigResponse) String() string {
    method ProtoMessage (line 2854) | func (*SetDefaultArchiveConfigResponse) ProtoMessage() {}
    method ProtoReflect (line 2856) | func (x *SetDefaultArchiveConfigResponse) ProtoReflect() protoreflect....
    method Descriptor (line 2869) | func (*SetDefaultArchiveConfigResponse) Descriptor() ([]byte, []int) {
  type ArchiveRequest (line 2873) | type ArchiveRequest struct
    method Reset (line 2883) | func (x *ArchiveRequest) Reset() {
    method String (line 2892) | func (x *ArchiveRequest) String() string {
    method ProtoMessage (line 2896) | func (*ArchiveRequest) ProtoMessage() {}
    method ProtoReflect (line 2898) | func (x *ArchiveRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2911) | func (*ArchiveRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 2915) | func (x *ArchiveRequest) GetKey() string {
    method GetArchiveConfig (line 2922) | func (x *ArchiveRequest) GetArchiveConfig() *ArchiveConfig {
    method GetSkipAutomaticVerifiedDeal (line 2929) | func (x *ArchiveRequest) GetSkipAutomaticVerifiedDeal() bool {
  type ArchiveResponse (line 2936) | type ArchiveResponse struct
    method Reset (line 2942) | func (x *ArchiveResponse) Reset() {
    method String (line 2951) | func (x *ArchiveResponse) String() string {
    method ProtoMessage (line 2955) | func (*ArchiveResponse) ProtoMessage() {}
    method ProtoReflect (line 2957) | func (x *ArchiveResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2970) | func (*ArchiveResponse) Descriptor() ([]byte, []int) {
  type ArchivesRequest (line 2974) | type ArchivesRequest struct
    method Reset (line 2982) | func (x *ArchivesRequest) Reset() {
    method String (line 2991) | func (x *ArchivesRequest) String() string {
    method ProtoMessage (line 2995) | func (*ArchivesRequest) ProtoMessage() {}
    method ProtoReflect (line 2997) | func (x *ArchivesRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 3010) | func (*ArchivesRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 3014) | func (x *ArchivesRequest) GetKey() string {
  type ArchivesResponse (line 3022) | type ArchivesResponse struct
    method Reset (line 3031) | func (x *ArchivesResponse) Reset() {
    method String (line 3040) | func (x *ArchivesResponse) String() string {
    method ProtoMessage (line 3044) | func (*ArchivesResponse) ProtoMessage() {}
    method ProtoReflect (line 3046) | func (x *ArchivesResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 3059) | func (*ArchivesResponse) Descriptor() ([]byte, []int) {
    method GetCurrent (line 3063) | func (x *ArchivesResponse) GetCurrent() *Archive {
    method GetHistory (line 3070) | func (x *ArchivesResponse) GetHistory() []*Archive {
  type ArchiveWatchRequest (line 3077) | type ArchiveWatchRequest struct
    method Reset (line 3085) | func (x *ArchiveWatchRequest) Reset() {
    method String (line 3094) | func (x *ArchiveWatchRequest) String() string {
    method ProtoMessage (line 3098) | func (*ArchiveWatchRequest) ProtoMessage() {}
    method ProtoReflect (line 3100) | func (x *ArchiveWatchRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 3113) | func (*ArchiveWatchRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 3117) | func (x *ArchiveWatchRequest) GetKey() string {
  type ArchiveWatchResponse (line 3124) | type ArchiveWatchResponse struct
    method Reset (line 3132) | func (x *ArchiveWatchResponse) Reset() {
    method String (line 3141) | func (x *ArchiveWatchResponse) String() string {
    method ProtoMessage (line 3145) | func (*ArchiveWatchResponse) ProtoMessage() {}
    method ProtoReflect (line 3147) | func (x *ArchiveWatchResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 3160) | func (*ArchiveWatchResponse) Descriptor() ([]byte, []int) {
    method GetMsg (line 3164) | func (x *ArchiveWatchResponse) GetMsg() string {
  type PushPathRequest_Header (line 3171) | type PushPathRequest_Header struct
    method Reset (line 3181) | func (x *PushPathRequest_Header) Reset() {
    method String (line 3190) | func (x *PushPathRequest_Header) String() string {
    method ProtoMessage (line 3194) | func (*PushPathRequest_Header) ProtoMessage() {}
    method ProtoReflect (line 3196) | func (x *PushPathRequest_Header) ProtoReflect() protoreflect.Message {
    method Descriptor (line 3209) | func (*PushPathRequest_Header) Descriptor() ([]byte, []int) {
    method GetKey (line 3213) | func (x *PushPathRequest_Header) GetKey() string {
    method GetPath (line 3220) | func (x *PushPathRequest_Header) GetPath() string {
    method GetRoot (line 3227) | func (x *PushPathRequest_Header) GetRoot() string {
  type PushPathResponse_Event (line 3234) | type PushPathResponse_Event struct
    method Reset (line 3247) | func (x *PushPathResponse_Event) Reset() {
    method String (line 3256) | func (x *PushPathResponse_Event) String() string {
    method ProtoMessage (line 3260) | func (*PushPathResponse_Event) ProtoMessage() {}
    method ProtoReflect (line 3262) | func (x *PushPathResponse_Event) ProtoReflect() protoreflect.Message {
    method Descriptor (line 3275) | func (*PushPathResponse_Event) Descriptor() ([]byte, []int) {
    method GetName (line 3279) | func (x *PushPathResponse_Event) GetName() string {
    method GetPath (line 3286) | func (x *PushPathResponse_Event) GetPath() string {
    method GetBytes (line 3293) | func (x *PushPathResponse_Event) GetBytes() int64 {
    method GetSize (line 3300) | func (x *PushPathResponse_Event) GetSize() string {
    method GetRoot (line 3307) | func (x *PushPathResponse_Event) GetRoot() *Root {
    method GetPinned (line 3314) | func (x *PushPathResponse_Event) GetPinned() int64 {
  type PushPathsRequest_Header (line 3321) | type PushPathsRequest_Header struct
    method Reset (line 3331) | func (x *PushPathsRequest_Header) Reset() {
    method String (line 3340) | func (x *PushPathsRequest_Header) String() string {
    method ProtoMessage (line 3344) | func (*PushPathsRequest_Header) ProtoMessage() {}
    method ProtoReflect (line 3346) | func (x *PushPathsRequest_Header) ProtoReflect() protoreflect.Message {
    method Descriptor (line 3359) | func (*PushPathsRequest_Header) Descriptor() ([]byte, []int) {
    method GetKey (line 3363) | func (x *PushPathsRequest_Header) GetKey() string {
    method GetRoot (line 3370) | func (x *PushPathsRequest_Header) GetRoot() string {
    method GetPaths (line 3377) | func (x *PushPathsRequest_Header) GetPaths() []string {
  type PushPathsRequest_Chunk (line 3384) | type PushPathsRequest_Chunk struct
    method Reset (line 3393) | func (x *PushPathsRequest_Chunk) Reset() {
    method String (line 3402) | func (x *PushPathsRequest_Chunk) String() string {
    method ProtoMessage (line 3406) | func (*PushPathsRequest_Chunk) ProtoMessage() {}
    method ProtoReflect (line 3408) | func (x *PushPathsRequest_Chunk) ProtoReflect() protoreflect.Message {
    method Descriptor (line 3421) | func (*PushPathsRequest_Chunk) Descriptor() ([]byte, []int) {
    method GetPath (line 3425) | func (x *PushPathsRequest_Chunk) GetPath() string {
    method GetData (line 3432) | func (x *PushPathsRequest_Chunk) GetData() []byte {
  function file_api_bucketsd_pb_bucketsd_proto_rawDescGZIP (line 3972) | func file_api_bucketsd_pb_bucketsd_proto_rawDescGZIP() []byte {
  function init (line 4129) | func init() { file_api_bucketsd_pb_bucketsd_proto_init() }
  function file_api_bucketsd_pb_bucketsd_proto_init (line 4130) | func file_api_bucketsd_pb_bucketsd_proto_init() {
  constant _ (line 4819) | _ = grpc.SupportPackageIsVersion6
  type APIServiceClient (line 4824) | type APIServiceClient interface
  type aPIServiceClient (line 4849) | type aPIServiceClient struct
    method List (line 4857) | func (c *aPIServiceClient) List(ctx context.Context, in *ListRequest, ...
    method Create (line 4866) | func (c *aPIServiceClient) Create(ctx context.Context, in *CreateReque...
    method Root (line 4875) | func (c *aPIServiceClient) Root(ctx context.Context, in *RootRequest, ...
    method Links (line 4884) | func (c *aPIServiceClient) Links(ctx context.Context, in *LinksRequest...
    method ListPath (line 4893) | func (c *aPIServiceClient) ListPath(ctx context.Context, in *ListPathR...
    method ListIpfsPath (line 4902) | func (c *aPIServiceClient) ListIpfsPath(ctx context.Context, in *ListI...
    method PushPath (line 4911) | func (c *aPIServiceClient) PushPath(ctx context.Context, opts ...grpc....
    method PushPaths (line 4942) | func (c *aPIServiceClient) PushPaths(ctx context.Context, opts ...grpc...
    method PullPath (line 4973) | func (c *aPIServiceClient) PullPath(ctx context.Context, in *PullPathR...
    method PullIpfsPath (line 5005) | func (c *aPIServiceClient) PullIpfsPath(ctx context.Context, in *PullI...
    method SetPath (line 5037) | func (c *aPIServiceClient) SetPath(ctx context.Context, in *SetPathReq...
    method MovePath (line 5046) | func (c *aPIServiceClient) MovePath(ctx context.Context, in *MovePathR...
    method Remove (line 5055) | func (c *aPIServiceClient) Remove(ctx context.Context, in *RemoveReque...
    method RemovePath (line 5064) | func (c *aPIServiceClient) RemovePath(ctx context.Context, in *RemoveP...
    method PushPathAccessRoles (line 5073) | func (c *aPIServiceClient) PushPathAccessRoles(ctx context.Context, in...
    method PullPathAccessRoles (line 5082) | func (c *aPIServiceClient) PullPathAccessRoles(ctx context.Context, in...
    method DefaultArchiveConfig (line 5091) | func (c *aPIServiceClient) DefaultArchiveConfig(ctx context.Context, i...
    method SetDefaultArchiveConfig (line 5100) | func (c *aPIServiceClient) SetDefaultArchiveConfig(ctx context.Context...
    method Archive (line 5109) | func (c *aPIServiceClient) Archive(ctx context.Context, in *ArchiveReq...
    method Archives (line 5118) | func (c *aPIServiceClient) Archives(ctx context.Context, in *ArchivesR...
    method ArchiveWatch (line 5127) | func (c *aPIServiceClient) ArchiveWatch(ctx context.Context, in *Archi...
  function NewAPIServiceClient (line 4853) | func NewAPIServiceClient(cc grpc.ClientConnInterface) APIServiceClient {
  type APIService_PushPathClient (line 4920) | type APIService_PushPathClient interface
  type aPIServicePushPathClient (line 4926) | type aPIServicePushPathClient struct
    method Send (line 4930) | func (x *aPIServicePushPathClient) Send(m *PushPathRequest) error {
    method Recv (line 4934) | func (x *aPIServicePushPathClient) Recv() (*PushPathResponse, error) {
  type APIService_PushPathsClient (line 4951) | type APIService_PushPathsClient interface
  type aPIServicePushPathsClient (line 4957) | type aPIServicePushPathsClient struct
    method Send (line 4961) | func (x *aPIServicePushPathsClient) Send(m *PushPathsRequest) error {
    method Recv (line 4965) | func (x *aPIServicePushPathsClient) Recv() (*PushPathsResponse, error) {
  type APIService_PullPathClient (line 4988) | type APIService_PullPathClient interface
  type aPIServicePullPathClient (line 4993) | type aPIServicePullPathClient struct
    method Recv (line 4997) | func (x *aPIServicePullPathClient) Recv() (*PullPathResponse, error) {
  type APIService_PullIpfsPathClient (line 5020) | type APIService_PullIpfsPathClient interface
  type aPIServicePullIpfsPathClient (line 5025) | type aPIServicePullIpfsPathClient struct
    method Recv (line 5029) | func (x *aPIServicePullIpfsPathClient) Recv() (*PullIpfsPathResponse, ...
  type APIService_ArchiveWatchClient (line 5142) | type APIService_ArchiveWatchClient interface
  type aPIServiceArchiveWatchClient (line 5147) | type aPIServiceArchiveWatchClient struct
    method Recv (line 5151) | func (x *aPIServiceArchiveWatchClient) Recv() (*ArchiveWatchResponse, ...
  type APIServiceServer (line 5160) | type APIServiceServer interface
  type UnimplementedAPIServiceServer (line 5186) | type UnimplementedAPIServiceServer struct
    method List (line 5189) | func (*UnimplementedAPIServiceServer) List(context.Context, *ListReque...
    method Create (line 5192) | func (*UnimplementedAPIServiceServer) Create(context.Context, *CreateR...
    method Root (line 5195) | func (*UnimplementedAPIServiceServer) Root(context.Context, *RootReque...
    method Links (line 5198) | func (*UnimplementedAPIServiceServer) Links(context.Context, *LinksReq...
    method ListPath (line 5201) | func (*UnimplementedAPIServiceServer) ListPath(context.Context, *ListP...
    method ListIpfsPath (line 5204) | func (*UnimplementedAPIServiceServer) ListIpfsPath(context.Context, *L...
    method PushPath (line 5207) | func (*UnimplementedAPIServiceServer) PushPath(APIService_PushPathServ...
    method PushPaths (line 5210) | func (*UnimplementedAPIServiceServer) PushPaths(APIService_PushPathsSe...
    method PullPath (line 5213) | func (*UnimplementedAPIServiceServer) PullPath(*PullPathRequest, APISe...
    method PullIpfsPath (line 5216) | func (*UnimplementedAPIServiceServer) PullIpfsPath(*PullIpfsPathReques...
    method SetPath (line 5219) | func (*UnimplementedAPIServiceServer) SetPath(context.Context, *SetPat...
    method MovePath (line 5222) | func (*UnimplementedAPIServiceServer) MovePath(context.Context, *MoveP...
    method Remove (line 5225) | func (*UnimplementedAPIServiceServer) Remove(context.Context, *RemoveR...
    method RemovePath (line 5228) | func (*UnimplementedAPIServiceServer) RemovePath(context.Context, *Rem...
    method PushPathAccessRoles (line 5231) | func (*UnimplementedAPIServiceServer) PushPathAccessRoles(context.Cont...
    method PullPathAccessRoles (line 5234) | func (*UnimplementedAPIServiceServer) PullPathAccessRoles(context.Cont...
    method DefaultArchiveConfig (line 5237) | func (*UnimplementedAPIServiceServer) DefaultArchiveConfig(context.Con...
    method SetDefaultArchiveConfig (line 5240) | func (*UnimplementedAPIServiceServer) SetDefaultArchiveConfig(context....
    method Archive (line 5243) | func (*UnimplementedAPIServiceServer) Archive(context.Context, *Archiv...
    method Archives (line 5246) | func (*UnimplementedAPIServiceServer) Archives(context.Context, *Archi...
    method ArchiveWatch (line 5249) | func (*UnimplementedAPIServiceServer) ArchiveWatch(*ArchiveWatchReques...
  function RegisterAPIServiceServer (line 5253) | func RegisterAPIServiceServer(s *grpc.Server, srv APIServiceServer) {
  function _APIService_List_Handler (line 5257) | func _APIService_List_Handler(srv interface{}, ctx context.Context, dec ...
  function _APIService_Create_Handler (line 5275) | func _APIService_Create_Handler(srv interface{}, ctx context.Context, de...
  function _APIService_Root_Handler (line 5293) | func _APIService_Root_Handler(srv interface{}, ctx context.Context, dec ...
  function _APIService_Links_Handler (line 5311) | func _APIService_Links_Handler(srv interface{}, ctx context.Context, dec...
  function _APIService_ListPath_Handler (line 5329) | func _APIService_ListPath_Handler(srv interface{}, ctx context.Context, ...
  function _APIService_ListIpfsPath_Handler (line 5347) | func _APIService_ListIpfsPath_Handler(srv interface{}, ctx context.Conte...
  function _APIService_PushPath_Handler (line 5365) | func _APIService_PushPath_Handler(srv interface{}, stream grpc.ServerStr...
  type APIService_PushPathServer (line 5369) | type APIService_PushPathServer interface
  type aPIServicePushPathServer (line 5375) | type aPIServicePushPathServer struct
    method Send (line 5379) | func (x *aPIServicePushPathServer) Send(m *PushPathResponse) error {
    method Recv (line 5383) | func (x *aPIServicePushPathServer) Recv() (*PushPathRequest, error) {
  function _APIService_PushPaths_Handler (line 5391) | func _APIService_PushPaths_Handler(srv interface{}, stream grpc.ServerSt...
  type APIService_PushPathsServer (line 5395) | type APIService_PushPathsServer interface
  type aPIServicePushPathsServer (line 5401) | type aPIServicePushPathsServer struct
    method Send (line 5405) | func (x *aPIServicePushPathsServer) Send(m *PushPathsResponse) error {
    method Recv (line 5409) | func (x *aPIServicePushPathsServer) Recv() (*PushPathsRequest, error) {
  function _APIService_PullPath_Handler (line 5417) | func _APIService_PullPath_Handler(srv interface{}, stream grpc.ServerStr...
  type APIService_PullPathServer (line 5425) | type APIService_PullPathServer interface
  type aPIServicePullPathServer (line 5430) | type aPIServicePullPathServer struct
    method Send (line 5434) | func (x *aPIServicePullPathServer) Send(m *PullPathResponse) error {
  function _APIService_PullIpfsPath_Handler (line 5438) | func _APIService_PullIpfsPath_Handler(srv interface{}, stream grpc.Serve...
  type APIService_PullIpfsPathServer (line 5446) | type APIService_PullIpfsPathServer interface
  type aPIServicePullIpfsPathServer (line 5451) | type aPIServicePullIpfsPathServer struct
    method Send (line 5455) | func (x *aPIServicePullIpfsPathServer) Send(m *PullIpfsPathResponse) e...
  function _APIService_SetPath_Handler (line 5459) | func _APIService_SetPath_Handler(srv interface{}, ctx context.Context, d...
  function _APIService_MovePath_Handler (line 5477) | func _APIService_MovePath_Handler(srv interface{}, ctx context.Context, ...
  function _APIService_Remove_Handler (line 5495) | func _APIService_Remove_Handler(srv interface{}, ctx context.Context, de...
  function _APIService_RemovePath_Handler (line 5513) | func _APIService_RemovePath_Handler(srv interface{}, ctx context.Context...
  function _APIService_PushPathAccessRoles_Handler (line 5531) | func _APIService_PushPathAccessRoles_Handler(srv interface{}, ctx contex...
  function _APIService_PullPathAccessRoles_Handler (line 5549) | func _APIService_PullPathAccessRoles_Handler(srv interface{}, ctx contex...
  function _APIService_DefaultArchiveConfig_Handler (line 5567) | func _APIService_DefaultArchiveConfig_Handler(srv interface{}, ctx conte...
  function _APIService_SetDefaultArchiveConfig_Handler (line 5585) | func _APIService_SetDefaultArchiveConfig_Handler(srv interface{}, ctx co...
  function _APIService_Archive_Handler (line 5603) | func _APIService_Archive_Handler(srv interface{}, ctx context.Context, d...
  function _APIService_Archives_Handler (line 5621) | func _APIService_Archives_Handler(srv interface{}, ctx context.Context, ...
  function _APIService_ArchiveWatch_Handler (line 5639) | func _APIService_ArchiveWatch_Handler(srv interface{}, stream grpc.Serve...
  type APIService_ArchiveWatchServer (line 5647) | type APIService_ArchiveWatchServer interface
  type aPIServiceArchiveWatchServer (line 5652) | type aPIServiceArchiveWatchServer struct
    method Send (line 5656) | func (x *aPIServiceArchiveWatchServer) Send(m *ArchiveWatchResponse) e...

FILE: api/bucketsd/service.go
  constant chunkSize (line 54) | chunkSize = 1024 * 32
  constant pinNotRecursiveMsg (line 56) | pinNotRecursiveMsg = "'from' cid was not recursively pinned already"
  constant pinAlreadyRecursiveMsg (line 58) | pinAlreadyRecursiveMsg = "'to' cid was already recursively pinned"
  type ctxKey (line 101) | type ctxKey
  type Service (line 104) | type Service struct
    method List (line 131) | func (s *Service) List(ctx context.Context, _ *pb.ListRequest) (*pb.Li...
    method Create (line 242) | func (s *Service) Create(ctx context.Context, req *pb.CreateRequest) (...
    method CreateBucket (line 326) | func (s *Service) CreateBucket(ctx context.Context,
    method createBucket (line 337) | func (s *Service) createBucket(
    method createPristinePath (line 459) | func (s *Service) createPristinePath(
    method pinBlocks (line 484) | func (s *Service) pinBlocks(ctx context.Context, nodes []ipld.Node) (c...
    method addPinnedBytes (line 511) | func (s *Service) addPinnedBytes(ctx context.Context, delta int64) con...
    method getPinnedBytes (line 528) | func (s *Service) getPinnedBytes(ctx context.Context) int64 {
    method createBootstrappedPath (line 536) | func (s *Service) createBootstrappedPath(
    method newDirFromExistingPath (line 610) | func (s *Service) newDirFromExistingPath(
    method encryptDag (line 708) | func (s *Service) encryptDag(
    method encryptFileNode (line 863) | func (s *Service) encryptFileNode(ctx context.Context, n ipld.Node, cu...
    method Root (line 898) | func (s *Service) Root(ctx context.Context, req *pb.RootRequest) (*pb....
    method Links (line 921) | func (s *Service) Links(ctx context.Context, req *pb.LinksRequest) (*p...
    method createLinks (line 938) | func (s *Service) createLinks(
    method MovePath (line 991) | func (s *Service) MovePath(ctx context.Context, req *pb.MovePathReques...
    method copyNode (line 1150) | func (s *Service) copyNode(
    method saveAndPublish (line 1223) | func (s *Service) saveAndPublish(ctx context.Context, dbID thread.ID, ...
    method SetPath (line 1231) | func (s *Service) SetPath(ctx context.Context, req *pb.SetPathRequest)...
    method setPathFromExistingCid (line 1289) | func (s *Service) setPathFromExistingCid(
    method unpinPath (line 1360) | func (s *Service) unpinPath(ctx context.Context, path path.Path) (cont...
    method addAndPinNodes (line 1378) | func (s *Service) addAndPinNodes(ctx context.Context, nodes []ipld.Nod...
    method ListPath (line 1385) | func (s *Service) ListPath(ctx context.Context, req *pb.ListPathReques...
    method listPath (line 1402) | func (s *Service) listPath(
    method ListIpfsPath (line 1418) | func (s *Service) ListIpfsPath(ctx context.Context, req *pb.ListIpfsPa...
    method pathToItem (line 1431) | func (s *Service) pathToItem(
    method getNodeAtPath (line 1449) | func (s *Service) getNodeAtPath(ctx context.Context, pth path.Path, ke...
    method resolveNodeAtPath (line 1473) | func (s *Service) resolveNodeAtPath(ctx context.Context, pth path.Reso...
    method nodeToItem (line 1523) | func (s *Service) nodeToItem(
    method getBucketPath (line 1600) | func (s *Service) getBucketPath(
    method pathToPb (line 1627) | func (s *Service) pathToPb(
    method PushPath (line 1648) | func (s *Service) PushPath(server pb.APIService_PushPathServer) (err e...
    method PushPaths (line 1938) | func (s *Service) PushPaths(server pb.APIService_PushPathsServer) error {
    method getBucketSize (line 2164) | func (s *Service) getBucketSize(ctx context.Context, buck *tdb.Bucket)...
    method insertNodeAtPath (line 2245) | func (s *Service) insertNodeAtPath(
    method unpinBranch (line 2352) | func (s *Service) unpinBranch(ctx context.Context, p path.Resolved, ke...
    method getNodesToPath (line 2383) | func (s *Service) getNodesToPath(
    method updateOrAddPin (line 2427) | func (s *Service) updateOrAddPin(ctx context.Context, from, to path.Pa...
    method dagSize (line 2467) | func (s *Service) dagSize(ctx context.Context, root path.Path) (int64,...
    method PullPath (line 2478) | func (s *Service) PullPath(req *pb.PullPathRequest, server pb.APIServi...
    method getPathAndKey (line 2540) | func (s *Service) getPathAndKey(
    method PullIpfsPath (line 2578) | func (s *Service) PullIpfsPath(req *pb.PullIpfsPathRequest, server pb....
    method Remove (line 2611) | func (s *Service) Remove(ctx context.Context, req *pb.RemoveRequest) (...
    method unpinNodeAndBranch (line 2661) | func (s *Service) unpinNodeAndBranch(ctx context.Context, pth path.Res...
    method RemovePath (line 2669) | func (s *Service) RemovePath(ctx context.Context, req *pb.RemovePathRe...
    method removePath (line 2724) | func (s *Service) removePath(
    method removeNodeAtPath (line 2756) | func (s *Service) removeNodeAtPath(
    method PushPathAccessRoles (line 2825) | func (s *Service) PushPathAccessRoles(
    method PullPathAccessRoles (line 2957) | func (s *Service) PullPathAccessRoles(
    method DefaultArchiveConfig (line 2993) | func (s *Service) DefaultArchiveConfig(
    method SetDefaultArchiveConfig (line 3017) | func (s *Service) SetDefaultArchiveConfig(
    method Archive (line 3045) | func (s *Service) Archive(ctx context.Context, req *pb.ArchiveRequest)...
    method Archives (line 3336) | func (s *Service) Archives(ctx context.Context, req *pb.ArchivesReques...
    method ArchiveWatch (line 3399) | func (s *Service) ArchiveWatch(req *pb.ArchiveWatchRequest, server pb....
    method validateArchiveConfig (line 3497) | func (s *Service) validateArchiveConfig(c *mdb.ArchiveConfig) error {
  type buckLock (line 125) | type buckLock
    method Key (line 127) | func (l buckLock) Key() string {
  function getPbRoot (line 155) | func getPbRoot(dbID thread.ID, buck *tdb.Bucket) (*pb.Root, error) {
  function metadataToPb (line 189) | func metadataToPb(md tdb.Metadata) (*pb.Metadata, error) {
  function archivesToPb (line 214) | func archivesToPb(archives tdb.Archives) *pb.Archives {
  function dealsToPb (line 231) | func dealsToPb(deals []tdb.Deal) []*pb.DealInfo {
  function makeSeed (line 425) | func makeSeed(key []byte) (ipld.Node, error) {
  function encryptData (line 442) | func encryptData(data, currentKey, newKey []byte) ([]byte, error) {
  function newDirWithNode (line 583) | func newDirWithNode(n ipld.Node, name string, key []byte) (ipld.Node, er...
  function encryptNode (line 593) | func encryptNode(n *dag.ProtoNode, key []byte) (*dag.ProtoNode, error) {
  type namedNode (line 672) | type namedNode struct
  type namedNodes (line 679) | type namedNodes struct
    method Get (line 690) | func (nn *namedNodes) Get(c cid.Cid) *namedNode {
    method Store (line 696) | func (nn *namedNodes) Store(c cid.Cid, n *namedNode) {
  function newNamedNodes (line 684) | func newNamedNodes() *namedNodes {
  function getFileKey (line 851) | func getFileKey(key []byte, pathKeys map[string][]byte, pth string) []by...
  function decryptNode (line 1482) | func decryptNode(cn ipld.Node, key []byte) (ipld.Node, bool, error) {
  function decryptData (line 1513) | func decryptData(data, key []byte) ([]byte, error) {
  function parsePath (line 1592) | func parsePath(pth string) (fpth string, err error) {
  function cleanPath (line 1615) | func cleanPath(pth string) string {
  function inflateFilePath (line 1619) | func inflateFilePath(buck *tdb.Bucket, filePath string) (path.Path, erro...
  type fileAdder (line 1839) | type fileAdder struct
  type addedFile (line 1844) | type addedFile struct
  type fileQueue (line 1850) | type fileQueue struct
    method add (line 1859) | func (q *fileQueue) add(
  function newFileQueue (line 1855) | func newFileQueue() *fileQueue {
  type pathNode (line 2374) | type pathNode struct
  function getLink (line 2416) | func getLink(lnks []*ipld.Link, name string) *ipld.Link {
  function toPbArchive (line 3361) | func toPbArchive(archive mdb.Archive) (*pb.Archive, error) {
  function toPbArchiveConfig (line 3430) | func toPbArchiveConfig(config *mdb.ArchiveConfig) *pb.ArchiveConfig {
  function fromPbArchiveConfig (line 3452) | func fromPbArchiveConfig(pbConfig *pb.ArchiveConfig) *mdb.ArchiveConfig {
  function toFilConfig (line 3476) | func toFilConfig(config *mdb.ArchiveConfig) *userPb.FilConfig {

FILE: api/common/common.go
  type ctxKey (line 14) | type ctxKey
  function NewSessionContext (line 17) | func NewSessionContext(ctx context.Context, session string) context.Cont...
  function SessionFromContext (line 25) | func SessionFromContext(ctx context.Context) (string, bool) {
  function SessionFromMD (line 31) | func SessionFromMD(ctx context.Context) (session string, ok bool) {
  function NewOrgSlugContext (line 40) | func NewOrgSlugContext(ctx context.Context, slug string) context.Context {
  function OrgSlugFromContext (line 48) | func OrgSlugFromContext(ctx context.Context) (string, bool) {
  function OrgSlugFromMD (line 54) | func OrgSlugFromMD(ctx context.Context) (slug string, ok bool) {
  function NewAPIKeyContext (line 63) | func NewAPIKeyContext(ctx context.Context, key string) context.Context {
  function APIKeyFromContext (line 71) | func APIKeyFromContext(ctx context.Context) (string, bool) {
  function APIKeyFromMD (line 77) | func APIKeyFromMD(ctx context.Context) (key string, ok bool) {
  function CreateAPISigContext (line 89) | func CreateAPISigContext(ctx context.Context, date time.Time, secret str...
  function NewAPISigContext (line 106) | func NewAPISigContext(ctx context.Context, msg string, sig []byte) conte...
  function APISigFromContext (line 116) | func APISigFromContext(ctx context.Context) (msg string, sig []byte, ok ...
  function APISigFromMD (line 129) | func APISigFromMD(ctx context.Context) (msg string, sig []byte, ok bool) {
  function ValidateAPISigContext (line 149) | func ValidateAPISigContext(ctx context.Context, secret string) bool {
  function NewThreadIDContext (line 174) | func NewThreadIDContext(ctx context.Context, id thread.ID) context.Conte...
  function ThreadIDFromContext (line 182) | func ThreadIDFromContext(ctx context.Context) (thread.ID, bool) {
  function ThreadIDFromMD (line 188) | func ThreadIDFromMD(ctx context.Context) (id thread.ID, ok bool) {
  function NewThreadNameContext (line 204) | func NewThreadNameContext(ctx context.Context, name string) context.Cont...
  function ThreadNameFromContext (line 212) | func ThreadNameFromContext(ctx context.Context) (string, bool) {
  function ThreadNameFromMD (line 218) | func ThreadNameFromMD(ctx context.Context) (name string, ok bool) {
  type Credentials (line 227) | type Credentials struct
    method GetRequestMetadata (line 231) | func (c Credentials) GetRequestMetadata(ctx context.Context, _ ...stri...
    method RequireTransportSecurity (line 269) | func (c Credentials) RequireTransportSecurity() bool {

FILE: api/filecoin/client/client.go
  type Client (line 11) | type Client struct
    method Addresses (line 28) | func (c *Client) Addresses(ctx context.Context) (*userPb.AddressesResp...
    method Balance (line 32) | func (c *Client) Balance(ctx context.Context, addr string) (*userPb.Ba...
    method SignMessage (line 39) | func (c *Client) SignMessage(ctx context.Context, address string, mess...
    method VerifyMessage (line 47) | func (c *Client) VerifyMessage(ctx context.Context, address string, me...
    method CidInfo (line 52) | func (c *Client) CidInfo(ctx context.Context, cid string) (*userPb.Cid...
    method StorageDealRecords (line 57) | func (c *Client) StorageDealRecords(ctx context.Context, config *userP...
    method RetrievalDealRecords (line 64) | func (c *Client) RetrievalDealRecords(ctx context.Context, config *use...
    method Close (line 72) | func (c *Client) Close() error {
  function NewClient (line 17) | func NewClient(target string, opts ...grpc.DialOption) (*Client, error) {

FILE: api/hubd/client/client.go
  type Client (line 11) | type Client struct
    method Close (line 29) | func (c *Client) Close() error {
    method BuildInfo (line 34) | func (c *Client) BuildInfo(ctx context.Context) (*pb.BuildInfoResponse...
    method Signup (line 40) | func (c *Client) Signup(ctx context.Context, username, email string) (...
    method Signin (line 49) | func (c *Client) Signin(ctx context.Context, usernameOrEmail string) (...
    method Signout (line 56) | func (c *Client) Signout(ctx context.Context) error {
    method GetSessionInfo (line 62) | func (c *Client) GetSessionInfo(ctx context.Context) (*pb.GetSessionIn...
    method GetIdentity (line 67) | func (c *Client) GetIdentity(ctx context.Context) (*pb.GetIdentityResp...
    method CreateKey (line 72) | func (c *Client) CreateKey(ctx context.Context, keyType pb.KeyType, se...
    method InvalidateKey (line 81) | func (c *Client) InvalidateKey(ctx context.Context, key string) error {
    method ListKeys (line 87) | func (c *Client) ListKeys(ctx context.Context) (*pb.ListKeysResponse, ...
    method CreateOrg (line 92) | func (c *Client) CreateOrg(ctx context.Context, name string) (*pb.Crea...
    method GetOrg (line 97) | func (c *Client) GetOrg(ctx context.Context) (*pb.GetOrgResponse, erro...
    method ListOrgs (line 102) | func (c *Client) ListOrgs(ctx context.Context) (*pb.ListOrgsResponse, ...
    method RemoveOrg (line 107) | func (c *Client) RemoveOrg(ctx context.Context) error {
    method InviteToOrg (line 113) | func (c *Client) InviteToOrg(ctx context.Context, email string) (*pb.I...
    method LeaveOrg (line 120) | func (c *Client) LeaveOrg(ctx context.Context) error {
    method SetupBilling (line 127) | func (c *Client) SetupBilling(ctx context.Context) error {
    method GetBillingSession (line 133) | func (c *Client) GetBillingSession(ctx context.Context) (*pb.GetBillin...
    method ListBillingUsers (line 138) | func (c *Client) ListBillingUsers(ctx context.Context, opts ...ListOpt...
    method IsUsernameAvailable (line 151) | func (c *Client) IsUsernameAvailable(ctx context.Context, username str...
    method IsOrgNameAvailable (line 159) | func (c *Client) IsOrgNameAvailable(ctx context.Context, name string) ...
    method DestroyAccount (line 166) | func (c *Client) DestroyAccount(ctx context.Context) error {
  function NewClient (line 17) | func NewClient(target string, opts ...grpc.DialOption) (*Client, error) {

FILE: api/hubd/client/client_test.go
  function TestMain (line 25) | func TestMain(m *testing.M) {
  function TestClient_Signup (line 35) | func TestClient_Signup(t *testing.T) {
  function TestClient_Signin (line 44) | func TestClient_Signin(t *testing.T) {
  function TestClient_Signout (line 66) | func TestClient_Signout(t *testing.T) {
  function TestClient_GetSessionInfo (line 84) | func TestClient_GetSessionInfo(t *testing.T) {
  function TestClient_GetIdentity (line 107) | func TestClient_GetIdentity(t *testing.T) {
  function TestClient_CreateKey (line 134) | func TestClient_CreateKey(t *testing.T) {
  function TestClient_InvalidateKey (line 156) | func TestClient_InvalidateKey(t *testing.T) {
  function TestClient_ListKeys (line 182) | func TestClient_ListKeys(t *testing.T) {
  function TestClient_CreateOrg (line 207) | func TestClient_CreateOrg(t *testing.T) {
  function TestClient_GetOrg (line 229) | func TestClient_GetOrg(t *testing.T) {
  function TestClient_ListOrgs (line 251) | func TestClient_ListOrgs(t *testing.T) {
  function TestClient_RemoveOrg (line 276) | func TestClient_RemoveOrg(t *testing.T) {
  function TestClient_InviteToOrg (line 308) | func TestClient_InviteToOrg(t *testing.T) {
  function TestClient_LeaveOrg (line 331) | func TestClient_LeaveOrg(t *testing.T) {
  function TestClient_SetupBilling (line 367) | func TestClient_SetupBilling(t *testing.T) {
  function TestClient_GetBillingSession (line 389) | func TestClient_GetBillingSession(t *testing.T) {
  function TestClient_IsUsernameAvailable (line 408) | func TestClient_IsUsernameAvailable(t *testing.T) {
  function TestClient_IsOrgNameAvailable (line 422) | func TestClient_IsOrgNameAvailable(t *testing.T) {
  function TestClient_DestroyAccount (line 442) | func TestClient_DestroyAccount(t *testing.T) {
  function TestClose (line 464) | func TestClose(t *testing.T) {
  function setup (line 476) | func setup(t *testing.T, conf *core.Config) (core.Config, *c.Client, *tc...
  function setupWithBilling (line 499) | func setupWithBilling(t *testing.T) (core.Config, *c.Client, *tc.Client) {

FILE: api/hubd/client/options.go
  type listOptions (line 3) | type listOptions struct
  type ListOption (line 8) | type ListOption
  function WithOffset (line 11) | func WithOffset(offset int64) ListOption {
  function WithLimit (line 18) | func WithLimit(limit int64) ListOption {

FILE: api/hubd/pb/hubd.pb.go
  constant _ (line 24) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 26) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  constant _ (line 31) | _ = proto.ProtoPackageIsVersion4
  type KeyType (line 33) | type KeyType
    method Enum (line 55) | func (x KeyType) Enum() *KeyType {
    method String (line 61) | func (x KeyType) String() string {
    method Descriptor (line 65) | func (KeyType) Descriptor() protoreflect.EnumDescriptor {
    method Type (line 69) | func (KeyType) Type() protoreflect.EnumType {
    method Number (line 73) | func (x KeyType) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 78) | func (KeyType) EnumDescriptor() ([]byte, []int) {
  constant KeyType_KEY_TYPE_UNSPECIFIED (line 36) | KeyType_KEY_TYPE_UNSPECIFIED KeyType = 0
  constant KeyType_KEY_TYPE_ACCOUNT (line 37) | KeyType_KEY_TYPE_ACCOUNT     KeyType = 1
  constant KeyType_KEY_TYPE_USER (line 38) | KeyType_KEY_TYPE_USER        KeyType = 2
  type BuildInfoRequest (line 82) | type BuildInfoRequest struct
    method Reset (line 88) | func (x *BuildInfoRequest) Reset() {
    method String (line 97) | func (x *BuildInfoRequest) String() string {
    method ProtoMessage (line 101) | func (*BuildInfoRequest) ProtoMessage() {}
    method ProtoReflect (line 103) | func (x *BuildInfoRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 116) | func (*BuildInfoRequest) Descriptor() ([]byte, []int) {
  type BuildInfoResponse (line 120) | type BuildInfoResponse struct
    method Reset (line 133) | func (x *BuildInfoResponse) Reset() {
    method String (line 142) | func (x *BuildInfoResponse) String() string {
    method ProtoMessage (line 146) | func (*BuildInfoResponse) ProtoMessage() {}
    method ProtoReflect (line 148) | func (x *BuildInfoResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 161) | func (*BuildInfoResponse) Descriptor() ([]byte, []int) {
    method GetGitCommit (line 165) | func (x *BuildInfoResponse) GetGitCommit() string {
    method GetGitBranch (line 172) | func (x *BuildInfoResponse) GetGitBranch() string {
    method GetGitState (line 179) | func (x *BuildInfoResponse) GetGitState() string {
    method GetGitSummary (line 186) | func (x *BuildInfoResponse) GetGitSummary() string {
    method GetBuildDate (line 193) | func (x *BuildInfoResponse) GetBuildDate() string {
    method GetVersion (line 200) | func (x *BuildInfoResponse) GetVersion() string {
  type SignupRequest (line 207) | type SignupRequest struct
    method Reset (line 216) | func (x *SignupRequest) Reset() {
    method String (line 225) | func (x *SignupRequest) String() string {
    method ProtoMessage (line 229) | func (*SignupRequest) ProtoMessage() {}
    method ProtoReflect (line 231) | func (x *SignupRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 244) | func (*SignupRequest) Descriptor() ([]byte, []int) {
    method GetUsername (line 248) | func (x *SignupRequest) GetUsername() string {
    method GetEmail (line 255) | func (x *SignupRequest) GetEmail() string {
  type SignupResponse (line 262) | type SignupResponse struct
    method Reset (line 271) | func (x *SignupResponse) Reset() {
    method String (line 280) | func (x *SignupResponse) String() string {
    method ProtoMessage (line 284) | func (*SignupResponse) ProtoMessage() {}
    method ProtoReflect (line 286) | func (x *SignupResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 299) | func (*SignupResponse) Descriptor() ([]byte, []int) {
    method GetKey (line 303) | func (x *SignupResponse) GetKey() []byte {
    method GetSession (line 310) | func (x *SignupResponse) GetSession() string {
  type SigninRequest (line 317) | type SigninRequest struct
    method Reset (line 325) | func (x *SigninRequest) Reset() {
    method String (line 334) | func (x *SigninRequest) String() string {
    method ProtoMessage (line 338) | func (*SigninRequest) ProtoMessage() {}
    method ProtoReflect (line 340) | func (x *SigninRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 353) | func (*SigninRequest) Descriptor() ([]byte, []int) {
    method GetUsernameOrEmail (line 357) | func (x *SigninRequest) GetUsernameOrEmail() string {
  type SigninResponse (line 364) | type SigninResponse struct
    method Reset (line 373) | func (x *SigninResponse) Reset() {
    method String (line 382) | func (x *SigninResponse) String() string {
    method ProtoMessage (line 386) | func (*SigninResponse) ProtoMessage() {}
    method ProtoReflect (line 388) | func (x *SigninResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 401) | func (*SigninResponse) Descriptor() ([]byte, []int) {
    method GetKey (line 405) | func (x *SigninResponse) GetKey() []byte {
    method GetSession (line 412) | func (x *SigninResponse) GetSession() string {
  type SignoutRequest (line 419) | type SignoutRequest struct
    method Reset (line 425) | func (x *SignoutRequest) Reset() {
    method String (line 434) | func (x *SignoutRequest) String() string {
    method ProtoMessage (line 438) | func (*SignoutRequest) ProtoMessage() {}
    method ProtoReflect (line 440) | func (x *SignoutRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 453) | func (*SignoutRequest) Descriptor() ([]byte, []int) {
  type SignoutResponse (line 457) | type SignoutResponse struct
    method Reset (line 463) | func (x *SignoutResponse) Reset() {
    method String (line 472) | func (x *SignoutResponse) String() string {
    method ProtoMessage (line 476) | func (*SignoutResponse) ProtoMessage() {}
    method ProtoReflect (line 478) | func (x *SignoutResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 491) | func (*SignoutResponse) Descriptor() ([]byte, []int) {
  type GetSessionInfoRequest (line 495) | type GetSessionInfoRequest struct
    method Reset (line 501) | func (x *GetSessionInfoRequest) Reset() {
    method String (line 510) | func (x *GetSessionInfoRequest) String() string {
    method ProtoMessage (line 514) | func (*GetSessionInfoRequest) ProtoMessage() {}
    method ProtoReflect (line 516) | func (x *GetSessionInfoRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 529) | func (*GetSessionInfoRequest) Descriptor() ([]byte, []int) {
  type GetSessionInfoResponse (line 533) | type GetSessionInfoResponse struct
    method Reset (line 543) | func (x *GetSessionInfoResponse) Reset() {
    method String (line 552) | func (x *GetSessionInfoResponse) String() string {
    method ProtoMessage (line 556) | func (*GetSessionInfoResponse) ProtoMessage() {}
    method ProtoReflect (line 558) | func (x *GetSessionInfoResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 571) | func (*GetSessionInfoResponse) Descriptor() ([]byte, []int) {
    method GetKey (line 575) | func (x *GetSessionInfoResponse) GetKey() []byte {
    method GetUsername (line 582) | func (x *GetSessionInfoResponse) GetUsername() string {
    method GetEmail (line 589) | func (x *GetSessionInfoResponse) GetEmail() string {
  type GetIdentityRequest (line 596) | type GetIdentityRequest struct
    method Reset (line 602) | func (x *GetIdentityRequest) Reset() {
    method String (line 611) | func (x *GetIdentityRequest) String() string {
    method ProtoMessage (line 615) | func (*GetIdentityRequest) ProtoMessage() {}
    method ProtoReflect (line 617) | func (x *GetIdentityRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 630) | func (*GetIdentityRequest) Descriptor() ([]byte, []int) {
  type GetIdentityResponse (line 634) | type GetIdentityResponse struct
    method Reset (line 642) | func (x *GetIdentityResponse) Reset() {
    method String (line 651) | func (x *GetIdentityResponse) String() string {
    method ProtoMessage (line 655) | func (*GetIdentityResponse) ProtoMessage() {}
    method ProtoReflect (line 657) | func (x *GetIdentityResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 670) | func (*GetIdentityResponse) Descriptor() ([]byte, []int) {
    method GetIdentity (line 674) | func (x *GetIdentityResponse) GetIdentity() []byte {
  type KeyInfo (line 681) | type KeyInfo struct
    method Reset (line 694) | func (x *KeyInfo) Reset() {
    method String (line 703) | func (x *KeyInfo) String() string {
    method ProtoMessage (line 707) | func (*KeyInfo) ProtoMessage() {}
    method ProtoReflect (line 709) | func (x *KeyInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 722) | func (*KeyInfo) Descriptor() ([]byte, []int) {
    method GetKey (line 726) | func (x *KeyInfo) GetKey() string {
    method GetSecret (line 733) | func (x *KeyInfo) GetSecret() string {
    method GetType (line 740) | func (x *KeyInfo) GetType() KeyType {
    method GetValid (line 747) | func (x *KeyInfo) GetValid() bool {
    method GetThreads (line 754) | func (x *KeyInfo) GetThreads() int32 {
    method GetSecure (line 761) | func (x *KeyInfo) GetSecure() bool {
  type CreateKeyRequest (line 768) | type CreateKeyRequest struct
    method Reset (line 777) | func (x *CreateKeyRequest) Reset() {
    method String (line 786) | func (x *CreateKeyRequest) String() string {
    method ProtoMessage (line 790) | func (*CreateKeyRequest) ProtoMessage() {}
    method ProtoReflect (line 792) | func (x *CreateKeyRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 805) | func (*CreateKeyRequest) Descriptor() ([]byte, []int) {
    method GetType (line 809) | func (x *CreateKeyRequest) GetType() KeyType {
    method GetSecure (line 816) | func (x *CreateKeyRequest) GetSecure() bool {
  type CreateKeyResponse (line 823) | type CreateKeyResponse struct
    method Reset (line 831) | func (x *CreateKeyResponse) Reset() {
    method String (line 840) | func (x *CreateKeyResponse) String() string {
    method ProtoMessage (line 844) | func (*CreateKeyResponse) ProtoMessage() {}
    method ProtoReflect (line 846) | func (x *CreateKeyResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 859) | func (*CreateKeyResponse) Descriptor() ([]byte, []int) {
    method GetKeyInfo (line 863) | func (x *CreateKeyResponse) GetKeyInfo() *KeyInfo {
  type InvalidateKeyRequest (line 870) | type InvalidateKeyRequest struct
    method Reset (line 878) | func (x *InvalidateKeyRequest) Reset() {
    method String (line 887) | func (x *InvalidateKeyRequest) String() string {
    method ProtoMessage (line 891) | func (*InvalidateKeyRequest) ProtoMessage() {}
    method ProtoReflect (line 893) | func (x *InvalidateKeyRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 906) | func (*InvalidateKeyRequest) Descriptor() ([]byte, []int) {
    method GetKey (line 910) | func (x *InvalidateKeyRequest) GetKey() string {
  type InvalidateKeyResponse (line 917) | type InvalidateKeyResponse struct
    method Reset (line 923) | func (x *InvalidateKeyResponse) Reset() {
    method String (line 932) | func (x *InvalidateKeyResponse) String() string {
    method ProtoMessage (line 936) | func (*InvalidateKeyResponse) ProtoMessage() {}
    method ProtoReflect (line 938) | func (x *InvalidateKeyResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 951) | func (*InvalidateKeyResponse) Descriptor() ([]byte, []int) {
  type ListKeysRequest (line 955) | type ListKeysRequest struct
    method Reset (line 961) | func (x *ListKeysRequest) Reset() {
    method String (line 970) | func (x *ListKeysRequest) String() string {
    method ProtoMessage (line 974) | func (*ListKeysRequest) ProtoMessage() {}
    method ProtoReflect (line 976) | func (x *ListKeysRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 989) | func (*ListKeysRequest) Descriptor() ([]byte, []int) {
  type ListKeysResponse (line 993) | type ListKeysResponse struct
    method Reset (line 1001) | func (x *ListKeysResponse) Reset() {
    method String (line 1010) | func (x *ListKeysResponse) String() string {
    method ProtoMessage (line 1014) | func (*ListKeysResponse) ProtoMessage() {}
    method ProtoReflect (line 1016) | func (x *ListKeysResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1029) | func (*ListKeysResponse) Descriptor() ([]byte, []int) {
    method GetList (line 1033) | func (x *ListKeysResponse) GetList() []*KeyInfo {
  type OrgInfo (line 1040) | type OrgInfo struct
    method Reset (line 1053) | func (x *OrgInfo) Reset() {
    method String (line 1062) | func (x *OrgInfo) String() string {
    method ProtoMessage (line 1066) | func (*OrgInfo) ProtoMessage() {}
    method ProtoReflect (line 1068) | func (x *OrgInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1081) | func (*OrgInfo) Descriptor() ([]byte, []int) {
    method GetKey (line 1085) | func (x *OrgInfo) GetKey() []byte {
    method GetName (line 1092) | func (x *OrgInfo) GetName() string {
    method GetSlug (line 1099) | func (x *OrgInfo) GetSlug() string {
    method GetHost (line 1106) | func (x *OrgInfo) GetHost() string {
    method GetMembers (line 1113) | func (x *OrgInfo) GetMembers() []*OrgInfo_Member {
    method GetCreatedAt (line 1120) | func (x *OrgInfo) GetCreatedAt() int64 {
  type CreateOrgRequest (line 1127) | type CreateOrgRequest struct
    method Reset (line 1135) | func (x *CreateOrgRequest) Reset() {
    method String (line 1144) | func (x *CreateOrgRequest) String() string {
    method ProtoMessage (line 1148) | func (*CreateOrgRequest) ProtoMessage() {}
    method ProtoReflect (line 1150) | func (x *CreateOrgRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1163) | func (*CreateOrgRequest) Descriptor() ([]byte, []int) {
    method GetName (line 1167) | func (x *CreateOrgRequest) GetName() string {
  type CreateOrgResponse (line 1174) | type CreateOrgResponse struct
    method Reset (line 1182) | func (x *CreateOrgResponse) Reset() {
    method String (line 1191) | func (x *CreateOrgResponse) String() string {
    method ProtoMessage (line 1195) | func (*CreateOrgResponse) ProtoMessage() {}
    method ProtoReflect (line 1197) | func (x *CreateOrgResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1210) | func (*CreateOrgResponse) Descriptor() ([]byte, []int) {
    method GetOrgInfo (line 1214) | func (x *CreateOrgResponse) GetOrgInfo() *OrgInfo {
  type GetOrgRequest (line 1221) | type GetOrgRequest struct
    method Reset (line 1227) | func (x *GetOrgRequest) Reset() {
    method String (line 1236) | func (x *GetOrgRequest) String() string {
    method ProtoMessage (line 1240) | func (*GetOrgRequest) ProtoMessage() {}
    method ProtoReflect (line 1242) | func (x *GetOrgRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1255) | func (*GetOrgRequest) Descriptor() ([]byte, []int) {
  type GetOrgResponse (line 1259) | type GetOrgResponse struct
    method Reset (line 1267) | func (x *GetOrgResponse) Reset() {
    method String (line 1276) | func (x *GetOrgResponse) String() string {
    method ProtoMessage (line 1280) | func (*GetOrgResponse) ProtoMessage() {}
    method ProtoReflect (line 1282) | func (x *GetOrgResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1295) | func (*GetOrgResponse) Descriptor() ([]byte, []int) {
    method GetOrgInfo (line 1299) | func (x *GetOrgResponse) GetOrgInfo() *OrgInfo {
  type ListOrgsRequest (line 1306) | type ListOrgsRequest struct
    method Reset (line 1312) | func (x *ListOrgsRequest) Reset() {
    method String (line 1321) | func (x *ListOrgsRequest) String() string {
    method ProtoMessage (line 1325) | func (*ListOrgsRequest) ProtoMessage() {}
    method ProtoReflect (line 1327) | func (x *ListOrgsRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1340) | func (*ListOrgsRequest) Descriptor() ([]byte, []int) {
  type ListOrgsResponse (line 1344) | type ListOrgsResponse struct
    method Reset (line 1352) | func (x *ListOrgsResponse) Reset() {
    method String (line 1361) | func (x *ListOrgsResponse) String() string {
    method ProtoMessage (line 1365) | func (*ListOrgsResponse) ProtoMessage() {}
    method ProtoReflect (line 1367) | func (x *ListOrgsResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1380) | func (*ListOrgsResponse) Descriptor() ([]byte, []int) {
    method GetList (line 1384) | func (x *ListOrgsResponse) GetList() []*OrgInfo {
  type RemoveOrgRequest (line 1391) | type RemoveOrgRequest struct
    method Reset (line 1397) | func (x *RemoveOrgRequest) Reset() {
    method String (line 1406) | func (x *RemoveOrgRequest) String() string {
    method ProtoMessage (line 1410) | func (*RemoveOrgRequest) ProtoMessage() {}
    method ProtoReflect (line 1412) | func (x *RemoveOrgRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1425) | func (*RemoveOrgRequest) Descriptor() ([]byte, []int) {
  type RemoveOrgResponse (line 1429) | type RemoveOrgResponse struct
    method Reset (line 1435) | func (x *RemoveOrgResponse) Reset() {
    method String (line 1444) | func (x *RemoveOrgResponse) String() string {
    method ProtoMessage (line 1448) | func (*RemoveOrgResponse) ProtoMessage() {}
    method ProtoReflect (line 1450) | func (x *RemoveOrgResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1463) | func (*RemoveOrgResponse) Descriptor() ([]byte, []int) {
  type InviteToOrgRequest (line 1467) | type InviteToOrgRequest struct
    method Reset (line 1475) | func (x *InviteToOrgRequest) Reset() {
    method String (line 1484) | func (x *InviteToOrgRequest) String() string {
    method ProtoMessage (line 1488) | func (*InviteToOrgRequest) ProtoMessage() {}
    method ProtoReflect (line 1490) | func (x *InviteToOrgRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1503) | func (*InviteToOrgRequest) Descriptor() ([]byte, []int) {
    method GetEmail (line 1507) | func (x *InviteToOrgRequest) GetEmail() string {
  type InviteToOrgResponse (line 1514) | type InviteToOrgResponse struct
    method Reset (line 1522) | func (x *InviteToOrgResponse) Reset() {
    method String (line 1531) | func (x *InviteToOrgResponse) String() string {
    method ProtoMessage (line 1535) | func (*InviteToOrgResponse) ProtoMessage() {}
    method ProtoReflect (line 1537) | func (x *InviteToOrgResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1550) | func (*InviteToOrgResponse) Descriptor() ([]byte, []int) {
    method GetToken (line 1554) | func (x *InviteToOrgResponse) GetToken() string {
  type LeaveOrgRequest (line 1561) | type LeaveOrgRequest struct
    method Reset (line 1567) | func (x *LeaveOrgRequest) Reset() {
    method String (line 1576) | func (x *LeaveOrgRequest) String() string {
    method ProtoMessage (line 1580) | func (*LeaveOrgRequest) ProtoMessage() {}
    method ProtoReflect (line 1582) | func (x *LeaveOrgRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1595) | func (*LeaveOrgRequest) Descriptor() ([]byte, []int) {
  type LeaveOrgResponse (line 1599) | type LeaveOrgResponse struct
    method Reset (line 1605) | func (x *LeaveOrgResponse) Reset() {
    method String (line 1614) | func (x *LeaveOrgResponse) String() string {
    method ProtoMessage (line 1618) | func (*LeaveOrgResponse) ProtoMessage() {}
    method ProtoReflect (line 1620) | func (x *LeaveOrgResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1633) | func (*LeaveOrgResponse) Descriptor() ([]byte, []int) {
  type SetupBillingRequest (line 1637) | type SetupBillingRequest struct
    method Reset (line 1643) | func (x *SetupBillingRequest) Reset() {
    method String (line 1652) | func (x *SetupBillingRequest) String() string {
    method ProtoMessage (line 1656) | func (*SetupBillingRequest) ProtoMessage() {}
    method ProtoReflect (line 1658) | func (x *SetupBillingRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1671) | func (*SetupBillingRequest) Descriptor() ([]byte, []int) {
  type SetupBillingResponse (line 1675) | type SetupBillingResponse struct
    method Reset (line 1681) | func (x *SetupBillingResponse) Reset() {
    method String (line 1690) | func (x *SetupBillingResponse) String() string {
    method ProtoMessage (line 1694) | func (*SetupBillingResponse) ProtoMessage() {}
    method ProtoReflect (line 1696) | func (x *SetupBillingResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1709) | func (*SetupBillingResponse) Descriptor() ([]byte, []int) {
  type GetBillingSessionRequest (line 1713) | type GetBillingSessionRequest struct
    method Reset (line 1719) | func (x *GetBillingSessionRequest) Reset() {
    method String (line 1728) | func (x *GetBillingSessionRequest) String() string {
    method ProtoMessage (line 1732) | func (*GetBillingSessionRequest) ProtoMessage() {}
    method ProtoReflect (line 1734) | func (x *GetBillingSessionRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1747) | func (*GetBillingSessionRequest) Descriptor() ([]byte, []int) {
  type GetBillingSessionResponse (line 1751) | type GetBillingSessionResponse struct
    method Reset (line 1759) | func (x *GetBillingSessionResponse) Reset() {
    method String (line 1768) | func (x *GetBillingSessionResponse) String() string {
    method ProtoMessage (line 1772) | func (*GetBillingSessionResponse) ProtoMessage() {}
    method ProtoReflect (line 1774) | func (x *GetBillingSessionResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1787) | func (*GetBillingSessionResponse) Descriptor() ([]byte, []int) {
    method GetUrl (line 1791) | func (x *GetBillingSessionResponse) GetUrl() string {
  type ListBillingUsersRequest (line 1798) | type ListBillingUsersRequest struct
    method Reset (line 1807) | func (x *ListBillingUsersRequest) Reset() {
    method String (line 1816) | func (x *ListBillingUsersRequest) String() string {
    method ProtoMessage (line 1820) | func (*ListBillingUsersRequest) ProtoMessage() {}
    method ProtoReflect (line 1822) | func (x *ListBillingUsersRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1835) | func (*ListBillingUsersRequest) Descriptor() ([]byte, []int) {
    method GetOffset (line 1839) | func (x *ListBillingUsersRequest) GetOffset() int64 {
    method GetLimit (line 1846) | func (x *ListBillingUsersRequest) GetLimit() int64 {
  type ListBillingUsersResponse (line 1853) | type ListBillingUsersResponse struct
    method Reset (line 1862) | func (x *ListBillingUsersResponse) Reset() {
    method String (line 1871) | func (x *ListBillingUsersResponse) String() string {
    method ProtoMessage (line 1875) | func (*ListBillingUsersResponse) ProtoMessage() {}
    method ProtoReflect (line 1877) | func (x *ListBillingUsersResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1890) | func (*ListBillingUsersResponse) Descriptor() ([]byte, []int) {
    method GetUsers (line 1894) | func (x *ListBillingUsersResponse) GetUsers() []*pb.GetCustomerResponse {
    method GetNextOffset (line 1901) | func (x *ListBillingUsersResponse) GetNextOffset() int64 {
  type IsUsernameAvailableRequest (line 1908) | type IsUsernameAvailableRequest struct
    method Reset (line 1916) | func (x *IsUsernameAvailableRequest) Reset() {
    method String (line 1925) | func (x *IsUsernameAvailableRequest) String() string {
    method ProtoMessage (line 1929) | func (*IsUsernameAvailableRequest) ProtoMessage() {}
    method ProtoReflect (line 1931) | func (x *IsUsernameAvailableRequest) ProtoReflect() protoreflect.Messa...
    method Descriptor (line 1944) | func (*IsUsernameAvailableRequest) Descriptor() ([]byte, []int) {
    method GetUsername (line 1948) | func (x *IsUsernameAvailableRequest) GetUsername() string {
  type IsUsernameAvailableResponse (line 1955) | type IsUsernameAvailableResponse struct
    method Reset (line 1961) | func (x *IsUsernameAvailableResponse) Reset() {
    method String (line 1970) | func (x *IsUsernameAvailableResponse) String() string {
    method ProtoMessage (line 1974) | func (*IsUsernameAvailableResponse) ProtoMessage() {}
    method ProtoReflect (line 1976) | func (x *IsUsernameAvailableResponse) ProtoReflect() protoreflect.Mess...
    method Descriptor (line 1989) | func (*IsUsernameAvailableResponse) Descriptor() ([]byte, []int) {
  type IsOrgNameAvailableRequest (line 1993) | type IsOrgNameAvailableRequest struct
    method Reset (line 2001) | func (x *IsOrgNameAvailableRequest) Reset() {
    method String (line 2010) | func (x *IsOrgNameAvailableRequest) String() string {
    method ProtoMessage (line 2014) | func (*IsOrgNameAvailableRequest) ProtoMessage() {}
    method ProtoReflect (line 2016) | func (x *IsOrgNameAvailableRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2029) | func (*IsOrgNameAvailableRequest) Descriptor() ([]byte, []int) {
    method GetName (line 2033) | func (x *IsOrgNameAvailableRequest) GetName() string {
  type IsOrgNameAvailableResponse (line 2040) | type IsOrgNameAvailableResponse struct
    method Reset (line 2049) | func (x *IsOrgNameAvailableResponse) Reset() {
    method String (line 2058) | func (x *IsOrgNameAvailableResponse) String() string {
    method ProtoMessage (line 2062) | func (*IsOrgNameAvailableResponse) ProtoMessage() {}
    method ProtoReflect (line 2064) | func (x *IsOrgNameAvailableResponse) ProtoReflect() protoreflect.Messa...
    method Descriptor (line 2077) | func (*IsOrgNameAvailableResponse) Descriptor() ([]byte, []int) {
    method GetSlug (line 2081) | func (x *IsOrgNameAvailableResponse) GetSlug() string {
    method GetHost (line 2088) | func (x *IsOrgNameAvailableResponse) GetHost() string {
  type DestroyAccountRequest (line 2095) | type DestroyAccountRequest struct
    method Reset (line 2101) | func (x *DestroyAccountRequest) Reset() {
    method String (line 2110) | func (x *DestroyAccountRequest) String() string {
    method ProtoMessage (line 2114) | func (*DestroyAccountRequest) ProtoMessage() {}
    method ProtoReflect (line 2116) | func (x *DestroyAccountRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2129) | func (*DestroyAccountRequest) Descriptor() ([]byte, []int) {
  type DestroyAccountResponse (line 2133) | type DestroyAccountResponse struct
    method Reset (line 2139) | func (x *DestroyAccountResponse) Reset() {
    method String (line 2148) | func (x *DestroyAccountResponse) String() string {
    method ProtoMessage (line 2152) | func (*DestroyAccountResponse) ProtoMessage() {}
    method ProtoReflect (line 2154) | func (x *DestroyAccountResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2167) | func (*DestroyAccountResponse) Descriptor() ([]byte, []int) {
  type OrgInfo_Member (line 2171) | type OrgInfo_Member struct
    method Reset (line 2181) | func (x *OrgInfo_Member) Reset() {
    method String (line 2190) | func (x *OrgInfo_Member) String() string {
    method ProtoMessage (line 2194) | func (*OrgInfo_Member) ProtoMessage() {}
    method ProtoReflect (line 2196) | func (x *OrgInfo_Member) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2209) | func (*OrgInfo_Member) Descriptor() ([]byte, []int) {
    method GetKey (line 2213) | func (x *OrgInfo_Member) GetKey() []byte {
    method GetUsername (line 2220) | func (x *OrgInfo_Member) GetUsername() string {
    method GetRole (line 2227) | func (x *OrgInfo_Member) GetRole() string {
  function file_api_hubd_pb_hubd_proto_rawDescGZIP (line 2521) | func file_api_hubd_pb_hubd_proto_rawDescGZIP() []byte {
  function init (line 2638) | func init() { file_api_hubd_pb_hubd_proto_init() }
  function file_api_hubd_pb_hubd_proto_init (line 2639) | func file_api_hubd_pb_hubd_proto_init() {
  constant _ (line 3212) | _ = grpc.SupportPackageIsVersion6
  type APIServiceClient (line 3217) | type APIServiceClient interface
  type aPIServiceClient (line 3241) | type aPIServiceClient struct
    method BuildInfo (line 3249) | func (c *aPIServiceClient) BuildInfo(ctx context.Context, in *BuildInf...
    method Signup (line 3258) | func (c *aPIServiceClient) Signup(ctx context.Context, in *SignupReque...
    method Signin (line 3267) | func (c *aPIServiceClient) Signin(ctx context.Context, in *SigninReque...
    method Signout (line 3276) | func (c *aPIServiceClient) Signout(ctx context.Context, in *SignoutReq...
    method GetSessionInfo (line 3285) | func (c *aPIServiceClient) GetSessionInfo(ctx context.Context, in *Get...
    method GetIdentity (line 3294) | func (c *aPIServiceClient) GetIdentity(ctx context.Context, in *GetIde...
    method CreateKey (line 3303) | func (c *aPIServiceClient) CreateKey(ctx context.Context, in *CreateKe...
    method ListKeys (line 3312) | func (c *aPIServiceClient) ListKeys(ctx context.Context, in *ListKeysR...
    method InvalidateKey (line 3321) | func (c *aPIServiceClient) InvalidateKey(ctx context.Context, in *Inva...
    method CreateOrg (line 3330) | func (c *aPIServiceClient) CreateOrg(ctx context.Context, in *CreateOr...
    method GetOrg (line 3339) | func (c *aPIServiceClient) GetOrg(ctx context.Context, in *GetOrgReque...
    method ListOrgs (line 3348) | func (c *aPIServiceClient) ListOrgs(ctx context.Context, in *ListOrgsR...
    method RemoveOrg (line 3357) | func (c *aPIServiceClient) RemoveOrg(ctx context.Context, in *RemoveOr...
    method InviteToOrg (line 3366) | func (c *aPIServiceClient) InviteToOrg(ctx context.Context, in *Invite...
    method LeaveOrg (line 3375) | func (c *aPIServiceClient) LeaveOrg(ctx context.Context, in *LeaveOrgR...
    method SetupBilling (line 3384) | func (c *aPIServiceClient) SetupBilling(ctx context.Context, in *Setup...
    method GetBillingSession (line 3393) | func (c *aPIServiceClient) GetBillingSession(ctx context.Context, in *...
    method ListBillingUsers (line 3402) | func (c *aPIServiceClient) ListBillingUsers(ctx context.Context, in *L...
    method IsUsernameAvailable (line 3411) | func (c *aPIServiceClient) IsUsernameAvailable(ctx context.Context, in...
    method IsOrgNameAvailable (line 3420) | func (c *aPIServiceClient) IsOrgNameAvailable(ctx context.Context, in ...
    method DestroyAccount (line 3429) | func (c *aPIServiceClient) DestroyAccount(ctx context.Context, in *Des...
  function NewAPIServiceClient (line 3245) | func NewAPIServiceClient(cc grpc.ClientConnInterface) APIServiceClient {
  type APIServiceServer (line 3439) | type APIServiceServer interface
  type UnimplementedAPIServiceServer (line 3464) | type UnimplementedAPIServiceServer struct
    method BuildInfo (line 3467) | func (*UnimplementedAPIServiceServer) BuildInfo(context.Context, *Buil...
    method Signup (line 3470) | func (*UnimplementedAPIServiceServer) Signup(context.Context, *SignupR...
    method Signin (line 3473) | func (*UnimplementedAPIServiceServer) Signin(context.Context, *SigninR...
    method Signout (line 3476) | func (*UnimplementedAPIServiceServer) Signout(context.Context, *Signou...
    method GetSessionInfo (line 3479) | func (*UnimplementedAPIServiceServer) GetSessionInfo(context.Context, ...
    method GetIdentity (line 3482) | func (*UnimplementedAPIServiceServer) GetIdentity(context.Context, *Ge...
    method CreateKey (line 3485) | func (*UnimplementedAPIServiceServer) CreateKey(context.Context, *Crea...
    method ListKeys (line 3488) | func (*UnimplementedAPIServiceServer) ListKeys(context.Context, *ListK...
    method InvalidateKey (line 3491) | func (*UnimplementedAPIServiceServer) InvalidateKey(context.Context, *...
    method CreateOrg (line 3494) | func (*UnimplementedAPIServiceServer) CreateOrg(context.Context, *Crea...
    method GetOrg (line 3497) | func (*UnimplementedAPIServiceServer) GetOrg(context.Context, *GetOrgR...
    method ListOrgs (line 3500) | func (*UnimplementedAPIServiceServer) ListOrgs(context.Context, *ListO...
    method RemoveOrg (line 3503) | func (*UnimplementedAPIServiceServer) RemoveOrg(context.Context, *Remo...
    method InviteToOrg (line 3506) | func (*UnimplementedAPIServiceServer) InviteToOrg(context.Context, *In...
    method LeaveOrg (line 3509) | func (*UnimplementedAPIServiceServer) LeaveOrg(context.Context, *Leave...
    method SetupBilling (line 3512) | func (*UnimplementedAPIServiceServer) SetupBilling(context.Context, *S...
    method GetBillingSession (line 3515) | func (*UnimplementedAPIServiceServer) GetBillingSession(context.Contex...
    method ListBillingUsers (line 3518) | func (*UnimplementedAPIServiceServer) ListBillingUsers(context.Context...
    method IsUsernameAvailable (line 3521) | func (*UnimplementedAPIServiceServer) IsUsernameAvailable(context.Cont...
    method IsOrgNameAvailable (line 3524) | func (*UnimplementedAPIServiceServer) IsOrgNameAvailable(context.Conte...
    method DestroyAccount (line 3527) | func (*UnimplementedAPIServiceServer) DestroyAccount(context.Context, ...
  function RegisterAPIServiceServer (line 3531) | func RegisterAPIServiceServer(s *grpc.Server, srv APIServiceServer) {
  function _APIService_BuildInfo_Handler (line 3535) | func _APIService_BuildInfo_Handler(srv interface{}, ctx context.Context,...
  function _APIService_Signup_Handler (line 3553) | func _APIService_Signup_Handler(srv interface{}, ctx context.Context, de...
  function _APIService_Signin_Handler (line 3571) | func _APIService_Signin_Handler(srv interface{}, ctx context.Context, de...
  function _APIService_Signout_Handler (line 3589) | func _APIService_Signout_Handler(srv interface{}, ctx context.Context, d...
  function _APIService_GetSessionInfo_Handler (line 3607) | func _APIService_GetSessionInfo_Handler(srv interface{}, ctx context.Con...
  function _APIService_GetIdentity_Handler (line 3625) | func _APIService_GetIdentity_Handler(srv interface{}, ctx context.Contex...
  function _APIService_CreateKey_Handler (line 3643) | func _APIService_CreateKey_Handler(srv interface{}, ctx context.Context,...
  function _APIService_ListKeys_Handler (line 3661) | func _APIService_ListKeys_Handler(srv interface{}, ctx context.Context, ...
  function _APIService_InvalidateKey_Handler (line 3679) | func _APIService_InvalidateKey_Handler(srv interface{}, ctx context.Cont...
  function _APIService_CreateOrg_Handler (line 3697) | func _APIService_CreateOrg_Handler(srv interface{}, ctx context.Context,...
  function _APIService_GetOrg_Handler (line 3715) | func _APIService_GetOrg_Handler(srv interface{}, ctx context.Context, de...
  function _APIService_ListOrgs_Handler (line 3733) | func _APIService_ListOrgs_Handler(srv interface{}, ctx context.Context, ...
  function _APIService_RemoveOrg_Handler (line 3751) | func _APIService_RemoveOrg_Handler(srv interface{}, ctx context.Context,...
  function _APIService_InviteToOrg_Handler (line 3769) | func _APIService_InviteToOrg_Handler(srv interface{}, ctx context.Contex...
  function _APIService_LeaveOrg_Handler (line 3787) | func _APIService_LeaveOrg_Handler(srv interface{}, ctx context.Context, ...
  function _APIService_SetupBilling_Handler (line 3805) | func _APIService_SetupBilling_Handler(srv interface{}, ctx context.Conte...
  function _APIService_GetBillingSession_Handler (line 3823) | func _APIService_GetBillingSession_Handler(srv interface{}, ctx context....
  function _APIService_ListBillingUsers_Handler (line 3841) | func _APIService_ListBillingUsers_Handler(srv interface{}, ctx context.C...
  function _APIService_IsUsernameAvailable_Handler (line 3859) | func _APIService_IsUsernameAvailable_Handler(srv interface{}, ctx contex...
  function _APIService_IsOrgNameAvailable_Handler (line 3877) | func _APIService_IsOrgNameAvailable_Handler(srv interface{}, ctx context...
  function _APIService_DestroyAccount_Handler (line 3895) | func _APIService_DestroyAccount_Handler(srv interface{}, ctx context.Con...

FILE: api/hubd/service.go
  type Service (line 43) | type Service struct
    method BuildInfo (line 59) | func (s *Service) BuildInfo(_ context.Context, _ *pb.BuildInfoRequest)...
    method Signup (line 70) | func (s *Service) Signup(ctx context.Context, req *pb.SignupRequest) (...
    method Signin (line 77) | func (s *Service) Signin(ctx context.Context, req *pb.SigninRequest) (...
    method awaitVerification (line 123) | func (s *Service) awaitVerification(secret string) bool {
    method powergateAdminCtx (line 145) | func (s *Service) powergateAdminCtx(ctx context.Context) context.Conte...
    method Signout (line 158) | func (s *Service) Signout(ctx context.Context, _ *pb.SignoutRequest) (...
    method GetSessionInfo (line 171) | func (s *Service) GetSessionInfo(ctx context.Context, _ *pb.GetSession...
    method GetIdentity (line 192) | func (s *Service) GetIdentity(ctx context.Context, _ *pb.GetIdentityRe...
    method CreateKey (line 208) | func (s *Service) CreateKey(ctx context.Context, req *pb.CreateKeyRequ...
    method InvalidateKey (line 273) | func (s *Service) InvalidateKey(ctx context.Context, req *pb.Invalidat...
    method ListKeys (line 294) | func (s *Service) ListKeys(ctx context.Context, _ *pb.ListKeysRequest)...
    method CreateOrg (line 327) | func (s *Service) CreateOrg(ctx context.Context, req *pb.CreateOrgRequ...
    method GetOrg (line 393) | func (s *Service) GetOrg(ctx context.Context, _ *pb.GetOrgRequest) (*p...
    method orgToPbOrg (line 412) | func (s *Service) orgToPbOrg(org *mdb.Account) (*pb.OrgInfo, error) {
    method ListOrgs (line 439) | func (s *Service) ListOrgs(ctx context.Context, _ *pb.ListOrgsRequest)...
    method RemoveOrg (line 463) | func (s *Service) RemoveOrg(ctx context.Context, _ *pb.RemoveOrgReques...
    method InviteToOrg (line 506) | func (s *Service) InviteToOrg(ctx context.Context, req *pb.InviteToOrg...
    method LeaveOrg (line 564) | func (s *Service) LeaveOrg(ctx context.Context, _ *pb.LeaveOrgRequest)...
    method SetupBilling (line 602) | func (s *Service) SetupBilling(ctx context.Context, _ *pb.SetupBilling...
    method GetBillingSession (line 638) | func (s *Service) GetBillingSession(
    method ListBillingUsers (line 658) | func (s *Service) ListBillingUsers(
    method IsUsernameAvailable (line 685) | func (s *Service) IsUsernameAvailable(
    method IsOrgNameAvailable (line 697) | func (s *Service) IsOrgNameAvailable(
    method DestroyAccount (line 713) | func (s *Service) DestroyAccount(ctx context.Context, _ *pb.DestroyAcc...
    method destroyAccount (line 740) | func (s *Service) destroyAccount(ctx context.Context, a *mdb.Account) ...
  function getSessionSecret (line 151) | func getSessionSecret(secret string) string {
  function getAccount (line 828) | func getAccount(ctx context.Context) (*mdb.AccountCtx, error) {
  function keyTypeToPb (line 836) | func keyTypeToPb(t mdb.APIKeyType) (pb.KeyType, error) {

FILE: api/mindexd/client/client.go
  type Client (line 12) | type Client struct
    method Close (line 30) | func (c *Client) Close() error {
    method GetMinerInfo (line 35) | func (c *Client) GetMinerInfo(ctx context.Context, minerAddr string) (...
    method CalculateDealPrice (line 42) | func (c *Client) CalculateDealPrice(ctx context.Context, minersAddr []...
    method QueryIndex (line 53) | func (c *Client) QueryIndex(ctx context.Context, params *pb.QueryIndex...
  function NewClient (line 18) | func NewClient(target string, opts ...grpc.DialOption) (*Client, error) {

FILE: api/mindexd/collector/collector.go
  type Collector (line 18) | type Collector struct
    method Subscribe (line 55) | func (c *Collector) Subscribe() <-chan struct{} {
    method Close (line 66) | func (c *Collector) Close() error {
    method runDaemon (line 79) | func (c *Collector) runDaemon() {
    method notifySubscribers (line 113) | func (c *Collector) notifySubscribers() {
  function New (line 30) | func New(store *store.Store, opts ...Option) (*Collector, error) {

FILE: api/mindexd/collector/config.go
  type config (line 17) | type config struct
  type Option (line 25) | type Option
  function WithRunOnStart (line 29) | func WithRunOnStart(enabled bool) Option {
  function WithFrequency (line 36) | func WithFrequency(freq time.Duration) Option {
  function WithFetchLimit (line 44) | func WithFetchLimit(limit int) Option {
  function WithFetchTimeout (line 52) | func WithFetchTimeout(timeout time.Duration) Option {

FILE: api/mindexd/collector/daemon.go
  method collectTargets (line 16) | func (c *Collector) collectTargets(ctx context.Context) int {
  method collectNewStorageDealRecords (line 61) | func (c *Collector) collectNewStorageDealRecords(ctx context.Context, pc...
  method collectNewRetrievalRecords (line 103) | func (c *Collector) collectNewRetrievalRecords(ctx context.Context, pc *...
  function toStorageDealRecords (line 141) | func toStorageDealRecords(rs []*userPb.StorageDealRecord) []model.PowSto...
  function toRetrievalRecords (line 178) | func toRetrievalRecords(rs []*userPb.RetrievalDealRecord) []model.PowRet...

FILE: api/mindexd/indexer/config.go
  type config (line 14) | type config struct
  type Option (line 21) | type Option
  function WithRunOnStart (line 25) | func WithRunOnStart(enabled bool) Option {
  function WithFrequency (line 33) | func WithFrequency(freq time.Duration) Option {
  function WithSnapshotMaxAge (line 41) | func WithSnapshotMaxAge(age time.Duration) Option {

FILE: api/mindexd/indexer/daemon.go
  method generateIndex (line 17) | func (i *Indexer) generateIndex(ctx context.Context) error {
  method updateOnChainMinersInfo (line 46) | func (i *Indexer) updateOnChainMinersInfo(ctx context.Context, miners []...
  method getActiveMiners (line 77) | func (i *Indexer) getActiveMiners(ctx context.Context) ([]string, error) {
  method updateTextileMinerInfo (line 92) | func (i *Indexer) updateTextileMinerInfo(ctx context.Context) error {

FILE: api/mindexd/indexer/indexer.go
  type Indexer (line 17) | type Indexer struct
    method Close (line 55) | func (i *Indexer) Close() error {
    method runDaemon (line 62) | func (i *Indexer) runDaemon() {
  function New (line 30) | func New(pow *pow.Client, sub <-chan struct{}, powAdminToken string, sto...

FILE: api/mindexd/main.go
  constant daemonName (line 16) | daemonName = "mindexd"
  function init (line 100) | func init() {
  function main (line 184) | func main() {

FILE: api/mindexd/migrations/migrations.go
  function Migrate (line 16) | func Migrate(db *mongo.Database) error {

FILE: api/mindexd/model/index.go
  type MinerInfoSnapshot (line 5) | type MinerInfoSnapshot struct
  type MinerInfo (line 10) | type MinerInfo struct
  type MetadataInfo (line 18) | type MetadataInfo struct
  type FilecoinInfo (line 27) | type FilecoinInfo struct
  type TextileInfo (line 39) | type TextileInfo struct
  type TextileDealsSummary (line 46) | type TextileDealsSummary struct
  type TextileRetrievalSummary (line 53) | type TextileRetrievalSummary struct
  type TextileRegionInfo (line 60) | type TextileRegionInfo struct
  type TextileDealsInfo (line 65) | type TextileDealsInfo struct
  type SealedDurationMins (line 76) | type SealedDurationMins struct
  type TransferMiBPerSec (line 81) | type TransferMiBPerSec struct
  type TextileRetrievalsInfo (line 86) | type TextileRetrievalsInfo struct

FILE: api/mindexd/model/record.go
  type PowTarget (line 10) | type PowTarget struct
    method String (line 17) | func (pt *PowTarget) String() string {
  type StorageDealRecord (line 21) | type StorageDealRecord struct
  type RetrievalRecord (line 29) | type RetrievalRecord struct
  type PowStorageDealRecord (line 37) | type PowStorageDealRecord struct
  type PowStorageDealRecordDealInfo (line 53) | type PowStorageDealRecordDealInfo struct
  type PowRetrievalRecord (line 68) | type PowRetrievalRecord struct
  type PowRetrievalRecordDealInfo (line 81) | type PowRetrievalRecordDealInfo struct

FILE: api/mindexd/pb/mindexd.pb.go
  constant _ (line 26) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 28) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  constant _ (line 33) | _ = proto.ProtoPackageIsVersion4
  type QueryIndexRequestSortField (line 35) | type QueryIndexRequestSortField
    method Enum (line 69) | func (x QueryIndexRequestSortField) Enum() *QueryIndexRequestSortField {
    method String (line 75) | func (x QueryIndexRequestSortField) String() string {
    method Descriptor (line 79) | func (QueryIndexRequestSortField) Descriptor() protoreflect.EnumDescri...
    method Type (line 83) | func (QueryIndexRequestSortField) Type() protoreflect.EnumType {
    method Number (line 87) | func (x QueryIndexRequestSortField) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 92) | func (QueryIndexRequestSortField) EnumDescriptor() ([]byte, []int) {
  constant QueryIndexRequestSortField_TEXTILE_DEALS_TOTAL_SUCCESSFUL (line 38) | QueryIndexRequestSortField_TEXTILE_DEALS_TOTAL_SUCCESSFUL      QueryInde...
  constant QueryIndexRequestSortField_TEXTILE_DEALS_LAST_SUCCESSFUL (line 39) | QueryIndexRequestSortField_TEXTILE_DEALS_LAST_SUCCESSFUL       QueryInde...
  constant QueryIndexRequestSortField_TEXTILE_RETRIEVALS_TOTAL_SUCCESSFUL (line 40) | QueryIndexRequestSortField_TEXTILE_RETRIEVALS_TOTAL_SUCCESSFUL QueryInde...
  constant QueryIndexRequestSortField_TEXTILE_RETRIEVALS_LAST_SUCCESSFUL (line 41) | QueryIndexRequestSortField_TEXTILE_RETRIEVALS_LAST_SUCCESSFUL  QueryInde...
  constant QueryIndexRequestSortField_ASK_PRICE (line 42) | QueryIndexRequestSortField_ASK_PRICE                           QueryInde...
  constant QueryIndexRequestSortField_VERIFIED_ASK_PRICE (line 43) | QueryIndexRequestSortField_VERIFIED_ASK_PRICE                  QueryInde...
  constant QueryIndexRequestSortField_ACTIVE_SECTORS (line 44) | QueryIndexRequestSortField_ACTIVE_SECTORS                      QueryInde...
  type MinerIndexInfo (line 97) | type MinerIndexInfo struct
    method Reset (line 109) | func (x *MinerIndexInfo) Reset() {
    method String (line 118) | func (x *MinerIndexInfo) String() string {
    method ProtoMessage (line 122) | func (*MinerIndexInfo) ProtoMessage() {}
    method ProtoReflect (line 124) | func (x *MinerIndexInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 137) | func (*MinerIndexInfo) Descriptor() ([]byte, []int) {
    method GetMinerAddr (line 141) | func (x *MinerIndexInfo) GetMinerAddr() string {
    method GetMetadata (line 148) | func (x *MinerIndexInfo) GetMetadata() *MetadataInfo {
    method GetFilecoin (line 155) | func (x *MinerIndexInfo) GetFilecoin() *FilecoinInfo {
    method GetTextile (line 162) | func (x *MinerIndexInfo) GetTextile() *TextileInfo {
    method GetUpdatedAt (line 169) | func (x *MinerIndexInfo) GetUpdatedAt() *timestamp.Timestamp {
  type MetadataInfo (line 176) | type MetadataInfo struct
    method Reset (line 184) | func (x *MetadataInfo) Reset() {
    method String (line 193) | func (x *MetadataInfo) String() string {
    method ProtoMessage (line 197) | func (*MetadataInfo) ProtoMessage() {}
    method ProtoReflect (line 199) | func (x *MetadataInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 212) | func (*MetadataInfo) Descriptor() ([]byte, []int) {
    method GetLocation (line 216) | func (x *MetadataInfo) GetLocation() string {
  type FilecoinInfo (line 223) | type FilecoinInfo struct
    method Reset (line 239) | func (x *FilecoinInfo) Reset() {
    method String (line 248) | func (x *FilecoinInfo) String() string {
    method ProtoMessage (line 252) | func (*FilecoinInfo) ProtoMessage() {}
    method ProtoReflect (line 254) | func (x *FilecoinInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 267) | func (*FilecoinInfo) Descriptor() ([]byte, []int) {
    method GetRelativePower (line 271) | func (x *FilecoinInfo) GetRelativePower() float64 {
    method GetAskPrice (line 278) | func (x *FilecoinInfo) GetAskPrice() string {
    method GetAskVerifiedPrice (line 285) | func (x *FilecoinInfo) GetAskVerifiedPrice() string {
    method GetMinPieceSize (line 292) | func (x *FilecoinInfo) GetMinPieceSize() int64 {
    method GetMaxPieceSize (line 299) | func (x *FilecoinInfo) GetMaxPieceSize() int64 {
    method GetSectorSize (line 306) | func (x *FilecoinInfo) GetSectorSize() int64 {
    method GetActiveSectors (line 313) | func (x *FilecoinInfo) GetActiveSectors() int64 {
    method GetFaultySectors (line 320) | func (x *FilecoinInfo) GetFaultySectors() int64 {
    method GetUpdatedAt (line 327) | func (x *FilecoinInfo) GetUpdatedAt() *timestamp.Timestamp {
  type TextileInfo (line 334) | type TextileInfo struct
    method Reset (line 345) | func (x *TextileInfo) Reset() {
    method String (line 354) | func (x *TextileInfo) String() string {
    method ProtoMessage (line 358) | func (*TextileInfo) ProtoMessage() {}
    method ProtoReflect (line 360) | func (x *TextileInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 373) | func (*TextileInfo) Descriptor() ([]byte, []int) {
    method GetRegions (line 377) | func (x *TextileInfo) GetRegions() map[string]*TextileRegionInfo {
    method GetDealsSummary (line 384) | func (x *TextileInfo) GetDealsSummary() *DealsSummary {
    method GetRetrievalsSummary (line 391) | func (x *TextileInfo) GetRetrievalsSummary() *RetrievalsSummary {
    method GetUpdatedAt (line 398) | func (x *TextileInfo) GetUpdatedAt() *timestamp.Timestamp {
  type TextileRegionInfo (line 405) | type TextileRegionInfo struct
    method Reset (line 414) | func (x *TextileRegionInfo) Reset() {
    method String (line 423) | func (x *TextileRegionInfo) String() string {
    method ProtoMessage (line 427) | func (*TextileRegionInfo) ProtoMessage() {}
    method ProtoReflect (line 429) | func (x *TextileRegionInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 442) | func (*TextileRegionInfo) Descriptor() ([]byte, []int) {
    method GetDeals (line 446) | func (x *TextileRegionInfo) GetDeals() *TextileDealsInfo {
    method GetRetrievals (line 453) | func (x *TextileRegionInfo) GetRetrievals() *TextileRetrievalsInfo {
  type DealsSummary (line 460) | type DealsSummary struct
    method Reset (line 471) | func (x *DealsSummary) Reset() {
    method String (line 480) | func (x *DealsSummary) String() string {
    method ProtoMessage (line 484) | func (*DealsSummary) ProtoMessage() {}
    method ProtoReflect (line 486) | func (x *DealsSummary) ProtoReflect() protoreflect.Message {
    method Descriptor (line 499) | func (*DealsSummary) Descriptor() ([]byte, []int) {
    method GetTotal (line 503) | func (x *DealsSummary) GetTotal() int64 {
    method GetLast (line 510) | func (x *DealsSummary) GetLast() *timestamp.Timestamp {
    method GetFailures (line 517) | func (x *DealsSummary) GetFailures() int64 {
    method GetLastFailure (line 524) | func (x *DealsSummary) GetLastFailure() *timestamp.Timestamp {
  type RetrievalsSummary (line 531) | type RetrievalsSummary struct
    method Reset (line 542) | func (x *RetrievalsSummary) Reset() {
    method String (line 551) | func (x *RetrievalsSummary) String() string {
    method ProtoMessage (line 555) | func (*RetrievalsSummary) ProtoMessage() {}
    method ProtoReflect (line 557) | func (x *RetrievalsSummary) ProtoReflect() protoreflect.Message {
    method Descriptor (line 570) | func (*RetrievalsSummary) Descriptor() ([]byte, []int) {
    method GetTotal (line 574) | func (x *RetrievalsSummary) GetTotal() int64 {
    method GetLast (line 581) | func (x *RetrievalsSummary) GetLast() *timestamp.Timestamp {
    method GetFailures (line 588) | func (x *RetrievalsSummary) GetFailures() int64 {
    method GetLastFailure (line 595) | func (x *RetrievalsSummary) GetLastFailure() *timestamp.Timestamp {
  type TextileDealsInfo (line 602) | type TextileDealsInfo struct
    method Reset (line 615) | func (x *TextileDealsInfo) Reset() {
    method String (line 624) | func (x *TextileDealsInfo) String() string {
    method ProtoMessage (line 628) | func (*TextileDealsInfo) ProtoMessage() {}
    method ProtoReflect (line 630) | func (x *TextileDealsInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 643) | func (*TextileDealsInfo) Descriptor() ([]byte, []int) {
    method GetTotal (line 647) | func (x *TextileDealsInfo) GetTotal() int64 {
    method GetLast (line 654) | func (x *TextileDealsInfo) GetLast() *timestamp.Timestamp {
    method GetFailures (line 661) | func (x *TextileDealsInfo) GetFailures() int64 {
    method GetLastFailure (line 668) | func (x *TextileDealsInfo) GetLastFailure() *timestamp.Timestamp {
    method GetTailTransfers (line 675) | func (x *TextileDealsInfo) GetTailTransfers() []*TransferMiBPerSec {
    method GetTailSealed (line 682) | func (x *TextileDealsInfo) GetTailSealed() []*SealedDurationMins {
  type TextileRetrievalsInfo (line 689) | type TextileRetrievalsInfo struct
    method Reset (line 701) | func (x *TextileRetrievalsInfo) Reset() {
    method String (line 710) | func (x *TextileRetrievalsInfo) String() string {
    method ProtoMessage (line 714) | func (*TextileRetrievalsInfo) ProtoMessage() {}
    method ProtoReflect (line 716) | func (x *TextileRetrievalsInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 729) | func (*TextileRetrievalsInfo) Descriptor() ([]byte, []int) {
    method GetTotal (line 733) | func (x *TextileRetrievalsInfo) GetTotal() int64 {
    method GetLast (line 740) | func (x *TextileRetrievalsInfo) GetLast() *timestamp.Timestamp {
    method GetFailures (line 747) | func (x *TextileRetrievalsInfo) GetFailures() int64 {
    method GetLastFailure (line 754) | func (x *TextileRetrievalsInfo) GetLastFailure() *timestamp.Timestamp {
    method GetTailTransfers (line 761) | func (x *TextileRetrievalsInfo) GetTailTransfers() []*TransferMiBPerSec {
  type TransferMiBPerSec (line 768) | type TransferMiBPerSec struct
    method Reset (line 777) | func (x *TransferMiBPerSec) Reset() {
    method String (line 786) | func (x *TransferMiBPerSec) String() string {
    method ProtoMessage (line 790) | func (*TransferMiBPerSec) ProtoMessage() {}
    method ProtoReflect (line 792) | func (x *TransferMiBPerSec) ProtoReflect() protoreflect.Message {
    method Descriptor (line 805) | func (*TransferMiBPerSec) Descriptor() ([]byte, []int) {
    method GetTransferedAt (line 809) | func (x *TransferMiBPerSec) GetTransferedAt() *timestamp.Timestamp {
    method GetMibPerSec (line 816) | func (x *TransferMiBPerSec) GetMibPerSec() float64 {
  type SealedDurationMins (line 823) | type SealedDurationMins struct
    method Reset (line 832) | func (x *SealedDurationMins) Reset() {
    method String (line 841) | func (x *SealedDurationMins) String() string {
    method ProtoMessage (line 845) | func (*SealedDurationMins) ProtoMessage() {}
    method ProtoReflect (line 847) | func (x *SealedDurationMins) ProtoReflect() protoreflect.Message {
    method Descriptor (line 860) | func (*SealedDurationMins) Descriptor() ([]byte, []int) {
    method GetSealedAt (line 864) | func (x *SealedDurationMins) GetSealedAt() *timestamp.Timestamp {
    method GetDurationSeconds (line 871) | func (x *SealedDurationMins) GetDurationSeconds() int64 {
  type GetMinersResponse (line 878) | type GetMinersResponse struct
    method Reset (line 886) | func (x *GetMinersResponse) Reset() {
    method String (line 895) | func (x *GetMinersResponse) String() string {
    method ProtoMessage (line 899) | func (*GetMinersResponse) ProtoMessage() {}
    method ProtoReflect (line 901) | func (x *GetMinersResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 914) | func (*GetMinersResponse) Descriptor() ([]byte, []int) {
    method GetMinerAddress (line 918) | func (x *GetMinersResponse) GetMinerAddress() string {
  type QueryIndexRequest (line 926) | type QueryIndexRequest struct
    method Reset (line 937) | func (x *QueryIndexRequest) Reset() {
    method String (line 946) | func (x *QueryIndexRequest) String() string {
    method ProtoMessage (line 950) | func (*QueryIndexRequest) ProtoMessage() {}
    method ProtoReflect (line 952) | func (x *QueryIndexRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 965) | func (*QueryIndexRequest) Descriptor() ([]byte, []int) {
    method GetFilters (line 969) | func (x *QueryIndexRequest) GetFilters() *QueryIndexRequestFilters {
    method GetSort (line 976) | func (x *QueryIndexRequest) GetSort() *QueryIndexRequestSort {
    method GetLimit (line 983) | func (x *QueryIndexRequest) GetLimit() int32 {
    method GetOffset (line 990) | func (x *QueryIndexRequest) GetOffset() int64 {
  type QueryIndexRequestFilters (line 997) | type QueryIndexRequestFilters struct
    method Reset (line 1005) | func (x *QueryIndexRequestFilters) Reset() {
    method String (line 1014) | func (x *QueryIndexRequestFilters) String() string {
    method ProtoMessage (line 1018) | func (*QueryIndexRequestFilters) ProtoMessage() {}
    method ProtoReflect (line 1020) | func (x *QueryIndexRequestFilters) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1033) | func (*QueryIndexRequestFilters) Descriptor() ([]byte, []int) {
    method GetMinerLocation (line 1037) | func (x *QueryIndexRequestFilters) GetMinerLocation() string {
  type QueryIndexRequestSort (line 1044) | type QueryIndexRequestSort struct
    method Reset (line 1054) | func (x *QueryIndexRequestSort) Reset() {
    method String (line 1063) | func (x *QueryIndexRequestSort) String() string {
    method ProtoMessage (line 1067) | func (*QueryIndexRequestSort) ProtoMessage() {}
    method ProtoReflect (line 1069) | func (x *QueryIndexRequestSort) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1082) | func (*QueryIndexRequestSort) Descriptor() ([]byte, []int) {
    method GetAscending (line 1086) | func (x *QueryIndexRequestSort) GetAscending() bool {
    method GetTextileRegion (line 1093) | func (x *QueryIndexRequestSort) GetTextileRegion() string {
    method GetField (line 1100) | func (x *QueryIndexRequestSort) GetField() QueryIndexRequestSortField {
  type QueryIndexResponse (line 1107) | type QueryIndexResponse struct
    method Reset (line 1115) | func (x *QueryIndexResponse) Reset() {
    method String (line 1124) | func (x *QueryIndexResponse) String() string {
    method ProtoMessage (line 1128) | func (*QueryIndexResponse) ProtoMessage() {}
    method ProtoReflect (line 1130) | func (x *QueryIndexResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1143) | func (*QueryIndexResponse) Descriptor() ([]byte, []int) {
    method GetMiners (line 1147) | func (x *QueryIndexResponse) GetMiners() []*QueryIndexResponseMiner {
  type QueryIndexResponseMiner (line 1154) | type QueryIndexResponseMiner struct
    method Reset (line 1162) | func (x *QueryIndexResponseMiner) Reset() {
    method String (line 1171) | func (x *QueryIndexResponseMiner) String() string {
    method ProtoMessage (line 1175) | func (*QueryIndexResponseMiner) ProtoMessage() {}
    method ProtoReflect (line 1177) | func (x *QueryIndexResponseMiner) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1190) | func (*QueryIndexResponseMiner) Descriptor() ([]byte, []int) {
    method GetMiner (line 1194) | func (x *QueryIndexResponseMiner) GetMiner() *MinerIndexInfo {
  type GetMinerInfoRequest (line 1202) | type GetMinerInfoRequest struct
    method Reset (line 1210) | func (x *GetMinerInfoRequest) Reset() {
    method String (line 1219) | func (x *GetMinerInfoRequest) String() string {
    method ProtoMessage (line 1223) | func (*GetMinerInfoRequest) ProtoMessage() {}
    method ProtoReflect (line 1225) | func (x *GetMinerInfoRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1238) | func (*GetMinerInfoRequest) Descriptor() ([]byte, []int) {
    method GetMinerAddress (line 1242) | func (x *GetMinerInfoRequest) GetMinerAddress() string {
  type GetMinerInfoResponse (line 1249) | type GetMinerInfoResponse struct
    method Reset (line 1257) | func (x *GetMinerInfoResponse) Reset() {
    method String (line 1266) | func (x *GetMinerInfoResponse) String() string {
    method ProtoMessage (line 1270) | func (*GetMinerInfoResponse) ProtoMessage() {}
    method ProtoReflect (line 1272) | func (x *GetMinerInfoResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1285) | func (*GetMinerInfoResponse) Descriptor() ([]byte, []int) {
    method GetInfo (line 1289) | func (x *GetMinerInfoResponse) GetInfo() *MinerIndexInfo {
  type CalculateDealPriceRequest (line 1297) | type CalculateDealPriceRequest struct
    method Reset (line 1307) | func (x *CalculateDealPriceRequest) Reset() {
    method String (line 1316) | func (x *CalculateDealPriceRequest) String() string {
    method ProtoMessage (line 1320) | func (*CalculateDealPriceRequest) ProtoMessage() {}
    method ProtoReflect (line 1322) | func (x *CalculateDealPriceRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1335) | func (*CalculateDealPriceRequest) Descriptor() ([]byte, []int) {
    method GetMinerAddresses (line 1339) | func (x *CalculateDealPriceRequest) GetMinerAddresses() []string {
    method GetDataSizeBytes (line 1346) | func (x *CalculateDealPriceRequest) GetDataSizeBytes() int64 {
    method GetDurationDays (line 1353) | func (x *CalculateDealPriceRequest) GetDurationDays() int64 {
  type CalculateDealPriceResponse (line 1360) | type CalculateDealPriceResponse struct
    method Reset (line 1370) | func (x *CalculateDealPriceResponse) Reset() {
    method String (line 1379) | func (x *CalculateDealPriceResponse) String() string {
    method ProtoMessage (line 1383) | func (*CalculateDealPriceResponse) ProtoMessage() {}
    method ProtoReflect (line 1385) | func (x *CalculateDealPriceResponse) ProtoReflect() protoreflect.Messa...
    method Descriptor (line 1398) | func (*CalculateDealPriceResponse) Descriptor() ([]byte, []int) {
    method GetResults (line 1402) | func (x *CalculateDealPriceResponse) GetResults() []*CalculateDealPric...
    method GetPaddedSize (line 1409) | func (x *CalculateDealPriceResponse) GetPaddedSize() int64 {
    method GetDurationEpochs (line 1416) | func (x *CalculateDealPriceResponse) GetDurationEpochs() int64 {
  type CalculateDealPriceMiner (line 1423) | type CalculateDealPriceMiner struct
    method Reset (line 1435) | func (x *CalculateDealPriceMiner) Reset() {
    method String (line 1444) | func (x *CalculateDealPriceMiner) String() string {
    method ProtoMessage (line 1448) | func (*CalculateDealPriceMiner) ProtoMessage() {}
    method ProtoReflect (line 1450) | func (x *CalculateDealPriceMiner) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1463) | func (*CalculateDealPriceMiner) Descriptor() ([]byte, []int) {
    method GetMiner (line 1467) | func (x *CalculateDealPriceMiner) GetMiner() string {
    method GetTotalCost (line 1474) | func (x *CalculateDealPriceMiner) GetTotalCost() string {
    method GetVerifiedTotalCost (line 1481) | func (x *CalculateDealPriceMiner) GetVerifiedTotalCost() string {
    method GetPrice (line 1488) | func (x *CalculateDealPriceMiner) GetPrice() string {
    method GetVerifiedPrice (line 1495) | func (x *CalculateDealPriceMiner) GetVerifiedPrice() string {
  function file_api_mindexd_pb_mindexd_proto_rawDescGZIP (line 1845) | func file_api_mindexd_pb_mindexd_proto_rawDescGZIP() []byte {
  function init (line 1927) | func init() { file_api_mindexd_pb_mindexd_proto_init() }
  function file_api_mindexd_pb_mindexd_proto_init (line 1928) | func file_api_mindexd_pb_mindexd_proto_init() {
  constant _ (line 2225) | _ = grpc.SupportPackageIsVersion6
  type APIServiceClient (line 2230) | type APIServiceClient interface
  type aPIServiceClient (line 2236) | type aPIServiceClient struct
    method QueryIndex (line 2244) | func (c *aPIServiceClient) QueryIndex(ctx context.Context, in *QueryIn...
    method GetMinerInfo (line 2253) | func (c *aPIServiceClient) GetMinerInfo(ctx context.Context, in *GetMi...
    method CalculateDealPrice (line 2262) | func (c *aPIServiceClient) CalculateDealPrice(ctx context.Context, in ...
  function NewAPIServiceClient (line 2240) | func NewAPIServiceClient(cc grpc.ClientConnInterface) APIServiceClient {
  type APIServiceServer (line 2272) | type APIServiceServer interface
  type UnimplementedAPIServiceServer (line 2279) | type UnimplementedAPIServiceServer struct
    method QueryIndex (line 2282) | func (*UnimplementedAPIServiceServer) QueryIndex(context.Context, *Que...
    method GetMinerInfo (line 2285) | func (*UnimplementedAPIServiceServer) GetMinerInfo(context.Context, *G...
    method CalculateDealPrice (line 2288) | func (*UnimplementedAPIServiceServer) CalculateDealPrice(context.Conte...
  function RegisterAPIServiceServer (line 2292) | func RegisterAPIServiceServer(s *grpc.Server, srv APIServiceServer) {
  function _APIService_QueryIndex_Handler (line 2296) | func _APIService_QueryIndex_Handler(srv interface{}, ctx context.Context...
  function _APIService_GetMinerInfo_Handler (line 2314) | func _APIService_GetMinerInfo_Handler(srv interface{}, ctx context.Conte...
  function _APIService_CalculateDealPrice_Handler (line 2332) | func _APIService_CalculateDealPrice_Handler(srv interface{}, ctx context...

FILE: api/mindexd/pb/mindexd.pb.gw.go
  function request_APIService_QueryIndex_0 (line 38) | func request_APIService_QueryIndex_0(ctx context.Context, marshaler runt...
  function local_request_APIService_QueryIndex_0 (line 54) | func local_request_APIService_QueryIndex_0(ctx context.Context, marshale...
  function request_APIService_GetMinerInfo_0 (line 70) | func request_APIService_GetMinerInfo_0(ctx context.Context, marshaler ru...
  function local_request_APIService_GetMinerInfo_0 (line 96) | func local_request_APIService_GetMinerInfo_0(ctx context.Context, marsha...
  function request_APIService_CalculateDealPrice_0 (line 126) | func request_APIService_CalculateDealPrice_0(ctx context.Context, marsha...
  function local_request_APIService_CalculateDealPrice_0 (line 142) | func local_request_APIService_CalculateDealPrice_0(ctx context.Context, ...
  function RegisterAPIServiceHandlerServer (line 162) | func RegisterAPIServiceHandlerServer(ctx context.Context, mux *runtime.S...
  function RegisterAPIServiceHandlerFromEndpoint (line 238) | func RegisterAPIServiceHandlerFromEndpoint(ctx context.Context, mux *run...
  function RegisterAPIServiceHandler (line 263) | func RegisterAPIServiceHandler(ctx context.Context, mux *runtime.ServeMu...
  function RegisterAPIServiceHandlerClient (line 272) | func RegisterAPIServiceHandlerClient(ctx context.Context, mux *runtime.S...

FILE: api/mindexd/service/cast.go
  function toPbMinerIndexInfo (line 13) | func toPbMinerIndexInfo(mi model.MinerInfo) *pb.MinerIndexInfo {
  function toPbTextileInfo (line 35) | func toPbTextileInfo(t model.TextileInfo) *pb.TextileInfo {
  function toPbTransferMiBPerSec (line 76) | func toPbTransferMiBPerSec(ts []model.TransferMiBPerSec) []*pb.TransferM...
  function toPbSealedDurationMins (line 89) | func toPbSealedDurationMins(ss []model.SealedDurationMins) []*pb.SealedD...
  function fromPbQueryIndexRequestFilters (line 102) | func fromPbQueryIndexRequestFilters(f *pb.QueryIndexRequestFilters) stor...
  function fromPbQueryIndexRequestSort (line 110) | func fromPbQueryIndexRequestSort(s *pb.QueryIndexRequestSort) (store.Que...
  function fromPbQueryIndexRequestSortField (line 126) | func fromPbQueryIndexRequestSortField(field pb.QueryIndexRequestSortFiel...
  function toPbQueryIndexResponse (line 147) | func toPbQueryIndexResponse(ss []model.MinerInfo) *pb.QueryIndexResponse {
  function formatPbTime (line 160) | func formatPbTime(t time.Time) *timestamppb.Timestamp {

FILE: api/mindexd/service/service.go
  constant epochDurationSeconds (line 34) | epochDurationSeconds = 30
  constant queryMaxLimit (line 35) | queryMaxLimit        = 50
  type Service (line 42) | type Service struct
    method Start (line 140) | func (s *Service) Start() error {
    method Stop (line 194) | func (s *Service) Stop() {
    method QueryIndex (line 229) | func (s *Service) QueryIndex(ctx context.Context, req *pb.QueryIndexRe...
    method GetMinerInfo (line 251) | func (s *Service) GetMinerInfo(ctx context.Context, req *pb.GetMinerIn...
    method CalculateDealPrice (line 263) | func (s *Service) CalculateDealPrice(ctx context.Context, req *pb.Calc...
  type Config (line 55) | type Config struct
  function NewService (line 76) | func NewService(ctx context.Context, config Config) (*Service, error) {

FILE: api/mindexd/store/gen.go
  type minerRegion (line 18) | type minerRegion struct
  method UpdateTextileDealsInfo (line 23) | func (s *Store) UpdateTextileDealsInfo(ctx context.Context) error {
  method UpdateTextileRetrievalsInfo (line 38) | func (s *Store) UpdateTextileRetrievalsInfo(ctx context.Context) error {
  type regionalGeneralItem (line 53) | type regionalGeneralItem struct
  method regenerateTextileDealsTailMetrics (line 63) | func (s *Store) regenerateTextileDealsTailMetrics(ctx context.Context, m...
  method regenerateTextileDealsTotalsAndLasts (line 127) | func (s *Store) regenerateTextileDealsTotalsAndLasts(ctx context.Context...
  method regenerateTextileRetrievalsTotalsAndLasts (line 164) | func (s *Store) regenerateTextileRetrievalsTotalsAndLasts(ctx context.Co...
  method regenerateTextileRetrievalsTailMetrics (line 196) | func (s *Store) regenerateTextileRetrievalsTailMetrics(ctx context.Conte...
  type minerSummary (line 248) | type minerSummary struct
  method updateTextileRegionAndSummary (line 256) | func (s *Store) updateTextileRegionAndSummary(ctx context.Context, prefi...

FILE: api/mindexd/store/gen_test.go
  function TestMinerIndexGeneration (line 12) | func TestMinerIndexGeneration(t *testing.T) {

FILE: api/mindexd/store/index_snapshot.go
  method GetLastIndexSnapshotTime (line 14) | func (s *Store) GetLastIndexSnapshotTime(ctx context.Context) (time.Time...
  method GenerateMinerIndexSnapshot (line 35) | func (s *Store) GenerateMinerIndexSnapshot(ctx context.Context) error {

FILE: api/mindexd/store/index_snapshot_test.go
  function TestIndexSnapshot (line 11) | func TestIndexSnapshot(t *testing.T) {

FILE: api/mindexd/store/onchain.go
  method PutFilecoinInfo (line 13) | func (s *Store) PutFilecoinInfo(ctx context.Context, miner string, info ...
  method PutMetadataLocation (line 26) | func (s *Store) PutMetadataLocation(ctx context.Context, miner string, l...

FILE: api/mindexd/store/onchain_test.go
  function TestPutFilecoinInfo (line 11) | func TestPutFilecoinInfo(t *testing.T) {

FILE: api/mindexd/store/query.go
  type QueryIndexSortField (line 18) | type QueryIndexSortField
  constant SortFieldTextileDealTotalSuccessful (line 21) | SortFieldTextileDealTotalSuccessful QueryIndexSortField = iota
  constant SortFieldTextileDealLastSuccessful (line 22) | SortFieldTextileDealLastSuccessful
  constant SortFieldTextileRetrievalTotalSuccessful (line 23) | SortFieldTextileRetrievalTotalSuccessful
  constant SortFieldTextileRetrievalLastSuccessful (line 24) | SortFieldTextileRetrievalLastSuccessful
  constant SortFieldAskPrice (line 25) | SortFieldAskPrice
  constant SortFieldVerifiedAskPrice (line 26) | SortFieldVerifiedAskPrice
  constant SortFieldActiveSectors (line 27) | SortFieldActiveSectors
  type QueryIndexFilters (line 30) | type QueryIndexFilters struct
  type QueryIndexSort (line 34) | type QueryIndexSort struct
  method GetMinerInfo (line 40) | func (s *Store) GetMinerInfo(ctx context.Context, miner string) (model.M...
  method GetAllMiners (line 55) | func (s *Store) GetAllMiners(ctx context.Context) ([]model.MinerInfo, er...
  method QueryIndex (line 70) | func (s *Store) QueryIndex(ctx context.Context, filters QueryIndexFilter...
  function buildMongoFiltersAndSort (line 101) | func buildMongoFiltersAndSort(filters QueryIndexFilters, sort QueryIndex...

FILE: api/mindexd/store/query_test.go
  function TestQuery (line 10) | func TestQuery(t *testing.T) {
  function testPaging (line 42) | func testPaging(s *Store) func(t *testing.T) {
  function testSort (line 76) | func testSort(s *Store) func(t *testing.T) {
  function testDealLastSuccess (line 94) | func testDealLastSuccess(s *Store) func(t *testing.T) {
  function testDealTotalSuccess (line 110) | func testDealTotalSuccess(s *Store) func(t *testing.T) {

FILE: api/mindexd/store/records.go
  method GetPowergateTargets (line 22) | func (s *Store) GetPowergateTargets(ctx context.Context) ([]model.PowTar...
  method GetLastStorageDealRecordUpdatedAt (line 40) | func (s *Store) GetLastStorageDealRecordUpdatedAt(ctx context.Context, p...
  method GetLastRetrievalRecordUpdatedAt (line 72) | func (s *Store) GetLastRetrievalRecordUpdatedAt(ctx context.Context, pow...
  method PersistStorageDealRecords (line 103) | func (s *Store) PersistStorageDealRecords(ctx context.Context, powName, ...
  method PersistRetrievalRecords (line 140) | func (s *Store) PersistRetrievalRecords(ctx context.Context, powName, re...
  method getStorageDealRecord (line 175) | func (s *Store) getStorageDealRecord(ctx context.Context, ID string) (mo...
  method getRetrievalRecord (line 193) | func (s *Store) getRetrievalRecord(ctx context.Context, ID string) (mode...

FILE: api/mindexd/store/records_test.go
  function TestMain (line 16) | func TestMain(m *testing.M) {
  function TestPersistStorageDealRecord (line 23) | func TestPersistStorageDealRecord(t *testing.T) {
  function TestPersistRetrievalRecord (line 57) | func TestPersistRetrievalRecord(t *testing.T) {
  function TestGetLastUpdatedAt (line 94) | func TestGetLastUpdatedAt(t *testing.T) {
  function setup (line 124) | func setup(t *testing.T, ctx context.Context) *mongo.Database {

FILE: api/mindexd/store/store.go
  type Store (line 17) | type Store struct
    method ensureIndexes (line 40) | func (s *Store) ensureIndexes() error {
  function New (line 25) | func New(db *mongo.Database) (*Store, error) {

FILE: api/usersd/client/client.go
  type Client (line 21) | type Client struct
    method Close (line 39) | func (c *Client) Close() error {
    method GetThread (line 44) | func (c *Client) GetThread(ctx context.Context, name string) (*pb.GetT...
    method ListThreads (line 52) | func (c *Client) ListThreads(ctx context.Context) (*pb.ListThreadsResp...
    method SetupMailbox (line 57) | func (c *Client) SetupMailbox(ctx context.Context) (mailbox thread.ID,...
    method SendMessage (line 131) | func (c *Client) SendMessage(ctx context.Context, from thread.Identity...
    method ListInboxMessages (line 170) | func (c *Client) ListInboxMessages(ctx context.Context, opts ...ListOp...
    method ListSentboxMessages (line 202) | func (c *Client) ListSentboxMessages(ctx context.Context, opts ...List...
    method ReadInboxMessage (line 260) | func (c *Client) ReadInboxMessage(ctx context.Context, id string) error {
    method DeleteInboxMessage (line 268) | func (c *Client) DeleteInboxMessage(ctx context.Context, id string) er...
    method DeleteSentboxMessage (line 276) | func (c *Client) DeleteSentboxMessage(ctx context.Context, id string) ...
    method GetUsage (line 284) | func (c *Client) GetUsage(ctx context.Context, opts ...UsageOption) (*...
    method ArchivesLs (line 295) | func (c *Client) ArchivesLs(ctx context.Context) (*pb.ArchivesLsRespon...
    method ArchivesImport (line 301) | func (c *Client) ArchivesImport(ctx context.Context, dataCid cid.Cid, ...
    method ArchiveRetrievalLs (line 311) | func (c *Client) ArchiveRetrievalLs(ctx context.Context) (*pb.ArchiveR...
    method ArchiveRetrievalLogs (line 317) | func (c *Client) ArchiveRetrievalLogs(ctx context.Context, id string, ...
  function NewClient (line 27) | func NewClient(target string, opts ...grpc.DialOption) (*Client, error) {
  type Message (line 68) | type Message struct
    method Open (line 79) | func (m Message) Open(ctx context.Context, id thread.Identity) ([]byte...
    method IsRead (line 84) | func (m Message) IsRead() bool {
    method UnmarshalInstance (line 90) | func (m Message) UnmarshalInstance(data []byte) error {
  function handleMessageList (line 219) | func handleMessageList(list []*pb.Message) ([]Message, error) {
  function messageFromPb (line 231) | func messageFromPb(m *pb.Message) (msg Message, err error) {

FILE: api/usersd/client/client_test.go
  function TestMain (line 31) | func TestMain(m *testing.M) {
  function TestClient_GetThread (line 41) | func TestClient_GetThread(t *testing.T) {
  function TestClient_ListThreads (line 140) | func TestClient_ListThreads(t *testing.T) {
  function TestClient_SetupMailbox (line 243) | func TestClient_SetupMailbox(t *testing.T) {
  function TestClient_SendMessage (line 269) | func TestClient_SendMessage(t *testing.T) {
  function TestClient_ListInboxMessages (line 286) | func TestClient_ListInboxMessages(t *testing.T) {
  function TestClient_ListSentboxMessages (line 372) | func TestClient_ListSentboxMessages(t *testing.T) {
  function TestClient_ReadInboxMessage (line 399) | func TestClient_ReadInboxMessage(t *testing.T) {
  function TestClient_DeleteInboxMessage (line 421) | func TestClient_DeleteInboxMessage(t *testing.T) {
  function TestClient_DeleteSentboxMessage (line 443) | func TestClient_DeleteSentboxMessage(t *testing.T) {
  function TestClient_GetUsage (line 465) | func TestClient_GetUsage(t *testing.T) {
  function TestAccountBuckets (line 490) | func TestAccountBuckets(t *testing.T) {
  function TestUserBuckets (line 525) | func TestUserBuckets(t *testing.T) {
  function setup (line 624) | func setup(t *testing.T, conf *core.Config) (core.Config, *c.Client, *hc...
  function setupWithConf (line 632) | func setupWithConf(t *testing.T, conf core.Config) (core.Config, *c.Clie...
  function setupWithBilling (line 657) | func setupWithBilling(t *testing.T) (core.Config, *c.Client, *hc.Client,...
  function setupUserMail (line 668) | func setupUserMail(t *testing.T, client *c.Client, threads *tc.Client, k...
  function pushPath (line 681) | func pushPath(t *testing.T, ctx context.Context, buckets *bc.Client, key...

FILE: api/usersd/client/options.go
  type listOptions (line 3) | type listOptions struct
  type ListOption (line 10) | type ListOption
  function WithSeek (line 13) | func WithSeek(id string) ListOption {
  function WithLimit (line 20) | func WithLimit(limit int) ListOption {
  function WithAscending (line 27) | func WithAscending(asc bool) ListOption {
  type Status (line 34) | type Status
  constant All (line 38) | All Status = iota
  constant Read (line 40) | Read
  constant Unread (line 42) | Unread
  function WithStatus (line 47) | func WithStatus(s Status) ListOption {
  type usageOptions (line 53) | type usageOptions struct
  type UsageOption (line 57) | type UsageOption
  function WithPubKey (line 60) | func WithPubKey(key string) UsageOption {

FILE: api/usersd/pb/usersd.pb.go
  constant _ (line 24) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 26) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  constant _ (line 31) | _ = proto.ProtoPackageIs
Condensed preview — 247 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,248K chars).
[
  {
    "path": ".bingo/.gitignore",
    "chars": 116,
    "preview": "\n# Ignore everything\n*\n\n# But not these files:\n!.gitignore\n!*.mod\n!README.md\n!Variables.mk\n!variables.env\n\n*tmp.mod\n"
  },
  {
    "path": ".bingo/README.md",
    "chars": 820,
    "preview": "# Project Development Dependencies.\n\nThis is directory which stores Go modules with pinned buildable package that is use"
  },
  {
    "path": ".bingo/Variables.mk",
    "chars": 3559,
    "preview": "# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.\n# All tools a"
  },
  {
    "path": ".bingo/bingo.mod",
    "chars": 128,
    "preview": "module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT\n\ngo 1.16\n\nrequire github.com/bwplotka/bingo"
  },
  {
    "path": ".bingo/buf.mod",
    "chars": 138,
    "preview": "module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT\n\ngo 1.15\n\nrequire github.com/bufbuild/buf v"
  },
  {
    "path": ".bingo/go.mod",
    "chars": 148,
    "preview": "module _ // Fake go.mod auto-created by 'bingo' for go -moddir compatibility with non-Go projects. Commit this file, tog"
  },
  {
    "path": ".bingo/gomplate.mod",
    "chars": 156,
    "preview": "module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT\n\ngo 1.15\n\nrequire github.com/hairyhenderson"
  },
  {
    "path": ".bingo/govvv.mod",
    "chars": 126,
    "preview": "module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT\n\ngo 1.15\n\nrequire github.com/ahmetb/govvv v"
  },
  {
    "path": ".bingo/gox.mod",
    "chars": 127,
    "preview": "module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT\n\ngo 1.15\n\nrequire github.com/mitchellh/gox "
  },
  {
    "path": ".bingo/protoc-gen-buf-breaking.mod",
    "chars": 158,
    "preview": "module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT\n\ngo 1.16\n\nrequire github.com/bufbuild/buf v"
  },
  {
    "path": ".bingo/protoc-gen-buf-lint.mod",
    "chars": 154,
    "preview": "module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT\n\ngo 1.16\n\nrequire github.com/bufbuild/buf v"
  },
  {
    "path": ".bingo/variables.env",
    "chars": 654,
    "preview": "# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.\n# All tools a"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 1876,
    "preview": "name: Build\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n      - master\njobs:\n  buf:\n    name:"
  },
  {
    "path": ".github/workflows/docker.yml",
    "chars": 1556,
    "preview": "name: Docker image master branch\non:\n  push:\n    branches:\n      - master\njobs:\n  docker-build-push:\n    runs-on: ubuntu"
  },
  {
    "path": ".github/workflows/publish-js-libs.yml",
    "chars": 1081,
    "preview": "name: Publish JS Libs\non:\n  release:\n    types: [published]\njobs:\n  publish_js_libs:\n    name: Publish JS libs\n    runs-"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 1124,
    "preview": "name: Release\non:\n  release:\n    types: [created]\njobs:\n  release-platform-builds:\n    name: Release Builds\n    runs-on:"
  },
  {
    "path": ".github/workflows/test.yml",
    "chars": 2517,
    "preview": "name: Test\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n      - master\njobs:\n  api:\n    name: "
  },
  {
    "path": ".gitignore",
    "chars": 430,
    "preview": "# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Test binary, built with `go test -c`\n*.test\n\n# Ou"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3371,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "LICENSE",
    "chars": 1072,
    "preview": "MIT License\n\nCopyright (c) 2018-2020 textile.io\n\nPermission is hereby granted, free of charge, to any person obtaining a"
  },
  {
    "path": "Makefile",
    "chars": 6155,
    "preview": "include .bingo/Variables.mk\n\n.DEFAULT_GOAL=build\n\nTXTL_BUILD_FLAGS?=CGO_ENABLED=0\nTXTL_VERSION?=\"git\"\nGOVVV_FLAGS=$(shel"
  },
  {
    "path": "README.md",
    "chars": 39911,
    "preview": "## DEPRECATION NOTICE: Textile's _hosted_ Hub infrastructure will be taken off-line on January 9th, 2023. At this time, "
  },
  {
    "path": "api/apitest/apitest.go",
    "chars": 7496,
    "preview": "package apitest\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n\t\""
  },
  {
    "path": "api/apitest/docker-compose.yml",
    "chars": 507,
    "preview": "version: \"3\"\nservices:\n  ipfs:\n    image: ipfs/go-ipfs:v0.8.0\n    environment:\n      - IPFS_PROFILE=test\n    ports:\n    "
  },
  {
    "path": "api/billingd/Dockerfile",
    "chars": 2339,
    "preview": "FROM golang:1.16.0-buster\nMAINTAINER Textile <contact@textile.io>\n\n# This is (in large part) copied (with love) from\n# h"
  },
  {
    "path": "api/billingd/Dockerfile.dev",
    "chars": 931,
    "preview": "FROM golang:1.16.0-buster\n\nRUN apt-get update && apt-get install -y \\\n  libssl-dev \\\n  ca-certificates\n\nRUN go get githu"
  },
  {
    "path": "api/billingd/analytics/analytics.go",
    "chars": 2428,
    "preview": "package analytics\n\nimport (\n\t\"time\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\t\"github.com/textileio/go-threads/util\"\n\tmdb \""
  },
  {
    "path": "api/billingd/analytics/events.go",
    "chars": 1166,
    "preview": "package analytics\n\nimport (\n\t\"fmt\"\n)\n\n// Event is a type of usage event\ntype Event int\n\nconst (\n\tSignIn Event = iota\n\tAc"
  },
  {
    "path": "api/billingd/client/client.go",
    "chars": 5302,
    "preview": "package client\n\nimport (\n\t\"context\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\tstripe \"github.com/stripe/stripe-go/v72\"\n\t\"gi"
  },
  {
    "path": "api/billingd/client/client_test.go",
    "chars": 13755,
    "preview": "package client_test\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"math\"\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/libp2p/go-libp2p-"
  },
  {
    "path": "api/billingd/client/options.go",
    "chars": 975,
    "preview": "package client\n\nimport (\n\t\"github.com/textileio/go-threads/core/thread\"\n\tmdb \"github.com/textileio/textile/v2/mongodb\"\n)"
  },
  {
    "path": "api/billingd/common/common.go",
    "chars": 1350,
    "preview": "package common\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\tstripe \"github.com/stripe/stripe-go/v72\"\n)\n\nvar (\n\t// ErrExceedsFreeQuota in"
  },
  {
    "path": "api/billingd/gateway/gateway.go",
    "chars": 5759,
    "preview": "package gateway\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/gin-cont"
  },
  {
    "path": "api/billingd/main.go",
    "chars": 6356,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"time\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\t\"github.com/spf"
  },
  {
    "path": "api/billingd/migrations/migrations.go",
    "chars": 1844,
    "preview": "package migrations\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\tmigrate \"github.com/xakep666/mong"
  },
  {
    "path": "api/billingd/migrations/migrations_test.go",
    "chars": 2028,
    "preview": "package migrations\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/textileio/"
  },
  {
    "path": "api/billingd/pb/billingd.pb.go",
    "chars": 123032,
    "preview": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.23.0\n// \tprotoc        v3.13.0\n// sou"
  },
  {
    "path": "api/billingd/pb/billingd.proto",
    "chars": 4170,
    "preview": "syntax = \"proto3\";\npackage api.billingd.pb;\noption go_package = \"github.com/textileio/textile/v2/api/billingd/pb\";\n\nmess"
  },
  {
    "path": "api/billingd/service/service.go",
    "chars": 33273,
    "preview": "package service\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"net\"\n\t\"net/http\"\n\t\"strings\"\n\t\"time\"\n\n\t\"git"
  },
  {
    "path": "api/bucketsd/client/client.go",
    "chars": 17768,
    "preview": "package client\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic"
  },
  {
    "path": "api/bucketsd/client/client_test.go",
    "chars": 36337,
    "preview": "package client_test\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/rand\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"sort\"\n\t\"strings\"\n\t\"sy"
  },
  {
    "path": "api/bucketsd/client/options.go",
    "chars": 2071,
    "preview": "package client\n\nimport (\n\t\"github.com/ipfs/go-cid\"\n\t\"github.com/ipfs/interface-go-ipfs-core/path\"\n\tpb \"github.com/textil"
  },
  {
    "path": "api/bucketsd/pb/bucketsd.pb.go",
    "chars": 205532,
    "preview": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.23.0\n// \tprotoc        v3.13.0\n// sou"
  },
  {
    "path": "api/bucketsd/pb/bucketsd.proto",
    "chars": 7929,
    "preview": "syntax = \"proto3\";\npackage api.bucketsd.pb;\noption go_package = \"github.com/textileio/textile/v2/api/bucketsd/pb\";\n\nmess"
  },
  {
    "path": "api/bucketsd/pb/javascript/package.json",
    "chars": 673,
    "preview": "{\n  \"name\": \"@textile/buckets-grpc\",\n  \"version\": \"0.0.0\",\n  \"description\": \"A client for interacting with the Textile B"
  },
  {
    "path": "api/bucketsd/service.go",
    "chars": 92798,
    "preview": "package bucketsd\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/rand\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"mat"
  },
  {
    "path": "api/common/common.go",
    "chars": 7316,
    "preview": "package common\n\nimport (\n\t\"context\"\n\t\"crypto/hmac\"\n\t\"crypto/sha256\"\n\t\"time\"\n\n\t\"github.com/grpc-ecosystem/go-grpc-middlew"
  },
  {
    "path": "api/filecoin/client/client.go",
    "chars": 2166,
    "preview": "package client\n\nimport (\n\t\"context\"\n\n\tuserPb \"github.com/textileio/powergate/v2/api/gen/powergate/user/v1\"\n\t\"google.gola"
  },
  {
    "path": "api/hubd/client/client.go",
    "chars": 5374,
    "preview": "package client\n\nimport (\n\t\"context\"\n\n\tpb \"github.com/textileio/textile/v2/api/hubd/pb\"\n\t\"google.golang.org/grpc\"\n)\n\n// C"
  },
  {
    "path": "api/hubd/client/client_test.go",
    "chars": 14601,
    "preview": "package client_test\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\n\t\"github.com/stretchr/t"
  },
  {
    "path": "api/hubd/client/options.go",
    "chars": 435,
    "preview": "package client\n\ntype listOptions struct {\n\toffset int64\n\tlimit  int64\n}\n\ntype ListOption func(*listOptions)\n\n// WithOffs"
  },
  {
    "path": "api/hubd/pb/hubd.pb.go",
    "chars": 139677,
    "preview": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.23.0\n// \tprotoc        v3.13.0\n// sou"
  },
  {
    "path": "api/hubd/pb/hubd.proto",
    "chars": 4490,
    "preview": "syntax = \"proto3\";\npackage api.hubd.pb;\noption go_package = \"github.com/textileio/textile/v2/api/hubd/pb\";\n\nimport \"api/"
  },
  {
    "path": "api/hubd/pb/javascript/package.json",
    "chars": 805,
    "preview": "{\n  \"name\": \"@textile/hub-grpc\",\n  \"version\": \"0.0.0\",\n  \"description\": \"A client for interacting with the Textile Hub g"
  },
  {
    "path": "api/hubd/service.go",
    "chars": 22147,
    "preview": "package hubd\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net/mail\"\n\t\"time\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\tiface \"git"
  },
  {
    "path": "api/mindexd/Dockerfile",
    "chars": 2370,
    "preview": "FROM golang:1.16.0-buster\nMAINTAINER Textile <contact@textile.io>\n\n# This is (in large part) copied (with love) from\n# h"
  },
  {
    "path": "api/mindexd/Dockerfile.dev",
    "chars": 925,
    "preview": "FROM golang:1.16.0-buster\n\nRUN apt-get update && apt-get install -y \\\n  libssl-dev \\\n  ca-certificates\n\nRUN go get githu"
  },
  {
    "path": "api/mindexd/client/client.go",
    "chars": 1546,
    "preview": "package client\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/textileio/textile/v2/api/mindexd/pb\"\n\t\"google.golang.org/grpc\"\n"
  },
  {
    "path": "api/mindexd/collector/collector.go",
    "chars": 2504,
    "preview": "package collector\n\nimport (\n\t\"context\"\n\t\"sync\"\n\t\"time\"\n\n\tlogger \"github.com/ipfs/go-log/v2\"\n\t\"github.com/textileio/texti"
  },
  {
    "path": "api/mindexd/collector/config.go",
    "chars": 1148,
    "preview": "package collector\n\nimport (\n\t\"time\"\n)\n\nvar (\n\tdefaultConfig = config{\n\t\tdaemonRunOnStart: false,\n\t\tdaemonFrequency:  60 "
  },
  {
    "path": "api/mindexd/collector/daemon.go",
    "chars": 6088,
    "preview": "package collector\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"sort\"\n\t\"sync\"\n\t\"time\"\n\n\tpow \"github.com/textileio/powergate/v2/api/clien"
  },
  {
    "path": "api/mindexd/indexer/config.go",
    "chars": 925,
    "preview": "package indexer\n\nimport (\n\t\"time\"\n)\n\nvar (\n\tdefaultConfig = config{\n\t\tdaemonRunOnStart: false,\n\t\tdaemonFrequency:  60 * "
  },
  {
    "path": "api/mindexd/indexer/daemon.go",
    "chars": 2989,
    "preview": "package indexer\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\tpowc \"github.com/textileio/powergate/v2/api/client\"\n\tpowAdmin \"git"
  },
  {
    "path": "api/mindexd/indexer/indexer.go",
    "chars": 2537,
    "preview": "package indexer\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\tlogger \"github.com/ipfs/go-log/v2\"\n\tpow \"github.com/textileio/powergate/v"
  },
  {
    "path": "api/mindexd/main.go",
    "chars": 7126,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"time\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\t\"github.com/spf13/cobr"
  },
  {
    "path": "api/mindexd/migrations/migrations.go",
    "chars": 357,
    "preview": "package migrations\n\nimport (\n\t\"time\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\tmigrate \"github.com/xakep666/mongo-migrate\"\n"
  },
  {
    "path": "api/mindexd/model/index.go",
    "chars": 2839,
    "preview": "package model\n\nimport \"time\"\n\ntype MinerInfoSnapshot struct {\n\tCreatedAt time.Time `bson:\"created_at\"`\n\tMinerInfo MinerI"
  },
  {
    "path": "api/mindexd/model/record.go",
    "chars": 3472,
    "preview": "package model\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\n// PowTarget describes a Powergate instance to\n// collect deal/retrieval recor"
  },
  {
    "path": "api/mindexd/pb/google/api/annotations.proto",
    "chars": 1066,
    "preview": "// Copyright (c) 2015, Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not "
  },
  {
    "path": "api/mindexd/pb/google/api/field_behavior.proto",
    "chars": 3319,
    "preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
  },
  {
    "path": "api/mindexd/pb/google/api/http.proto",
    "chars": 15140,
    "preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
  },
  {
    "path": "api/mindexd/pb/google/api/httpbody.proto",
    "chars": 2671,
    "preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
  },
  {
    "path": "api/mindexd/pb/mindexd.pb.go",
    "chars": 94795,
    "preview": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.23.0\n// \tprotoc        v3.13.0\n// sou"
  },
  {
    "path": "api/mindexd/pb/mindexd.pb.gw.go",
    "chars": 14204,
    "preview": "// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.\n// source: api/mindexd/pb/mindexd.proto\n\n/*\nPackage pb is a r"
  },
  {
    "path": "api/mindexd/pb/mindexd.proto",
    "chars": 5803,
    "preview": "syntax = \"proto3\";\npackage api.mindexd.pb;\noption go_package = \"github.com/textileio/textile/v2/api/mindexd/pb\";\n\nimport"
  },
  {
    "path": "api/mindexd/pb/mindexd.swagger.json",
    "chars": 13229,
    "preview": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"title\": \"Textile Miner Index\",\n    \"version\": \"1.0\",\n    \"contact\": {\n      \"name"
  },
  {
    "path": "api/mindexd/pb/protoc-gen-openapiv2/options/annotations.proto",
    "chars": 1775,
    "preview": "syntax = \"proto3\";\n\npackage grpc.gateway.protoc_gen_openapiv2.options;\n\noption go_package = \"github.com/grpc-ecosystem/g"
  },
  {
    "path": "api/mindexd/pb/protoc-gen-openapiv2/options/openapiv2.proto",
    "chars": 24778,
    "preview": "syntax = \"proto3\";\n\npackage grpc.gateway.protoc_gen_openapiv2.options;\n\noption go_package = \"github.com/grpc-ecosystem/g"
  },
  {
    "path": "api/mindexd/service/cast.go",
    "chars": 5196,
    "preview": "package service\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/textileio/textile/v2/api/mindexd/model\"\n\t\"github.com/textileio/te"
  },
  {
    "path": "api/mindexd/service/service.go",
    "chars": 8798,
    "preview": "package service\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"math\"\n\t\"math/big\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"git"
  },
  {
    "path": "api/mindexd/store/gen.go",
    "chars": 9366,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/textileio/textile/v2/api/mindexd/model\"\n\t\"go.mongodb.org"
  },
  {
    "path": "api/mindexd/store/gen_test.go",
    "chars": 15757,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/textileio/tex"
  },
  {
    "path": "api/mindexd/store/index_snapshot.go",
    "chars": 1383,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/textileio/textile/v2/api/mindexd/model\"\n\t\"go.mongodb.org"
  },
  {
    "path": "api/mindexd/store/index_snapshot_test.go",
    "chars": 1530,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestIndexSnapshot("
  },
  {
    "path": "api/mindexd/store/onchain.go",
    "chars": 977,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/textileio/textile/v2/api/mindexd/model\"\n\t\"go.mongodb.org"
  },
  {
    "path": "api/mindexd/store/onchain_test.go",
    "chars": 1915,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/textileio/textile/v2/"
  },
  {
    "path": "api/mindexd/store/query.go",
    "chars": 4115,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/textileio/textile/v2/api/mindexd/model\"\n\t\"go.mongodb.o"
  },
  {
    "path": "api/mindexd/store/query_test.go",
    "chars": 3978,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestQuery(t *testing.T) {\n"
  },
  {
    "path": "api/mindexd/store/records.go",
    "chars": 6932,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/textileio/textile/v2/api/mindexd/model\"\n\t\"go.m"
  },
  {
    "path": "api/mindexd/store/records_test.go",
    "chars": 6965,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/require\"\n\t\"github.com/textile"
  },
  {
    "path": "api/mindexd/store/store.go",
    "chars": 3591,
    "preview": "package store\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\tlogger \"github.com/ipfs/go-log/v2\"\n\t\"go.mongodb.org/mongo-driver/bso"
  },
  {
    "path": "api/usersd/client/client.go",
    "chars": 9051,
    "preview": "package client\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/gogo/status\"\n"
  },
  {
    "path": "api/usersd/client/client_test.go",
    "chars": 23336,
    "preview": "package client_test\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"os\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/libp2p/go-libp2p-core/cry"
  },
  {
    "path": "api/usersd/client/options.go",
    "chars": 1233,
    "preview": "package client\n\ntype listOptions struct {\n\tseek      string\n\tlimit     int\n\tascending bool\n\tstatus    Status\n}\n\ntype Lis"
  },
  {
    "path": "api/usersd/pb/javascript/package.json",
    "chars": 825,
    "preview": "{\n  \"name\": \"@textile/users-grpc\",\n  \"version\": \"0.0.0\",\n  \"description\": \"A client for interacting with the Textile Use"
  },
  {
    "path": "api/usersd/pb/usersd.pb.go",
    "chars": 120871,
    "preview": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.23.0\n// \tprotoc        v3.13.0\n// sou"
  },
  {
    "path": "api/usersd/pb/usersd.proto",
    "chars": 4454,
    "preview": "syntax = \"proto3\";\npackage api.usersd.pb;\noption go_package = \"github.com/textileio/textile/v2/api/usersd/pb\";\n\nimport \""
  },
  {
    "path": "api/usersd/service.go",
    "chars": 17129,
    "preview": "package usersd\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"time\"\n\n\tlogging \"github.com/ipf"
  },
  {
    "path": "buckets/archive/events.go",
    "chars": 440,
    "preview": "package archive\n\ntype TrackedJobType int\n\nconst (\n\tTrackedJobTypeArchive TrackedJobType = iota\n\tTrackedJobTypeRetrieval\n"
  },
  {
    "path": "buckets/archive/retrieval/retrieval.go",
    "chars": 18756,
    "preview": "package retrieval\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/gogo/status\"\n\t\"g"
  },
  {
    "path": "buckets/archive/tracker/tracker.go",
    "chars": 14931,
    "preview": "package tracker\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/filecoin-project/go-fil-markets/sto"
  },
  {
    "path": "buckets/buckets.go",
    "chars": 3537,
    "preview": "package buckets\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/textileio/go-threads/core/thread\"\n\tpb \"gi"
  },
  {
    "path": "buckets/local/access.go",
    "chars": 1950,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/textileio/go-threads/core/thread\"\n\t\"github.com/"
  },
  {
    "path": "buckets/local/add.go",
    "chars": 5288,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/ipfs/go-cid\"\n\t\"github.com/ipfs"
  },
  {
    "path": "buckets/local/archive.go",
    "chars": 8046,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\tpowPb \"github.com/textileio/powergate/v2/api/gen/powergate/user/v"
  },
  {
    "path": "buckets/local/bucket.go",
    "chars": 11998,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.co"
  },
  {
    "path": "buckets/local/bucket_test.go",
    "chars": 16870,
    "preview": "package local_test\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/rand\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\""
  },
  {
    "path": "buckets/local/buckets.go",
    "chars": 9529,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/ipfs/go-cid\"\n\t\"github.com/spf13/cobra\""
  },
  {
    "path": "buckets/local/buckets_test.go",
    "chars": 9047,
    "preview": "package local_test\n\nimport (\n\t\"context\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\tipfsfiles \"gith"
  },
  {
    "path": "buckets/local/crypto.go",
    "chars": 3892,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/textileio/dcrypto\"\n)\n\n// EncryptLocalPath encrypts t"
  },
  {
    "path": "buckets/local/diff.go",
    "chars": 2799,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\tdu \"github.com/ipfs/go-merkledag/dagut"
  },
  {
    "path": "buckets/local/list.go",
    "chars": 1970,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"path/filepath\"\n\n\t\"github.com/ipfs/go-cid\"\n\tpb \"github.com/textilei"
  },
  {
    "path": "buckets/local/options.go",
    "chars": 4398,
    "preview": "package local\n\nimport (\n\tcid \"github.com/ipfs/go-cid\"\n)\n\ntype newOptions struct {\n\tname     string\n\tprivate  bool\n\tfromC"
  },
  {
    "path": "buckets/local/pull.go",
    "chars": 8054,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\n\tcid \"github.com/ipfs/go-cid\"\n\td"
  },
  {
    "path": "buckets/local/push.go",
    "chars": 4749,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\tdu \"github.com/ipfs/go-merkledag/daguti"
  },
  {
    "path": "buckets/local/repo.go",
    "chars": 14953,
    "preview": "package local\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/gob\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"stri"
  },
  {
    "path": "buckets/local/repo_test.go",
    "chars": 7940,
    "preview": "package local_test\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"testing\"\n\n\t\"github.co"
  },
  {
    "path": "buckets/local/testdata/a/bar.txt",
    "chars": 506,
    "preview": "Astonishment across the centuries the sky calls to us with pretty stories for which there's little good evidence courage"
  },
  {
    "path": "buckets/local/testdata/a/foo.txt",
    "chars": 546,
    "preview": "Radio telescope with pretty stories for which there's little good evidence the sky calls to us something incredible is w"
  },
  {
    "path": "buckets/local/testdata/a/one/baz.txt",
    "chars": 425,
    "preview": "Orion's sword great turbulent clouds brain is the seed of intelligence made in the interiors of collapsing stars cosmos "
  },
  {
    "path": "buckets/local/testdata/a/one/buz.txt",
    "chars": 648,
    "preview": "Extraplanetary as a patch of light encyclopaedia galactica cosmos the ash of stellar alchemy quasar. Intelligent beings "
  },
  {
    "path": "buckets/local/testdata/a/one/two/boo.txt",
    "chars": 584,
    "preview": "Billions upon billions something incredible is waiting to be known star stuff harvesting star light Sea of Tranquility o"
  },
  {
    "path": "buckets/local/testdata/a/one/two/fuz.txt",
    "chars": 547,
    "preview": "Shores of the cosmic ocean extraordinary claims require extraordinary evidence cosmic ocean as a patch of light the only"
  },
  {
    "path": "buckets/local/testdata/b/foo.txt",
    "chars": 560,
    "preview": "Laws of physics prime number the carbon in our apple pies dream of the mind's eye emerged into consciousness finite but "
  },
  {
    "path": "buckets/local/testdata/b/one/baz.txt",
    "chars": 425,
    "preview": "Orion's sword great turbulent clouds brain is the seed of intelligence made in the interiors of collapsing stars cosmos "
  },
  {
    "path": "buckets/local/testdata/b/one/muz.txt",
    "chars": 648,
    "preview": "Extraplanetary as a patch of light encyclopaedia galactica cosmos the ash of stellar alchemy quasar. Intelligent beings "
  },
  {
    "path": "buckets/local/testdata/b/one/three/far.txt",
    "chars": 550,
    "preview": "Decipherment take root and flourish white dwarf Hypatia something incredible is waiting to be known concept of the numbe"
  },
  {
    "path": "buckets/local/testdata/b/one/two/fuz.txt",
    "chars": 547,
    "preview": "Shores of the cosmic ocean extraordinary claims require extraordinary evidence cosmic ocean as a patch of light the only"
  },
  {
    "path": "buckets/local/watch.go",
    "chars": 3898,
    "preview": "package local\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"time\"\n\n\t\"github.com/radovskyb/watcher\"\n\t\"github.com/textileio/go-threads/"
  },
  {
    "path": "buf.yaml",
    "chars": 461,
    "preview": "version: v1beta1\nbuild:\n  roots:\n    - .\n  excludes:\n    - api/bucketsd/pb/javascript\n    - api/hubd/pb/javascript\n    -"
  },
  {
    "path": "buildinfo/buildinfo.go",
    "chars": 699,
    "preview": "package buildinfo\n\nimport \"fmt\"\n\nvar (\n\t// GitCommit is set by govvv at build time.\n\tGitCommit = \"\"\n\t// GitBranch  is se"
  },
  {
    "path": "buildtools/install_protoc.bash",
    "chars": 570,
    "preview": "#!/bin/bash\nset -eo pipefail\n\nif [ ! -d ./protoc ]; then\n\tOS=$(uname)\n\tif [ $OS = \"Darwin\" ]; then\n\t\tOS=\"osx\"\n\tfi\n\tVERSI"
  },
  {
    "path": "cmd/buck/cli/add.go",
    "chars": 1802,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\n\t\"github.com/ipfs/go-cid\"\n\t\"github.com/manifoldco/promptui\"\n\t\"github.com/spf13/cobra\"\n"
  },
  {
    "path": "cmd/buck/cli/archive.go",
    "chars": 11909,
    "preview": "package cli\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/big\"\n\t\"os\"\n\n\t\"github.com/manifoldco/promp"
  },
  {
    "path": "cmd/buck/cli/cli.go",
    "chars": 12399,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"runtime\"\n\t\"strconv\"\n\n\taurora2 \"github.com/logrusorgru/aurora\"\n\t\"github.com/mani"
  },
  {
    "path": "cmd/buck/cli/init.go",
    "chars": 5977,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\n\tcid \"github.com/ipfs/go-cid\"\n\t\"github.com/manifoldco/promptui\"\n\t\"git"
  },
  {
    "path": "cmd/buck/cli/pull.go",
    "chars": 1618,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/textileio/textile/v2/buckets/local\"\n\t"
  },
  {
    "path": "cmd/buck/cli/push.go",
    "chars": 1759,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/textileio/textile/v2/bucke"
  },
  {
    "path": "cmd/buck/cli/remote.go",
    "chars": 4010,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\tdu \"github.com/ipfs/go-merkledag/"
  },
  {
    "path": "cmd/buck/cli/roles.go",
    "chars": 3295,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/manifoldco/promptui\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/textil"
  },
  {
    "path": "cmd/buck/cli/util.go",
    "chars": 2723,
    "preview": "package cli\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\n\tpb \"github.com/cheggaaa/pb/v3\"\n\t\"github.com/manifoldco/promptui\"\n\t\"githu"
  },
  {
    "path": "cmd/buck/cli/watch.go",
    "chars": 1468,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/textileio/textile/v2/buckets/local"
  },
  {
    "path": "cmd/buck/main.go",
    "chars": 1046,
    "preview": "package main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\t\"github.com/textileio/textile/v2/buckets/local\"\n\t\"github.com/textileio"
  },
  {
    "path": "cmd/buckd/Dockerfile",
    "chars": 2607,
    "preview": "FROM golang:1.16.0-buster\nMAINTAINER Textile <contact@textile.io>\n\n# This is (in large part) copied (with love) from\n# h"
  },
  {
    "path": "cmd/buckd/Dockerfile.dev",
    "chars": 896,
    "preview": "FROM golang:1.16.0-buster\n\nRUN apt-get update\n\nRUN go get github.com/go-delve/delve/cmd/dlv\n\nENV SRC_DIR /textile\n\nCOPY "
  },
  {
    "path": "cmd/buckd/docker-compose-dev.yml",
    "chars": 1698,
    "preview": "version: \"3\"\nservices:\n  buckets:\n    build:\n      context: ../../\n      dockerfile: ./cmd/buckd/Dockerfile.dev\n    volu"
  },
  {
    "path": "cmd/buckd/docker-compose.yml",
    "chars": 1518,
    "preview": "version: \"3\"\nservices:\n  buckets:\n    image: textile/textile:buckets\n    restart: always\n    volumes:\n      - \"${REPO_PA"
  },
  {
    "path": "cmd/buckd/main.go",
    "chars": 9749,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\t\"github.com/s"
  },
  {
    "path": "cmd/cmd.go",
    "chars": 6841,
    "preview": "package cmd\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/manifoldco/promptui\"\n\t\"github.com"
  },
  {
    "path": "cmd/config.go",
    "chars": 4341,
    "preview": "package cmd\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/mitchellh/go-homedir\"\n\tma \"github.com/multi"
  },
  {
    "path": "cmd/hub/cli/archives.go",
    "chars": 1936,
    "preview": "package cli\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/ipfs/go-cid\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/textileio/"
  },
  {
    "path": "cmd/hub/cli/billing.go",
    "chars": 5629,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math\"\n\t\"sort\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/texti"
  },
  {
    "path": "cmd/hub/cli/buck.go",
    "chars": 272,
    "preview": "package cli\n\nimport (\n\t\"github.com/spf13/cobra\"\n)\n\nvar bucketCmd = &cobra.Command{\n\tUse: \"buck\",\n\tAliases: []string{\n\t\t\""
  },
  {
    "path": "cmd/hub/cli/cli.go",
    "chars": 4268,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"runtime\"\n\t\"strings\"\n\t\"time\"\n\n\taurora2 \"github.com/logrusorgru/aurora\"\n\t\"github"
  },
  {
    "path": "cmd/hub/cli/destroy.go",
    "chars": 1159,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/manifoldco/promptui\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/"
  },
  {
    "path": "cmd/hub/cli/fil.go",
    "chars": 7730,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\n\t\"github.com/spf13/cobra\"\n\tuserPb \"github.com/textileio/powergate/v2/a"
  },
  {
    "path": "cmd/hub/cli/fil_index.go",
    "chars": 16117,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/dustin/go-humanize\"\n\tcco"
  },
  {
    "path": "cmd/hub/cli/init.go",
    "chars": 1913,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/mail\"\n\t\"strings\"\n\n\t\"github.com/caarlos0/spin\"\n\t\"github.com/manifoldco/prom"
  },
  {
    "path": "cmd/hub/cli/keys.go",
    "chars": 5069,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strconv\"\n\n\t\"github.com/manifoldco/promptui\"\n\t\"github.com/spf13/cobra\"\n\tpb \"git"
  },
  {
    "path": "cmd/hub/cli/login.go",
    "chars": 1117,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/caarlos0/spin\"\n\t\"github.com/manifoldco/promptui\"\n\t\"github.com/spf1"
  },
  {
    "path": "cmd/hub/cli/logout.go",
    "chars": 523,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/textileio/textile/v2/cmd\"\n)\n\nvar logoutCm"
  },
  {
    "path": "cmd/hub/cli/orgs.go",
    "chars": 7191,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/mail\"\n\t\"strconv\"\n\n\t\"github.com/manifoldco/promptui\"\n\tmbase \"github.com/mul"
  },
  {
    "path": "cmd/hub/cli/retrievals.go",
    "chars": 2638,
    "preview": "package cli\n\nimport (\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/textileio/textile/v2/api/usersd"
  },
  {
    "path": "cmd/hub/cli/threads.go",
    "chars": 936,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/textileio/textile/v2/cmd\"\n)\n\nvar threadsCmd = &"
  },
  {
    "path": "cmd/hub/cli/update.go",
    "chars": 1513,
    "preview": "package cli\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/blang/semver\"\n\t\"github.com/caarlos0/spin\"\n\tsu \"github.com/rhysd/go-gith"
  },
  {
    "path": "cmd/hub/cli/version.go",
    "chars": 2305,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"runtime\"\n\n\t\"github.com/blang/semver\"\n\t\"github.com/caarlos0/spin\"\n\tsu \"github.c"
  },
  {
    "path": "cmd/hub/cli/whoami.go",
    "chars": 710,
    "preview": "package cli\n\nimport (\n\t\"context\"\n\n\tmbase \"github.com/multiformats/go-multibase\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/t"
  },
  {
    "path": "cmd/hub/main.go",
    "chars": 3321,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/libp2p/go-libp2p-core/crypto\""
  },
  {
    "path": "cmd/hubd/Dockerfile",
    "chars": 2603,
    "preview": "FROM golang:1.16.0-buster\nMAINTAINER Textile <contact@textile.io>\n\n# This is (in large part) copied (with love) from\n# h"
  },
  {
    "path": "cmd/hubd/Dockerfile.dev",
    "chars": 891,
    "preview": "FROM golang:1.16.0-buster\n\nRUN apt-get update\n\nRUN go get github.com/go-delve/delve/cmd/dlv\n\nENV SRC_DIR /textile\n\nCOPY "
  },
  {
    "path": "cmd/hubd/docker-compose-dev.yml",
    "chars": 2647,
    "preview": "version: \"3\"\nservices:\n  textile:\n    build:\n      context: ../../\n      dockerfile: ./cmd/hubd/Dockerfile.dev\n    volum"
  },
  {
    "path": "cmd/hubd/docker-compose.yml",
    "chars": 2266,
    "preview": "version: \"3\"\nservices:\n  textile:\n    image: textile/textile:latest\n    restart: always\n    volumes:\n      - \"${REPO_PAT"
  },
  {
    "path": "cmd/hubd/main.go",
    "chars": 15009,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"time\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\t\"gith"
  },
  {
    "path": "cmd/output.go",
    "chars": 4199,
    "preview": "package cmd\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/signal\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\tlogging \"githu"
  },
  {
    "path": "cmd/watch.go",
    "chars": 2451,
    "preview": "package cmd\n\nimport (\n\t\"context\"\n\t\"strings\"\n\t\"time\"\n\n\tbackoff \"github.com/cenkalti/backoff/v4\"\n\t\"google.golang.org/grpc/"
  },
  {
    "path": "core/auth_interceptor.go",
    "chars": 5288,
    "preview": "package core\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"time\"\n\n\t\"github.com/golang-jwt/jwt\"\n\t\"github.com/textileio/go-threads/core"
  },
  {
    "path": "core/core.go",
    "chars": 18499,
    "preview": "package core\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"time\"\n\n\tgrpcm \"github.com/grpc-ecosystem/go-grpc"
  },
  {
    "path": "core/options.go",
    "chars": 427,
    "preview": "package core\n\ntype Options struct {\n\tThreadsBadgerRepoPath string\n\tThreadsMongoUri       string\n\tThreadsMongoDB        s"
  },
  {
    "path": "core/pow_interceptor.go",
    "chars": 3581,
    "preview": "package core\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/golang/protobuf/proto\"\n\t\"github.com/jhump/protoreflect"
  },
  {
    "path": "core/stats_handler.go",
    "chars": 4891,
    "preview": "package core\n\nimport (\n\t\"context\"\n\t\"time\"\n\n\ttpb \"github.com/textileio/go-threads/api/pb\"\n\t\"github.com/textileio/go-threa"
  },
  {
    "path": "core/thread_interceptor.go",
    "chars": 7451,
    "preview": "package core\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\tma \"github.com/multiformats/go-multiaddr\"\n\tdbpb \"github.com/textileio/go-t"
  },
  {
    "path": "core/thread_interceptor_test.go",
    "chars": 6104,
    "preview": "package core_test\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/ipfs/go-cid\"\n\tcbornode \"github.com/"
  },
  {
    "path": "core/usage_interceptor.go",
    "chars": 9445,
    "preview": "package core\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"strings\"\n\t\"time\"\n\n\tgrpcm \"github.com/grpc-ecosystem/go-grpc"
  },
  {
    "path": "dist/install.tmpl",
    "chars": 1014,
    "preview": "#!/usr/bin/env bash\nset -Eeuo pipefail\n\n# From https://github.com/ipfs/go-ipfs/blob/ccef991a194beaedf009b1d0702b1150db3d"
  },
  {
    "path": "dns/dns.go",
    "chars": 3059,
    "preview": "package dns\n\nimport (\n\t\"fmt\"\n\n\tcf \"github.com/cloudflare/cloudflare-go\"\n\tlogging \"github.com/ipfs/go-log/v2\"\n\t\"github.co"
  },
  {
    "path": "email/email.go",
    "chars": 2153,
    "preview": "package email\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\tcio \"github.com/customerio/go-customerio\"\n\tlogging \"github.com/ipfs/go-log/v"
  },
  {
    "path": "gateway/Makefile",
    "chars": 196,
    "preview": "ASSET_DIRS = $(shell find ./public/ -type d)\nASSET_FILES = $(shell find ./public/ -type f -name '*')\n\nassets.go: ./publi"
  },
  {
    "path": "gateway/assets.go",
    "chars": 5056131,
    "preview": "package gateway\n\nimport (\n\t\"time\"\n\n\t\"github.com/textileio/go-assets\"\n)\n\nvar _Assetsd049223eb2ab91ac66001a116d54e31249bb6"
  },
  {
    "path": "gateway/buckets.go",
    "chars": 8054,
    "preview": "package gateway\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"path\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/gin-go"
  },
  {
    "path": "gateway/gateway.go",
    "chars": 14233,
    "preview": "package gateway\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\t\""
  },
  {
    "path": "gateway/ipfs.go",
    "chars": 5311,
    "preview": "package gateway\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\tgopath \"path\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"git"
  },
  {
    "path": "gateway/public/css/style.css",
    "chars": 1146,
    "preview": "html {\n    box-sizing: border-box;\n    margin: 0;\n    padding: 0;\n    height: 100%;\n}\n\n*, *:before, *:after {\n    box-si"
  },
  {
    "path": "gateway/public/html/404.gohtml",
    "chars": 257,
    "preview": "{{template \"header\" \"404 Not Found\"}}\n<div class=\"aligner\">\n    <div class=\"aligner-item\">\n        <i class=\"fas fa-sad-"
  },
  {
    "path": "gateway/public/html/confirm.gohtml",
    "chars": 319,
    "preview": "{{template \"header\" \"Email Address Confirmed\"}}\n<div class=\"aligner\">\n    <div class=\"aligner-item\">\n        <i class=\"f"
  },
  {
    "path": "gateway/public/html/consent.gohtml",
    "chars": 573,
    "preview": "{{template \"header\" \"Invite Accepted\"}}\n<div class=\"aligner\">\n    <div class=\"aligner-item\">\n        <i class=\"fas fa-la"
  },
  {
    "path": "gateway/public/html/error.gohtml",
    "chars": 256,
    "preview": "{{template \"header\" \"Oops!\"}}\n<div class=\"aligner\">\n    <div class=\"aligner-item\">\n        <i class=\"fas fa-grimace icon"
  },
  {
    "path": "gateway/public/html/index.gohtml",
    "chars": 857,
    "preview": "{{define \"header\"}}\n<!doctype html>\n    <html lang=\"en\">\n        <head>\n            <meta charset=\"utf-8\">\n            <"
  },
  {
    "path": "gateway/public/html/unixfs.gohtml",
    "chars": 462,
    "preview": "{{template \"header\" .Title}}\n<div class=\"title\">\n    {{ if ne .Root \"\" }}<span class=\"yellow\">{{.Root}}:</span> {{ end }"
  },
  {
    "path": "gateway/public/img/site.webmanifest",
    "chars": 263,
    "preview": "{\"name\":\"\",\"short_name\":\"\",\"icons\":[{\"src\":\"/android-chrome-192x192.png\",\"sizes\":\"192x192\",\"type\":\"image/png\"},{\"src\":\"/"
  },
  {
    "path": "gateway/threads.go",
    "chars": 2803,
    "preview": "package gateway\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"strings\"\n\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/textileio/g"
  }
]

// ... and 47 more files (download for full content)

About this extraction

This page contains the full source code of the textileio/textile GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 247 files (6.9 MB), approximately 1.8M tokens, and a symbol index with 3439 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!