Skip to content

Commit

Permalink
Rename base module
Browse files Browse the repository at this point in the history
  • Loading branch information
halabooda committed Jan 1, 2025
1 parent c35568f commit fb59abc
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 19 deletions.
4 changes: 2 additions & 2 deletions example/hooks/plugin/hook_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"log"

"github.com/codenire/codenire/pkg/hooks"
codeniredplugin "github.com/codenire/codenire/pkg/hooks/plugin"
"github.com/codiewio/codenire/pkg/hooks"
codeniredplugin "github.com/codiewio/codenire/pkg/hooks/plugin"
"github.com/hashicorp/go-plugin"
)

Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
module github.com/codenire/codenire
module github.com/codiewio/codenire

go 1.22.0

require (
cloud.google.com/go/compute/metadata v0.5.0
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d
github.com/hashicorp/go-hclog v1.6.3
github.com/hashicorp/go-plugin v1.6.2
)
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY=
cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY=
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d h1:pVrfxiGfwelyab6n21ZBkbkmbevaf+WvMIiR7sr97hw=
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA=
github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ package main

import (
"flag"
"github.com/codenire/codenire/pkg/hooks/file"
"github.com/codiewio/codenire/pkg/hooks/file"
"log"
"net/http"

"github.com/codenire/codenire/pkg/handler"
"github.com/codenire/codenire/pkg/hooks"
"github.com/codenire/codenire/pkg/hooks/plugin"
"github.com/codiewio/codenire/pkg/handler"
"github.com/codiewio/codenire/pkg/hooks"
"github.com/codiewio/codenire/pkg/hooks/plugin"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"strings"
"sync"

api "github.com/codenire/codenire/api/gen"
api "github.com/codiewio/codenire/api/gen"
)

type Handler struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/handler/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

api "github.com/codenire/codenire/api/gen"
api "github.com/codiewio/codenire/api/gen"
)

type HookEvent struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/handler/play.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"
"unicode/utf8"

api "github.com/codenire/codenire/api/gen"
api "github.com/codiewio/codenire/api/gen"
)

// When sandbox time begins.
Expand Down
2 changes: 1 addition & 1 deletion pkg/hooks/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"os"
"os/exec"

"github.com/codenire/codenire/pkg/hooks"
"github.com/codiewio/codenire/pkg/hooks"
)

type FileHook struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/hooks/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package hooks
import (
"log/slog"

"github.com/codenire/codenire/pkg/handler"
"github.com/codiewio/codenire/pkg/handler"
)

type HookRequest struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/hooks/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"os/exec"

"github.com/codenire/codenire/pkg/hooks"
"github.com/codiewio/codenire/pkg/hooks"

"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-plugin"
Expand Down
52 changes: 52 additions & 0 deletions web/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package main

//
//import (
// "fmt"
// "log"
// "plugin"
//
// "github.com/codiewio/codenire/pkg/hooks"
// codeniredplugin "github.com/codiewio/codenire/pkg/hooks/plugin"
//)
//
//type CodenireHandler struct {
//}
//
//func (g *CodenireHandler) Setup() error {
// log.Println("CodenireHandler.Setup is invoked")
// return nil
//}
//
//func (g *CodenireHandler) InvokeHook(req hooks.HookRequest) (res hooks.HookResponse, err error) {
// log.Println("CodenireHandler.InvokeHook is invoked")
//
// res.HTTPResponse.Header = make(map[string]string)
//
// if req.Type == hooks.HookPreSandboxRequest {
//
// }
//
// return res, nil
//}
//
//var handshakeConfig = plugin.HandshakeConfig{
// ProtocolVersion: 1,
// MagicCookieKey: "CODENIRE_PLUGIN",
// MagicCookieValue: "yes",
//}
//
//func main() {
// myHandler := &CodenireHandler{}
//
// var pluginMap = map[string]plugin.Plugin{
// "hookHandler": &codeniredplugin.HookHandlerPlugin{Impl: myHandler},
// }
//
// plugin.Serve(&plugin.ServeConfig{
// HandshakeConfig: handshakeConfig,
// Plugins: pluginMap,
// })
//
// fmt.Println("DOONE")
//}

0 comments on commit fb59abc

Please sign in to comment.