dev/fix-module-paths #2
@ -7,14 +7,14 @@ Anthrove Plug SDK is a Golang-based Software Development Kit (SDK) that provides
|
||||
To install the Anthrove Plug SDK, you will need to have Go installed on your system. You can then use the go get command to fetch the SDK:
|
||||
|
||||
```bash
|
||||
go get git.dragse.it/anthrove/plug-sdk/v2
|
||||
go get git.anthrove.art/anthrove/plug-sdk/v2
|
||||
```
|
||||
## Usage
|
||||
|
||||
Below is a basic example of how to use the SDK:
|
||||
|
||||
````go
|
||||
import "git.dragse.it/anthrove/plug-sdk/v2/pkg/plug"
|
||||
import "git.anthrove.art/anthrove/plug-sdk/v2/pkg/plug"
|
||||
|
||||
// Define what Source this Plug is used for
|
||||
source := models.Source{
|
||||
|
4
go.mod
4
go.mod
@ -1,9 +1,9 @@
|
||||
module git.dragse.it/anthrove/plug-sdk/v2
|
||||
module git.anthrove.art/anthrove/plug-sdk/v2
|
||||
|
||||
go 1.22.0
|
||||
|
||||
require (
|
||||
git.dragse.it/anthrove/otter-space-sdk/v2 v2.1.0
|
||||
git.anthrove.art/anthrove/otter-space-sdk/v2 v2.1.0
|
||||
github.com/golang/protobuf v1.5.4
|
||||
github.com/matoous/go-nanoid/v2 v2.1.0
|
||||
google.golang.org/grpc v1.61.1
|
||||
|
4
go.sum
4
go.sum
@ -1,7 +1,7 @@
|
||||
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
|
||||
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||
git.dragse.it/anthrove/otter-space-sdk/v2 v2.1.0 h1:n3vePctwrBWDRccztsWYaBXejoEtno5ADT/c284hSFQ=
|
||||
git.dragse.it/anthrove/otter-space-sdk/v2 v2.1.0/go.mod h1:kyN5WtWd0AjWipXGZnxaBz4bv3rT7Eyw0HmfkCB27AU=
|
||||
git.anthrove.art/anthrove/otter-space-sdk/v2 v2.1.0 h1:60Eg1zYHgojLorfOKFSwpqY1vj0F3/6XIme/ODwPRPA=
|
||||
git.anthrove.art/anthrove/otter-space-sdk/v2 v2.1.0/go.mod h1:6ZLsdEoIZhr5HLmGf9xDNuWQiYpNDapemzzZ9px5x5E=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
|
||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
|
@ -2,8 +2,8 @@ package otter
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/database"
|
||||
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models"
|
||||
"git.anthrove.art/anthrove/otter-space-sdk/v2/pkg/database"
|
||||
"git.anthrove.art/anthrove/otter-space-sdk/v2/pkg/models"
|
||||
)
|
||||
|
||||
func ConnectToDatabase(ctx context.Context, config models.DatabaseConfig) (database.OtterSpace, error) {
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/database"
|
||||
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models"
|
||||
"git.anthrove.art/anthrove/otter-space-sdk/v2/pkg/database"
|
||||
"git.anthrove.art/anthrove/otter-space-sdk/v2/pkg/models"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
gRPC "git.dragse.it/anthrove/plug-sdk/v2/pkg/grpc"
|
||||
gRPC "git.anthrove.art/anthrove/plug-sdk/v2/pkg/grpc"
|
||||
gonanoid "github.com/matoous/go-nanoid/v2"
|
||||
)
|
||||
|
||||
|
@ -7,12 +7,12 @@ import (
|
||||
"log"
|
||||
"net"
|
||||
|
||||
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/database"
|
||||
otterError "git.dragse.it/anthrove/otter-space-sdk/v2/pkg/error"
|
||||
"git.dragse.it/anthrove/otter-space-sdk/v2/pkg/models"
|
||||
"git.anthrove.art/anthrove/otter-space-sdk/v2/pkg/database"
|
||||
otterError "git.anthrove.art/anthrove/otter-space-sdk/v2/pkg/error"
|
||||
"git.anthrove.art/anthrove/otter-space-sdk/v2/pkg/models"
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
|
||||
pb "git.dragse.it/anthrove/plug-sdk/v2/pkg/grpc"
|
||||
pb "git.anthrove.art/anthrove/plug-sdk/v2/pkg/grpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
|
2
third_party/grpc-proto/plug.proto
vendored
2
third_party/grpc-proto/plug.proto
vendored
@ -1,7 +1,7 @@
|
||||
syntax = "proto3";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "git.dragse.it/anthrove/plug-[REPLACE_ME]/api/gRPC";
|
||||
option go_package = "git.anthrove.art/anthrove/plug-[REPLACE_ME]/api/gRPC";
|
||||
|
||||
service PlugConnector {
|
||||
rpc TaskStart(PlugTaskCreation) returns (PlugTaskStatus);
|
||||
|
Loading…
Reference in New Issue
Block a user