From 8593d2d0fd2e26e1fd98302040ffa4cbfe505e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 20 Mar 2022 11:43:00 +0100 Subject: [PATCH] move shared code to pkg. --- cmd/neko/main.go | 2 +- internal/api/members/bluk.go | 4 ++-- internal/api/members/controler.go | 4 ++-- internal/api/members/handler.go | 6 +++--- internal/api/room/broadcast.go | 6 +++--- internal/api/room/clipboard.go | 4 ++-- internal/api/room/control.go | 4 ++-- internal/api/room/handler.go | 6 +++--- internal/api/room/keyboard.go | 4 ++-- internal/api/room/screen.go | 8 ++++---- internal/api/room/upload.go | 2 +- internal/api/router.go | 6 +++--- internal/api/session.go | 6 +++--- internal/capture/broadcast.go | 4 ++-- internal/capture/manager.go | 4 ++-- internal/capture/screencast.go | 4 ++-- internal/capture/streamsink.go | 6 +++--- internal/capture/streamsrc.go | 6 +++--- internal/config/capture.go | 6 +++--- internal/config/server.go | 2 +- internal/config/webrtc.go | 4 ++-- internal/desktop/clipboard.go | 2 +- internal/desktop/drop.go | 2 +- internal/desktop/filechooserdialog.go | 2 +- internal/desktop/manager.go | 4 ++-- internal/desktop/xevent.go | 2 +- internal/desktop/xorg.go | 4 ++-- internal/http/debug.go | 2 +- internal/http/logger.go | 4 ++-- internal/http/manager.go | 2 +- internal/http/router.go | 6 +++--- internal/member/dummy/provider.go | 2 +- internal/member/file/provider.go | 2 +- internal/member/file/types.go | 2 +- internal/member/manager.go | 2 +- internal/member/object/provider.go | 2 +- internal/member/object/types.go | 2 +- internal/session/auth.go | 2 +- internal/session/manager.go | 4 ++-- internal/session/session.go | 4 ++-- internal/webrtc/cursor/image.go | 4 ++-- internal/webrtc/handler.go | 2 +- internal/webrtc/manager.go | 8 ++++---- internal/webrtc/peer.go | 2 +- internal/webrtc/peerconnection.go | 2 +- internal/webrtc/peerstreamtrack.go | 2 +- internal/webrtc/send.go | 2 +- internal/websocket/filechooserdialog.go | 6 +++--- internal/websocket/handler/clipboard.go | 4 ++-- internal/websocket/handler/control.go | 8 ++++---- internal/websocket/handler/handler.go | 8 ++++---- internal/websocket/handler/keyboard.go | 4 ++-- internal/websocket/handler/screen.go | 6 +++--- internal/websocket/handler/send.go | 6 +++--- internal/websocket/handler/session.go | 6 +++--- internal/websocket/handler/signal.go | 6 +++--- internal/websocket/handler/system.go | 6 +++--- internal/websocket/manager.go | 8 ++++---- internal/websocket/peer.go | 6 +++--- {internal/http => pkg}/auth/auth.go | 4 ++-- {internal/desktop => pkg}/drop/drop.c | 0 {internal/desktop => pkg}/drop/drop.go | 0 {internal/desktop => pkg}/drop/drop.h | 0 {internal/capture => pkg}/gst/gst.c | 0 {internal/capture => pkg}/gst/gst.go | 4 ++-- {internal/capture => pkg}/gst/gst.h | 0 {internal => pkg}/types/api.go | 0 {internal => pkg}/types/capture.go | 2 +- {internal => pkg}/types/codec/codecs.go | 0 {internal => pkg}/types/desktop.go | 0 {internal => pkg}/types/event/events.go | 0 {internal => pkg}/types/http.go | 0 {internal => pkg}/types/member.go | 0 {internal => pkg}/types/message/messages.go | 2 +- {internal => pkg}/types/session.go | 0 {internal => pkg}/types/webrtc.go | 0 {internal => pkg}/types/websocket.go | 0 {internal => pkg}/utils/array.go | 0 {internal => pkg}/utils/color.go | 0 {internal => pkg}/utils/http.go | 0 {internal => pkg}/utils/image.go | 0 {internal => pkg}/utils/json.go | 0 {internal => pkg}/utils/request.go | 0 {internal => pkg}/utils/uid.go | 0 {internal => pkg}/utils/zip.go | 0 {internal/desktop => pkg}/xevent/xevent.c | 0 {internal/desktop => pkg}/xevent/xevent.go | 0 {internal/desktop => pkg}/xevent/xevent.h | 0 {internal/desktop => pkg}/xorg/keysymdef.go | 0 {internal/desktop => pkg}/xorg/keysymdef.sh | 0 {internal/desktop => pkg}/xorg/xorg.c | 0 {internal/desktop => pkg}/xorg/xorg.go | 7 +++---- {internal/desktop => pkg}/xorg/xorg.h | 0 93 files changed, 132 insertions(+), 133 deletions(-) rename {internal/http => pkg}/auth/auth.go (94%) rename {internal/desktop => pkg}/drop/drop.c (100%) rename {internal/desktop => pkg}/drop/drop.go (100%) rename {internal/desktop => pkg}/drop/drop.h (100%) rename {internal/capture => pkg}/gst/gst.c (100%) rename {internal/capture => pkg}/gst/gst.go (98%) rename {internal/capture => pkg}/gst/gst.h (100%) rename {internal => pkg}/types/api.go (100%) rename {internal => pkg}/types/capture.go (98%) rename {internal => pkg}/types/codec/codecs.go (100%) rename {internal => pkg}/types/desktop.go (100%) rename {internal => pkg}/types/event/events.go (100%) rename {internal => pkg}/types/http.go (100%) rename {internal => pkg}/types/member.go (100%) rename {internal => pkg}/types/message/messages.go (98%) rename {internal => pkg}/types/session.go (100%) rename {internal => pkg}/types/webrtc.go (100%) rename {internal => pkg}/types/websocket.go (100%) rename {internal => pkg}/utils/array.go (100%) rename {internal => pkg}/utils/color.go (100%) rename {internal => pkg}/utils/http.go (100%) rename {internal => pkg}/utils/image.go (100%) rename {internal => pkg}/utils/json.go (100%) rename {internal => pkg}/utils/request.go (100%) rename {internal => pkg}/utils/uid.go (100%) rename {internal => pkg}/utils/zip.go (100%) rename {internal/desktop => pkg}/xevent/xevent.c (100%) rename {internal/desktop => pkg}/xevent/xevent.go (100%) rename {internal/desktop => pkg}/xevent/xevent.h (100%) rename {internal/desktop => pkg}/xorg/keysymdef.go (100%) rename {internal/desktop => pkg}/xorg/keysymdef.sh (100%) rename {internal/desktop => pkg}/xorg/xorg.c (100%) rename {internal/desktop => pkg}/xorg/xorg.go (99%) rename {internal/desktop => pkg}/xorg/xorg.h (100%) diff --git a/cmd/neko/main.go b/cmd/neko/main.go index 6d218b29..47e1eadd 100644 --- a/cmd/neko/main.go +++ b/cmd/neko/main.go @@ -7,7 +7,7 @@ import ( neko "gitlab.com/demodesk/neko/server" "gitlab.com/demodesk/neko/server/cmd" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/utils" ) func main() { diff --git a/internal/api/members/bluk.go b/internal/api/members/bluk.go index b979f15d..36a6f5f8 100644 --- a/internal/api/members/bluk.go +++ b/internal/api/members/bluk.go @@ -5,8 +5,8 @@ import ( "io" "net/http" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type MemberBulkUpdatePayload struct { diff --git a/internal/api/members/controler.go b/internal/api/members/controler.go index 09e3f0b7..6bb40db4 100644 --- a/internal/api/members/controler.go +++ b/internal/api/members/controler.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type MemberDataPayload struct { diff --git a/internal/api/members/handler.go b/internal/api/members/handler.go index 84be7c99..b6a8c71c 100644 --- a/internal/api/members/handler.go +++ b/internal/api/members/handler.go @@ -7,9 +7,9 @@ import ( "github.com/go-chi/chi" - "gitlab.com/demodesk/neko/server/internal/http/auth" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/auth" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type key int diff --git a/internal/api/room/broadcast.go b/internal/api/room/broadcast.go index 26a99d86..f0bd8664 100644 --- a/internal/api/room/broadcast.go +++ b/internal/api/room/broadcast.go @@ -3,9 +3,9 @@ package room import ( "net/http" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type BroadcastStatusPayload struct { diff --git a/internal/api/room/clipboard.go b/internal/api/room/clipboard.go index ccca748b..f0a8bfdd 100644 --- a/internal/api/room/clipboard.go +++ b/internal/api/room/clipboard.go @@ -7,8 +7,8 @@ import ( "net/http" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type ClipboardPayload struct { diff --git a/internal/api/room/control.go b/internal/api/room/control.go index 524294af..cf0300e9 100644 --- a/internal/api/room/control.go +++ b/internal/api/room/control.go @@ -5,8 +5,8 @@ import ( "github.com/go-chi/chi" - "gitlab.com/demodesk/neko/server/internal/http/auth" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/auth" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type ControlStatusPayload struct { diff --git a/internal/api/room/handler.go b/internal/api/room/handler.go index ab4680af..4c425bf7 100644 --- a/internal/api/room/handler.go +++ b/internal/api/room/handler.go @@ -4,9 +4,9 @@ import ( "context" "net/http" - "gitlab.com/demodesk/neko/server/internal/http/auth" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/auth" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type RoomHandler struct { diff --git a/internal/api/room/keyboard.go b/internal/api/room/keyboard.go index 347ddccb..f75c9291 100644 --- a/internal/api/room/keyboard.go +++ b/internal/api/room/keyboard.go @@ -3,8 +3,8 @@ package room import ( "net/http" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type KeyboardMapData struct { diff --git a/internal/api/room/screen.go b/internal/api/room/screen.go index 2d61daff..fc16ecc1 100644 --- a/internal/api/room/screen.go +++ b/internal/api/room/screen.go @@ -4,10 +4,10 @@ import ( "net/http" "strconv" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type ScreenConfigurationPayload struct { diff --git a/internal/api/room/upload.go b/internal/api/room/upload.go index 7538a4e1..edb5cae4 100644 --- a/internal/api/room/upload.go +++ b/internal/api/room/upload.go @@ -7,7 +7,7 @@ import ( "path" "strconv" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/utils" ) // TODO: Extract file uploading to custom utility. diff --git a/internal/api/router.go b/internal/api/router.go index c8b54e50..7c369bd6 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -8,9 +8,9 @@ import ( "gitlab.com/demodesk/neko/server/internal/api/members" "gitlab.com/demodesk/neko/server/internal/api/room" "gitlab.com/demodesk/neko/server/internal/config" - "gitlab.com/demodesk/neko/server/internal/http/auth" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/auth" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type ApiManagerCtx struct { diff --git a/internal/api/session.go b/internal/api/session.go index 048e42e5..f22cf199 100644 --- a/internal/api/session.go +++ b/internal/api/session.go @@ -3,9 +3,9 @@ package api import ( "net/http" - "gitlab.com/demodesk/neko/server/internal/http/auth" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/auth" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type SessionLoginPayload struct { diff --git a/internal/capture/broadcast.go b/internal/capture/broadcast.go index 709f555e..7d26df65 100644 --- a/internal/capture/broadcast.go +++ b/internal/capture/broadcast.go @@ -7,8 +7,8 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "gitlab.com/demodesk/neko/server/internal/capture/gst" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/gst" + "gitlab.com/demodesk/neko/server/pkg/types" ) type BroacastManagerCtx struct { diff --git a/internal/capture/manager.go b/internal/capture/manager.go index ea2670d3..d4496e9f 100644 --- a/internal/capture/manager.go +++ b/internal/capture/manager.go @@ -9,8 +9,8 @@ import ( "github.com/rs/zerolog/log" "gitlab.com/demodesk/neko/server/internal/config" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/codec" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/codec" ) type CaptureManagerCtx struct { diff --git a/internal/capture/screencast.go b/internal/capture/screencast.go index 7d63e612..82d59e18 100644 --- a/internal/capture/screencast.go +++ b/internal/capture/screencast.go @@ -9,8 +9,8 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "gitlab.com/demodesk/neko/server/internal/capture/gst" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/gst" + "gitlab.com/demodesk/neko/server/pkg/types" ) // timeout between intervals, when screencast pipeline is checked diff --git a/internal/capture/streamsink.go b/internal/capture/streamsink.go index a6290be0..22d1f64e 100644 --- a/internal/capture/streamsink.go +++ b/internal/capture/streamsink.go @@ -8,9 +8,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "gitlab.com/demodesk/neko/server/internal/capture/gst" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/codec" + "gitlab.com/demodesk/neko/server/pkg/gst" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/codec" ) var moveSinkListenerMu = sync.Mutex{} diff --git a/internal/capture/streamsrc.go b/internal/capture/streamsrc.go index 80baf72a..368f6e0f 100644 --- a/internal/capture/streamsrc.go +++ b/internal/capture/streamsrc.go @@ -7,9 +7,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "gitlab.com/demodesk/neko/server/internal/capture/gst" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/codec" + "gitlab.com/demodesk/neko/server/pkg/gst" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/codec" ) type StreamSrcManagerCtx struct { diff --git a/internal/config/capture.go b/internal/config/capture.go index caed4eaa..e0c8d110 100644 --- a/internal/config/capture.go +++ b/internal/config/capture.go @@ -8,9 +8,9 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/codec" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/codec" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type Capture struct { diff --git a/internal/config/server.go b/internal/config/server.go index eebe8925..62200dd7 100644 --- a/internal/config/server.go +++ b/internal/config/server.go @@ -4,7 +4,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type Server struct { diff --git a/internal/config/webrtc.go b/internal/config/webrtc.go index 9396d2bb..50a2a642 100644 --- a/internal/config/webrtc.go +++ b/internal/config/webrtc.go @@ -8,8 +8,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) // default stun server diff --git a/internal/desktop/clipboard.go b/internal/desktop/clipboard.go index 5d681a06..b9772142 100644 --- a/internal/desktop/clipboard.go +++ b/internal/desktop/clipboard.go @@ -6,7 +6,7 @@ import ( "os/exec" "strings" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) func (manager *DesktopManagerCtx) ClipboardGetText() (*types.ClipboardText, error) { diff --git a/internal/desktop/drop.go b/internal/desktop/drop.go index 3d892937..4efd8420 100644 --- a/internal/desktop/drop.go +++ b/internal/desktop/drop.go @@ -3,7 +3,7 @@ package desktop import ( "time" - "gitlab.com/demodesk/neko/server/internal/desktop/drop" + "gitlab.com/demodesk/neko/server/pkg/drop" ) // repeat move event multiple times diff --git a/internal/desktop/filechooserdialog.go b/internal/desktop/filechooserdialog.go index d61892b3..5c4e5952 100644 --- a/internal/desktop/filechooserdialog.go +++ b/internal/desktop/filechooserdialog.go @@ -4,7 +4,7 @@ import ( "errors" "os/exec" - "gitlab.com/demodesk/neko/server/internal/desktop/xorg" + "gitlab.com/demodesk/neko/server/pkg/xorg" ) // name of the window that is being controlled diff --git a/internal/desktop/manager.go b/internal/desktop/manager.go index f65e5f35..289904bf 100644 --- a/internal/desktop/manager.go +++ b/internal/desktop/manager.go @@ -10,8 +10,8 @@ import ( "github.com/rs/zerolog/log" "gitlab.com/demodesk/neko/server/internal/config" - "gitlab.com/demodesk/neko/server/internal/desktop/xevent" - "gitlab.com/demodesk/neko/server/internal/desktop/xorg" + "gitlab.com/demodesk/neko/server/pkg/xevent" + "gitlab.com/demodesk/neko/server/pkg/xorg" ) var mu = sync.Mutex{} diff --git a/internal/desktop/xevent.go b/internal/desktop/xevent.go index 110f4ed9..8abcb03f 100644 --- a/internal/desktop/xevent.go +++ b/internal/desktop/xevent.go @@ -1,7 +1,7 @@ package desktop import ( - "gitlab.com/demodesk/neko/server/internal/desktop/xevent" + "gitlab.com/demodesk/neko/server/pkg/xevent" ) func (manager *DesktopManagerCtx) OnCursorChanged(listener func(serial uint64)) { diff --git a/internal/desktop/xorg.go b/internal/desktop/xorg.go index ee211bf2..0de6b74b 100644 --- a/internal/desktop/xorg.go +++ b/internal/desktop/xorg.go @@ -6,8 +6,8 @@ import ( "regexp" "time" - "gitlab.com/demodesk/neko/server/internal/desktop/xorg" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/xorg" ) func (manager *DesktopManagerCtx) Move(x, y int) { diff --git a/internal/http/debug.go b/internal/http/debug.go index a0a29be0..af63ded2 100644 --- a/internal/http/debug.go +++ b/internal/http/debug.go @@ -6,7 +6,7 @@ import ( "github.com/go-chi/chi" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) func pprofHandler(r types.Router) { diff --git a/internal/http/logger.go b/internal/http/logger.go index c4dbc87b..3714568e 100644 --- a/internal/http/logger.go +++ b/internal/http/logger.go @@ -8,8 +8,8 @@ import ( "github.com/go-chi/chi/middleware" "github.com/rs/zerolog" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type logFormatter struct { diff --git a/internal/http/manager.go b/internal/http/manager.go index d8c6520d..0ead57ef 100644 --- a/internal/http/manager.go +++ b/internal/http/manager.go @@ -10,7 +10,7 @@ import ( "github.com/rs/zerolog/log" "gitlab.com/demodesk/neko/server/internal/config" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) type HttpManagerCtx struct { diff --git a/internal/http/router.go b/internal/http/router.go index 932563a1..c91a3720 100644 --- a/internal/http/router.go +++ b/internal/http/router.go @@ -7,9 +7,9 @@ import ( "github.com/go-chi/chi/middleware" "github.com/rs/zerolog" - "gitlab.com/demodesk/neko/server/internal/http/auth" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/auth" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type router struct { diff --git a/internal/member/dummy/provider.go b/internal/member/dummy/provider.go index 72e59f4e..2f3cbee3 100644 --- a/internal/member/dummy/provider.go +++ b/internal/member/dummy/provider.go @@ -3,7 +3,7 @@ package dummy import ( "errors" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) func New() types.MemberProvider { diff --git a/internal/member/file/provider.go b/internal/member/file/provider.go index 423f5b69..1f1f6707 100644 --- a/internal/member/file/provider.go +++ b/internal/member/file/provider.go @@ -5,7 +5,7 @@ import ( "io" "os" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) func New(config Config) types.MemberProvider { diff --git a/internal/member/file/types.go b/internal/member/file/types.go index cf589aac..dc4a02d2 100644 --- a/internal/member/file/types.go +++ b/internal/member/file/types.go @@ -1,7 +1,7 @@ package file import ( - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) type MemberEntry struct { diff --git a/internal/member/manager.go b/internal/member/manager.go index 9f3ae0a7..83aeae0f 100644 --- a/internal/member/manager.go +++ b/internal/member/manager.go @@ -11,7 +11,7 @@ import ( "gitlab.com/demodesk/neko/server/internal/member/dummy" "gitlab.com/demodesk/neko/server/internal/member/file" "gitlab.com/demodesk/neko/server/internal/member/object" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) func New(sessions types.SessionManager, config *config.Member) *MemberManagerCtx { diff --git a/internal/member/object/provider.go b/internal/member/object/provider.go index 12d45287..c3cef2a7 100644 --- a/internal/member/object/provider.go +++ b/internal/member/object/provider.go @@ -1,7 +1,7 @@ package object import ( - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) func New(config Config) types.MemberProvider { diff --git a/internal/member/object/types.go b/internal/member/object/types.go index e35e1c99..b29894fa 100644 --- a/internal/member/object/types.go +++ b/internal/member/object/types.go @@ -1,7 +1,7 @@ package object import ( - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) type MemberEntry struct { diff --git a/internal/session/auth.go b/internal/session/auth.go index 1593b1bb..50b749dd 100644 --- a/internal/session/auth.go +++ b/internal/session/auth.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) func (manager *SessionManagerCtx) CookieSetToken(w http.ResponseWriter, token string) { diff --git a/internal/session/manager.go b/internal/session/manager.go index 54be1e47..5593521f 100644 --- a/internal/session/manager.go +++ b/internal/session/manager.go @@ -9,8 +9,8 @@ import ( "github.com/rs/zerolog/log" "gitlab.com/demodesk/neko/server/internal/config" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) func New(config *config.Session) *SessionManagerCtx { diff --git a/internal/session/session.go b/internal/session/session.go index 42f4b8f4..c885aeed 100644 --- a/internal/session/session.go +++ b/internal/session/session.go @@ -5,8 +5,8 @@ import ( "github.com/rs/zerolog" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" ) type SessionCtx struct { diff --git a/internal/webrtc/cursor/image.go b/internal/webrtc/cursor/image.go index 3f1b8730..4411e324 100644 --- a/internal/webrtc/cursor/image.go +++ b/internal/webrtc/cursor/image.go @@ -7,8 +7,8 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) func NewImage(desktop types.DesktopManager) *ImageCtx { diff --git a/internal/webrtc/handler.go b/internal/webrtc/handler.go index 1f93ca38..88cbe74d 100644 --- a/internal/webrtc/handler.go +++ b/internal/webrtc/handler.go @@ -4,8 +4,8 @@ import ( "bytes" "encoding/binary" - "gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/internal/webrtc/payload" + "gitlab.com/demodesk/neko/server/pkg/types" ) func (manager *WebRTCManagerCtx) handle(data []byte, session types.Session) error { diff --git a/internal/webrtc/manager.go b/internal/webrtc/manager.go index ce7e76eb..8684369c 100644 --- a/internal/webrtc/manager.go +++ b/internal/webrtc/manager.go @@ -14,12 +14,12 @@ import ( "github.com/rs/zerolog/log" "gitlab.com/demodesk/neko/server/internal/config" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/codec" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/internal/webrtc/cursor" "gitlab.com/demodesk/neko/server/internal/webrtc/pionlog" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/codec" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) // the duration without network activity before a Agent is considered disconnected. Default is 5 Seconds diff --git a/internal/webrtc/peer.go b/internal/webrtc/peer.go index 0d01d8d9..e18a27bd 100644 --- a/internal/webrtc/peer.go +++ b/internal/webrtc/peer.go @@ -6,7 +6,7 @@ import ( "github.com/pion/webrtc/v3" "github.com/rs/zerolog" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) type WebRTCPeerCtx struct { diff --git a/internal/webrtc/peerconnection.go b/internal/webrtc/peerconnection.go index c64f57a1..6554d113 100644 --- a/internal/webrtc/peerconnection.go +++ b/internal/webrtc/peerconnection.go @@ -5,8 +5,8 @@ import ( "github.com/pion/webrtc/v3" "github.com/rs/zerolog" - "gitlab.com/demodesk/neko/server/internal/types/codec" "gitlab.com/demodesk/neko/server/internal/webrtc/pionlog" + "gitlab.com/demodesk/neko/server/pkg/types/codec" ) func (manager *WebRTCManagerCtx) newPeerConnection(codecs []codec.RTPCodec, logger zerolog.Logger) (*webrtc.PeerConnection, error) { diff --git a/internal/webrtc/peerstreamtrack.go b/internal/webrtc/peerstreamtrack.go index 59a3925c..a45e347d 100644 --- a/internal/webrtc/peerstreamtrack.go +++ b/internal/webrtc/peerstreamtrack.go @@ -9,7 +9,7 @@ import ( "github.com/pion/webrtc/v3/pkg/media" "github.com/rs/zerolog" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) func (manager *WebRTCManagerCtx) newPeerStreamTrack(stream types.StreamSinkManager, logger zerolog.Logger) (*PeerStreamTrack, error) { diff --git a/internal/webrtc/send.go b/internal/webrtc/send.go index e82edeea..f42f5867 100644 --- a/internal/webrtc/send.go +++ b/internal/webrtc/send.go @@ -4,8 +4,8 @@ import ( "bytes" "encoding/binary" - "gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/internal/webrtc/payload" + "gitlab.com/demodesk/neko/server/pkg/types" ) func (peer *WebRTCPeerCtx) SendCursorPosition(x, y int) error { diff --git a/internal/websocket/filechooserdialog.go b/internal/websocket/filechooserdialog.go index f3c75639..0c02d082 100644 --- a/internal/websocket/filechooserdialog.go +++ b/internal/websocket/filechooserdialog.go @@ -1,9 +1,9 @@ package websocket import ( - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) func (manager *WebSocketManagerCtx) fileChooserDialogEvents() { diff --git a/internal/websocket/handler/clipboard.go b/internal/websocket/handler/clipboard.go index 93e65c1c..5b9eac9d 100644 --- a/internal/websocket/handler/clipboard.go +++ b/internal/websocket/handler/clipboard.go @@ -3,8 +3,8 @@ package handler import ( "errors" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) func (h *MessageHandlerCtx) clipboardSet(session types.Session, payload *message.ClipboardData) error { diff --git a/internal/websocket/handler/control.go b/internal/websocket/handler/control.go index 938e3e22..96a20de0 100644 --- a/internal/websocket/handler/control.go +++ b/internal/websocket/handler/control.go @@ -3,10 +3,10 @@ package handler import ( "errors" - "gitlab.com/demodesk/neko/server/internal/desktop/xorg" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" + "gitlab.com/demodesk/neko/server/pkg/xorg" ) var ( diff --git a/internal/websocket/handler/handler.go b/internal/websocket/handler/handler.go index 52806c4c..9c5a8a26 100644 --- a/internal/websocket/handler/handler.go +++ b/internal/websocket/handler/handler.go @@ -4,10 +4,10 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" + "gitlab.com/demodesk/neko/server/pkg/utils" ) func New( diff --git a/internal/websocket/handler/keyboard.go b/internal/websocket/handler/keyboard.go index ce97666f..e8124fb3 100644 --- a/internal/websocket/handler/keyboard.go +++ b/internal/websocket/handler/keyboard.go @@ -3,8 +3,8 @@ package handler import ( "errors" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) func (h *MessageHandlerCtx) keyboardMap(session types.Session, payload *message.KeyboardMap) error { diff --git a/internal/websocket/handler/screen.go b/internal/websocket/handler/screen.go index 4b9f6118..01a2c256 100644 --- a/internal/websocket/handler/screen.go +++ b/internal/websocket/handler/screen.go @@ -3,9 +3,9 @@ package handler import ( "errors" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) func (h *MessageHandlerCtx) screenSet(session types.Session, payload *message.ScreenSize) error { diff --git a/internal/websocket/handler/send.go b/internal/websocket/handler/send.go index 6368717d..df4f873b 100644 --- a/internal/websocket/handler/send.go +++ b/internal/websocket/handler/send.go @@ -3,9 +3,9 @@ package handler import ( "errors" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) func (h *MessageHandlerCtx) sendUnicast(session types.Session, payload *message.SendUnicast) error { diff --git a/internal/websocket/handler/session.go b/internal/websocket/handler/session.go index 85ffd041..64346807 100644 --- a/internal/websocket/handler/session.go +++ b/internal/websocket/handler/session.go @@ -1,9 +1,9 @@ package handler import ( - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) func (h *MessageHandlerCtx) SessionCreated(session types.Session) error { diff --git a/internal/websocket/handler/signal.go b/internal/websocket/handler/signal.go index d67e141b..f04b31a8 100644 --- a/internal/websocket/handler/signal.go +++ b/internal/websocket/handler/signal.go @@ -3,9 +3,9 @@ package handler import ( "errors" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) func (h *MessageHandlerCtx) signalRequest(session types.Session, payload *message.SignalVideo) error { diff --git a/internal/websocket/handler/system.go b/internal/websocket/handler/system.go index d443483e..f4ae2dd8 100644 --- a/internal/websocket/handler/system.go +++ b/internal/websocket/handler/system.go @@ -6,9 +6,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) func (h *MessageHandlerCtx) systemInit(session types.Session) error { diff --git a/internal/websocket/manager.go b/internal/websocket/manager.go index cb10dcac..067a3fc3 100644 --- a/internal/websocket/manager.go +++ b/internal/websocket/manager.go @@ -10,11 +10,11 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" - "gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/internal/websocket/handler" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" + "gitlab.com/demodesk/neko/server/pkg/utils" ) // send pings to peer with this period - must be less than pongWait diff --git a/internal/websocket/peer.go b/internal/websocket/peer.go index 7f1149f4..6ba83ce6 100644 --- a/internal/websocket/peer.go +++ b/internal/websocket/peer.go @@ -9,9 +9,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/types/event" - "gitlab.com/demodesk/neko/server/internal/types/message" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/types/event" + "gitlab.com/demodesk/neko/server/pkg/types/message" ) type WebSocketPeerCtx struct { diff --git a/internal/http/auth/auth.go b/pkg/auth/auth.go similarity index 94% rename from internal/http/auth/auth.go rename to pkg/auth/auth.go index e954d4af..9c558577 100644 --- a/internal/http/auth/auth.go +++ b/pkg/auth/auth.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "gitlab.com/demodesk/neko/server/internal/types" - "gitlab.com/demodesk/neko/server/internal/utils" + "gitlab.com/demodesk/neko/server/pkg/types" + "gitlab.com/demodesk/neko/server/pkg/utils" ) type key int diff --git a/internal/desktop/drop/drop.c b/pkg/drop/drop.c similarity index 100% rename from internal/desktop/drop/drop.c rename to pkg/drop/drop.c diff --git a/internal/desktop/drop/drop.go b/pkg/drop/drop.go similarity index 100% rename from internal/desktop/drop/drop.go rename to pkg/drop/drop.go diff --git a/internal/desktop/drop/drop.h b/pkg/drop/drop.h similarity index 100% rename from internal/desktop/drop/drop.h rename to pkg/drop/drop.h diff --git a/internal/capture/gst/gst.c b/pkg/gst/gst.c similarity index 100% rename from internal/capture/gst/gst.c rename to pkg/gst/gst.c diff --git a/internal/capture/gst/gst.go b/pkg/gst/gst.go similarity index 98% rename from internal/capture/gst/gst.go rename to pkg/gst/gst.go index 60cb90f7..dc1a1c04 100644 --- a/internal/capture/gst/gst.go +++ b/pkg/gst/gst.go @@ -13,10 +13,10 @@ import ( "time" "unsafe" - "gitlab.com/demodesk/neko/server/internal/types" - "github.com/rs/zerolog" "github.com/rs/zerolog/log" + + "gitlab.com/demodesk/neko/server/pkg/types" ) type Pipeline struct { diff --git a/internal/capture/gst/gst.h b/pkg/gst/gst.h similarity index 100% rename from internal/capture/gst/gst.h rename to pkg/gst/gst.h diff --git a/internal/types/api.go b/pkg/types/api.go similarity index 100% rename from internal/types/api.go rename to pkg/types/api.go diff --git a/internal/types/capture.go b/pkg/types/capture.go similarity index 98% rename from internal/types/capture.go rename to pkg/types/capture.go index 2d0126d5..a2bf961b 100644 --- a/internal/types/capture.go +++ b/pkg/types/capture.go @@ -10,7 +10,7 @@ import ( "github.com/PaesslerAG/gval" "github.com/pion/webrtc/v3/pkg/media" - "gitlab.com/demodesk/neko/server/internal/types/codec" + "gitlab.com/demodesk/neko/server/pkg/types/codec" ) var ( diff --git a/internal/types/codec/codecs.go b/pkg/types/codec/codecs.go similarity index 100% rename from internal/types/codec/codecs.go rename to pkg/types/codec/codecs.go diff --git a/internal/types/desktop.go b/pkg/types/desktop.go similarity index 100% rename from internal/types/desktop.go rename to pkg/types/desktop.go diff --git a/internal/types/event/events.go b/pkg/types/event/events.go similarity index 100% rename from internal/types/event/events.go rename to pkg/types/event/events.go diff --git a/internal/types/http.go b/pkg/types/http.go similarity index 100% rename from internal/types/http.go rename to pkg/types/http.go diff --git a/internal/types/member.go b/pkg/types/member.go similarity index 100% rename from internal/types/member.go rename to pkg/types/member.go diff --git a/internal/types/message/messages.go b/pkg/types/message/messages.go similarity index 98% rename from internal/types/message/messages.go rename to pkg/types/message/messages.go index 413bff64..a46d67b4 100644 --- a/internal/types/message/messages.go +++ b/pkg/types/message/messages.go @@ -3,7 +3,7 @@ package message import ( "github.com/pion/webrtc/v3" - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) ///////////////////////////// diff --git a/internal/types/session.go b/pkg/types/session.go similarity index 100% rename from internal/types/session.go rename to pkg/types/session.go diff --git a/internal/types/webrtc.go b/pkg/types/webrtc.go similarity index 100% rename from internal/types/webrtc.go rename to pkg/types/webrtc.go diff --git a/internal/types/websocket.go b/pkg/types/websocket.go similarity index 100% rename from internal/types/websocket.go rename to pkg/types/websocket.go diff --git a/internal/utils/array.go b/pkg/utils/array.go similarity index 100% rename from internal/utils/array.go rename to pkg/utils/array.go diff --git a/internal/utils/color.go b/pkg/utils/color.go similarity index 100% rename from internal/utils/color.go rename to pkg/utils/color.go diff --git a/internal/utils/http.go b/pkg/utils/http.go similarity index 100% rename from internal/utils/http.go rename to pkg/utils/http.go diff --git a/internal/utils/image.go b/pkg/utils/image.go similarity index 100% rename from internal/utils/image.go rename to pkg/utils/image.go diff --git a/internal/utils/json.go b/pkg/utils/json.go similarity index 100% rename from internal/utils/json.go rename to pkg/utils/json.go diff --git a/internal/utils/request.go b/pkg/utils/request.go similarity index 100% rename from internal/utils/request.go rename to pkg/utils/request.go diff --git a/internal/utils/uid.go b/pkg/utils/uid.go similarity index 100% rename from internal/utils/uid.go rename to pkg/utils/uid.go diff --git a/internal/utils/zip.go b/pkg/utils/zip.go similarity index 100% rename from internal/utils/zip.go rename to pkg/utils/zip.go diff --git a/internal/desktop/xevent/xevent.c b/pkg/xevent/xevent.c similarity index 100% rename from internal/desktop/xevent/xevent.c rename to pkg/xevent/xevent.c diff --git a/internal/desktop/xevent/xevent.go b/pkg/xevent/xevent.go similarity index 100% rename from internal/desktop/xevent/xevent.go rename to pkg/xevent/xevent.go diff --git a/internal/desktop/xevent/xevent.h b/pkg/xevent/xevent.h similarity index 100% rename from internal/desktop/xevent/xevent.h rename to pkg/xevent/xevent.h diff --git a/internal/desktop/xorg/keysymdef.go b/pkg/xorg/keysymdef.go similarity index 100% rename from internal/desktop/xorg/keysymdef.go rename to pkg/xorg/keysymdef.go diff --git a/internal/desktop/xorg/keysymdef.sh b/pkg/xorg/keysymdef.sh similarity index 100% rename from internal/desktop/xorg/keysymdef.sh rename to pkg/xorg/keysymdef.sh diff --git a/internal/desktop/xorg/xorg.c b/pkg/xorg/xorg.c similarity index 100% rename from internal/desktop/xorg/xorg.c rename to pkg/xorg/xorg.c diff --git a/internal/desktop/xorg/xorg.go b/pkg/xorg/xorg.go similarity index 99% rename from internal/desktop/xorg/xorg.go rename to pkg/xorg/xorg.go index 7fb671f9..94a8126c 100644 --- a/internal/desktop/xorg/xorg.go +++ b/pkg/xorg/xorg.go @@ -9,14 +9,13 @@ import "C" import ( "fmt" + "image" + "image/color" "sync" "time" "unsafe" - "image" - "image/color" - - "gitlab.com/demodesk/neko/server/internal/types" + "gitlab.com/demodesk/neko/server/pkg/types" ) //go:generate ./keysymdef.sh diff --git a/internal/desktop/xorg/xorg.h b/pkg/xorg/xorg.h similarity index 100% rename from internal/desktop/xorg/xorg.h rename to pkg/xorg/xorg.h