move shared code to pkg.

This commit is contained in:
Miroslav Šedivý 2022-03-20 11:43:00 +01:00
parent 94c17e9a42
commit 8593d2d0fd
93 changed files with 132 additions and 133 deletions

View File

@ -7,7 +7,7 @@ import (
neko "gitlab.com/demodesk/neko/server" neko "gitlab.com/demodesk/neko/server"
"gitlab.com/demodesk/neko/server/cmd" "gitlab.com/demodesk/neko/server/cmd"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
func main() { func main() {

View File

@ -5,8 +5,8 @@ import (
"io" "io"
"net/http" "net/http"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type MemberBulkUpdatePayload struct { type MemberBulkUpdatePayload struct {

View File

@ -5,8 +5,8 @@ import (
"net/http" "net/http"
"strconv" "strconv"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type MemberDataPayload struct { type MemberDataPayload struct {

View File

@ -7,9 +7,9 @@ import (
"github.com/go-chi/chi" "github.com/go-chi/chi"
"gitlab.com/demodesk/neko/server/internal/http/auth" "gitlab.com/demodesk/neko/server/pkg/auth"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type key int type key int

View File

@ -3,9 +3,9 @@ package room
import ( import (
"net/http" "net/http"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type BroadcastStatusPayload struct { type BroadcastStatusPayload struct {

View File

@ -7,8 +7,8 @@ import (
"net/http" "net/http"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type ClipboardPayload struct { type ClipboardPayload struct {

View File

@ -5,8 +5,8 @@ import (
"github.com/go-chi/chi" "github.com/go-chi/chi"
"gitlab.com/demodesk/neko/server/internal/http/auth" "gitlab.com/demodesk/neko/server/pkg/auth"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type ControlStatusPayload struct { type ControlStatusPayload struct {

View File

@ -4,9 +4,9 @@ import (
"context" "context"
"net/http" "net/http"
"gitlab.com/demodesk/neko/server/internal/http/auth" "gitlab.com/demodesk/neko/server/pkg/auth"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type RoomHandler struct { type RoomHandler struct {

View File

@ -3,8 +3,8 @@ package room
import ( import (
"net/http" "net/http"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type KeyboardMapData struct { type KeyboardMapData struct {

View File

@ -4,10 +4,10 @@ import (
"net/http" "net/http"
"strconv" "strconv"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type ScreenConfigurationPayload struct { type ScreenConfigurationPayload struct {

View File

@ -7,7 +7,7 @@ import (
"path" "path"
"strconv" "strconv"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
// TODO: Extract file uploading to custom utility. // TODO: Extract file uploading to custom utility.

View File

@ -8,9 +8,9 @@ import (
"gitlab.com/demodesk/neko/server/internal/api/members" "gitlab.com/demodesk/neko/server/internal/api/members"
"gitlab.com/demodesk/neko/server/internal/api/room" "gitlab.com/demodesk/neko/server/internal/api/room"
"gitlab.com/demodesk/neko/server/internal/config" "gitlab.com/demodesk/neko/server/internal/config"
"gitlab.com/demodesk/neko/server/internal/http/auth" "gitlab.com/demodesk/neko/server/pkg/auth"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type ApiManagerCtx struct { type ApiManagerCtx struct {

View File

@ -3,9 +3,9 @@ package api
import ( import (
"net/http" "net/http"
"gitlab.com/demodesk/neko/server/internal/http/auth" "gitlab.com/demodesk/neko/server/pkg/auth"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type SessionLoginPayload struct { type SessionLoginPayload struct {

View File

@ -7,8 +7,8 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/capture/gst" "gitlab.com/demodesk/neko/server/pkg/gst"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
type BroacastManagerCtx struct { type BroacastManagerCtx struct {

View File

@ -9,8 +9,8 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/config" "gitlab.com/demodesk/neko/server/internal/config"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/codec" "gitlab.com/demodesk/neko/server/pkg/types/codec"
) )
type CaptureManagerCtx struct { type CaptureManagerCtx struct {

View File

@ -9,8 +9,8 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/capture/gst" "gitlab.com/demodesk/neko/server/pkg/gst"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
// timeout between intervals, when screencast pipeline is checked // timeout between intervals, when screencast pipeline is checked

View File

@ -8,9 +8,9 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/capture/gst" "gitlab.com/demodesk/neko/server/pkg/gst"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/codec" "gitlab.com/demodesk/neko/server/pkg/types/codec"
) )
var moveSinkListenerMu = sync.Mutex{} var moveSinkListenerMu = sync.Mutex{}

View File

@ -7,9 +7,9 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/capture/gst" "gitlab.com/demodesk/neko/server/pkg/gst"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/codec" "gitlab.com/demodesk/neko/server/pkg/types/codec"
) )
type StreamSrcManagerCtx struct { type StreamSrcManagerCtx struct {

View File

@ -8,9 +8,9 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/codec" "gitlab.com/demodesk/neko/server/pkg/types/codec"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type Capture struct { type Capture struct {

View File

@ -4,7 +4,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type Server struct { type Server struct {

View File

@ -8,8 +8,8 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
// default stun server // default stun server

View File

@ -6,7 +6,7 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
func (manager *DesktopManagerCtx) ClipboardGetText() (*types.ClipboardText, error) { func (manager *DesktopManagerCtx) ClipboardGetText() (*types.ClipboardText, error) {

View File

@ -3,7 +3,7 @@ package desktop
import ( import (
"time" "time"
"gitlab.com/demodesk/neko/server/internal/desktop/drop" "gitlab.com/demodesk/neko/server/pkg/drop"
) )
// repeat move event multiple times // repeat move event multiple times

View File

@ -4,7 +4,7 @@ import (
"errors" "errors"
"os/exec" "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 // name of the window that is being controlled

View File

@ -10,8 +10,8 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/config" "gitlab.com/demodesk/neko/server/internal/config"
"gitlab.com/demodesk/neko/server/internal/desktop/xevent" "gitlab.com/demodesk/neko/server/pkg/xevent"
"gitlab.com/demodesk/neko/server/internal/desktop/xorg" "gitlab.com/demodesk/neko/server/pkg/xorg"
) )
var mu = sync.Mutex{} var mu = sync.Mutex{}

View File

@ -1,7 +1,7 @@
package desktop package desktop
import ( import (
"gitlab.com/demodesk/neko/server/internal/desktop/xevent" "gitlab.com/demodesk/neko/server/pkg/xevent"
) )
func (manager *DesktopManagerCtx) OnCursorChanged(listener func(serial uint64)) { func (manager *DesktopManagerCtx) OnCursorChanged(listener func(serial uint64)) {

View File

@ -6,8 +6,8 @@ import (
"regexp" "regexp"
"time" "time"
"gitlab.com/demodesk/neko/server/internal/desktop/xorg" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/xorg"
) )
func (manager *DesktopManagerCtx) Move(x, y int) { func (manager *DesktopManagerCtx) Move(x, y int) {

View File

@ -6,7 +6,7 @@ import (
"github.com/go-chi/chi" "github.com/go-chi/chi"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
func pprofHandler(r types.Router) { func pprofHandler(r types.Router) {

View File

@ -8,8 +8,8 @@ import (
"github.com/go-chi/chi/middleware" "github.com/go-chi/chi/middleware"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type logFormatter struct { type logFormatter struct {

View File

@ -10,7 +10,7 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/config" "gitlab.com/demodesk/neko/server/internal/config"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
type HttpManagerCtx struct { type HttpManagerCtx struct {

View File

@ -7,9 +7,9 @@ import (
"github.com/go-chi/chi/middleware" "github.com/go-chi/chi/middleware"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"gitlab.com/demodesk/neko/server/internal/http/auth" "gitlab.com/demodesk/neko/server/pkg/auth"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type router struct { type router struct {

View File

@ -3,7 +3,7 @@ package dummy
import ( import (
"errors" "errors"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
func New() types.MemberProvider { func New() types.MemberProvider {

View File

@ -5,7 +5,7 @@ import (
"io" "io"
"os" "os"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
func New(config Config) types.MemberProvider { func New(config Config) types.MemberProvider {

View File

@ -1,7 +1,7 @@
package file package file
import ( import (
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
type MemberEntry struct { type MemberEntry struct {

View File

@ -11,7 +11,7 @@ import (
"gitlab.com/demodesk/neko/server/internal/member/dummy" "gitlab.com/demodesk/neko/server/internal/member/dummy"
"gitlab.com/demodesk/neko/server/internal/member/file" "gitlab.com/demodesk/neko/server/internal/member/file"
"gitlab.com/demodesk/neko/server/internal/member/object" "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 { func New(sessions types.SessionManager, config *config.Member) *MemberManagerCtx {

View File

@ -1,7 +1,7 @@
package object package object
import ( import (
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
func New(config Config) types.MemberProvider { func New(config Config) types.MemberProvider {

View File

@ -1,7 +1,7 @@
package object package object
import ( import (
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
type MemberEntry struct { type MemberEntry struct {

View File

@ -6,7 +6,7 @@ import (
"strings" "strings"
"time" "time"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
func (manager *SessionManagerCtx) CookieSetToken(w http.ResponseWriter, token string) { func (manager *SessionManagerCtx) CookieSetToken(w http.ResponseWriter, token string) {

View File

@ -9,8 +9,8 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/config" "gitlab.com/demodesk/neko/server/internal/config"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
func New(config *config.Session) *SessionManagerCtx { func New(config *config.Session) *SessionManagerCtx {

View File

@ -5,8 +5,8 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
) )
type SessionCtx struct { type SessionCtx struct {

View File

@ -7,8 +7,8 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
func NewImage(desktop types.DesktopManager) *ImageCtx { func NewImage(desktop types.DesktopManager) *ImageCtx {

View File

@ -4,8 +4,8 @@ import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"gitlab.com/demodesk/neko/server/internal/types"
"gitlab.com/demodesk/neko/server/internal/webrtc/payload" "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 { func (manager *WebRTCManagerCtx) handle(data []byte, session types.Session) error {

View File

@ -14,12 +14,12 @@ import (
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/config" "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/cursor"
"gitlab.com/demodesk/neko/server/internal/webrtc/pionlog" "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 // the duration without network activity before a Agent is considered disconnected. Default is 5 Seconds

View File

@ -6,7 +6,7 @@ import (
"github.com/pion/webrtc/v3" "github.com/pion/webrtc/v3"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
type WebRTCPeerCtx struct { type WebRTCPeerCtx struct {

View File

@ -5,8 +5,8 @@ import (
"github.com/pion/webrtc/v3" "github.com/pion/webrtc/v3"
"github.com/rs/zerolog" "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/internal/webrtc/pionlog"
"gitlab.com/demodesk/neko/server/pkg/types/codec"
) )
func (manager *WebRTCManagerCtx) newPeerConnection(codecs []codec.RTPCodec, logger zerolog.Logger) (*webrtc.PeerConnection, error) { func (manager *WebRTCManagerCtx) newPeerConnection(codecs []codec.RTPCodec, logger zerolog.Logger) (*webrtc.PeerConnection, error) {

View File

@ -9,7 +9,7 @@ import (
"github.com/pion/webrtc/v3/pkg/media" "github.com/pion/webrtc/v3/pkg/media"
"github.com/rs/zerolog" "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) { func (manager *WebRTCManagerCtx) newPeerStreamTrack(stream types.StreamSinkManager, logger zerolog.Logger) (*PeerStreamTrack, error) {

View File

@ -4,8 +4,8 @@ import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"gitlab.com/demodesk/neko/server/internal/types"
"gitlab.com/demodesk/neko/server/internal/webrtc/payload" "gitlab.com/demodesk/neko/server/internal/webrtc/payload"
"gitlab.com/demodesk/neko/server/pkg/types"
) )
func (peer *WebRTCPeerCtx) SendCursorPosition(x, y int) error { func (peer *WebRTCPeerCtx) SendCursorPosition(x, y int) error {

View File

@ -1,9 +1,9 @@
package websocket package websocket
import ( import (
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
) )
func (manager *WebSocketManagerCtx) fileChooserDialogEvents() { func (manager *WebSocketManagerCtx) fileChooserDialogEvents() {

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"errors" "errors"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
) )
func (h *MessageHandlerCtx) clipboardSet(session types.Session, payload *message.ClipboardData) error { func (h *MessageHandlerCtx) clipboardSet(session types.Session, payload *message.ClipboardData) error {

View File

@ -3,10 +3,10 @@ package handler
import ( import (
"errors" "errors"
"gitlab.com/demodesk/neko/server/internal/desktop/xorg" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/message"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/xorg"
) )
var ( var (

View File

@ -4,10 +4,10 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
func New( func New(

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"errors" "errors"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
) )
func (h *MessageHandlerCtx) keyboardMap(session types.Session, payload *message.KeyboardMap) error { func (h *MessageHandlerCtx) keyboardMap(session types.Session, payload *message.KeyboardMap) error {

View File

@ -3,9 +3,9 @@ package handler
import ( import (
"errors" "errors"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
) )
func (h *MessageHandlerCtx) screenSet(session types.Session, payload *message.ScreenSize) error { func (h *MessageHandlerCtx) screenSet(session types.Session, payload *message.ScreenSize) error {

View File

@ -3,9 +3,9 @@ package handler
import ( import (
"errors" "errors"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
) )
func (h *MessageHandlerCtx) sendUnicast(session types.Session, payload *message.SendUnicast) error { func (h *MessageHandlerCtx) sendUnicast(session types.Session, payload *message.SendUnicast) error {

View File

@ -1,9 +1,9 @@
package handler package handler
import ( import (
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
) )
func (h *MessageHandlerCtx) SessionCreated(session types.Session) error { func (h *MessageHandlerCtx) SessionCreated(session types.Session) error {

View File

@ -3,9 +3,9 @@ package handler
import ( import (
"errors" "errors"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
) )
func (h *MessageHandlerCtx) signalRequest(session types.Session, payload *message.SignalVideo) error { func (h *MessageHandlerCtx) signalRequest(session types.Session, payload *message.SignalVideo) error {

View File

@ -6,9 +6,9 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
) )
func (h *MessageHandlerCtx) systemInit(session types.Session) error { func (h *MessageHandlerCtx) systemInit(session types.Session) error {

View File

@ -10,11 +10,11 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "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/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 // send pings to peer with this period - must be less than pongWait

View File

@ -9,9 +9,9 @@ import (
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/types/event" "gitlab.com/demodesk/neko/server/pkg/types/event"
"gitlab.com/demodesk/neko/server/internal/types/message" "gitlab.com/demodesk/neko/server/pkg/types/message"
) )
type WebSocketPeerCtx struct { type WebSocketPeerCtx struct {

View File

@ -4,8 +4,8 @@ import (
"context" "context"
"net/http" "net/http"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
"gitlab.com/demodesk/neko/server/internal/utils" "gitlab.com/demodesk/neko/server/pkg/utils"
) )
type key int type key int

View File

@ -13,10 +13,10 @@ import (
"time" "time"
"unsafe" "unsafe"
"gitlab.com/demodesk/neko/server/internal/types"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
"gitlab.com/demodesk/neko/server/pkg/types"
) )
type Pipeline struct { type Pipeline struct {

View File

@ -10,7 +10,7 @@ import (
"github.com/PaesslerAG/gval" "github.com/PaesslerAG/gval"
"github.com/pion/webrtc/v3/pkg/media" "github.com/pion/webrtc/v3/pkg/media"
"gitlab.com/demodesk/neko/server/internal/types/codec" "gitlab.com/demodesk/neko/server/pkg/types/codec"
) )
var ( var (

View File

@ -3,7 +3,7 @@ package message
import ( import (
"github.com/pion/webrtc/v3" "github.com/pion/webrtc/v3"
"gitlab.com/demodesk/neko/server/internal/types" "gitlab.com/demodesk/neko/server/pkg/types"
) )
///////////////////////////// /////////////////////////////

View File

@ -9,14 +9,13 @@ import "C"
import ( import (
"fmt" "fmt"
"image"
"image/color"
"sync" "sync"
"time" "time"
"unsafe" "unsafe"
"image" "gitlab.com/demodesk/neko/server/pkg/types"
"image/color"
"gitlab.com/demodesk/neko/server/internal/types"
) )
//go:generate ./keysymdef.sh //go:generate ./keysymdef.sh