Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name: Linting
on:
push:
branches: [ develop* ]
branches: [develop*]
pull_request:
branches: [ develop*,main ]
branches: [develop*, main]

permissions:
contents: read
Expand All @@ -14,8 +14,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [ 1.21.x ]
os: [ ubuntu-latest ]
go-version: [1.21.x]
os: [ubuntu-latest]
name: lint
steps:
- name: Checkout repo
Expand All @@ -32,13 +32,15 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Format
run: task test:format
run: cd api-service && task test:format

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.56
# Optional: working directory, useful when you have multiple Go modules
working-directory: api-service
# Optional: golangci-lint command line arguments.
args: --timeout=5m
# Optional: show only new issues if it's a pull request. The default value is `false`.
Expand Down
20 changes: 20 additions & 0 deletions proto/substreams/sink/kv/v1/kv.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
syntax = "proto3";
package sf.substreams.sink.kv.v1;

option go_package = "github.com/streamingfast/substreams-sink-kv/pb;pbkv";

message KVOperations {
repeated KVOperation operations = 1;
}

message KVOperation {
string key = 1;
bytes value = 2;
uint64 ordinal = 3;
enum Type {
UNSET = 0; // Protobuf default should not be used, this is used so that the consume can ensure that the value was actually specified
SET = 1;
DELETE = 2;
}
Type type = 4;
}
26 changes: 26 additions & 0 deletions proto/substreams/sink/kv/v1/services.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
syntax = "proto3";
package sf.substreams.sink.kv.v1;

option go_package = "github.com/streamingfast/substreams-sink-kv/pb;pbkv";


message Config {
int64 start_block = 1;
string input_module = 2;
}

// This defines a KV Sink to be queried with a generic key access interface (Get, GetMany, Scan, Prefix calls).
message GenericService {
Config sink_config = 1;
}

// This defines configuration to run a WASM query service on top of the KV store being sync'd.
message WASMQueryService {
Config sink_config = 1;

// wasm exports: "kv_get_batch", "kv_get", "kv_scan", "kv_prefix"
bytes wasm_query_module = 5;

// Fully qualified Protobuf Service definition name
string grpc_service = 2; // sf.mycustom.v1.MyService
}
Loading
Loading