backend

package
v0.0.0-...-afb774d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectSsh

func ConnectSsh(req SshHeader, conn net.Conn) error

func Download

func Download(c *gin.Context)
func Head(c *gin.Context)

func Image

func Image(c *gin.Context)

func PreUpload

func PreUpload(c *gin.Context)

func SendSerisData

func SendSerisData(c *gin.Context)

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func NewBackend

func NewBackend(filename string) (*Backend, error)

func (*Backend) Close

func (b *Backend) Close() error

func (*Backend) Run

func (b *Backend) Run(ctx context.Context) error

type DownloadAck

type DownloadAck struct {
	Etag string
	Size string
}

type DownloadReq

type DownloadReq struct {
}

type FileServer

type FileServer struct {
	// contains filtered or unexported fields
}

func NewFileServer

func NewFileServer(cfg *config.Config, lis *pnet.Listener) *FileServer

func (*FileServer) Run

func (s *FileServer) Run(ctx context.Context) error

func (*FileServer) ServeConn

func (s *FileServer) ServeConn(ctx context.Context, rconn net.Conn) error

type FileSystem

type FileSystem struct {
}

func (FileSystem) Open

func (f FileSystem) Open(name string) (http.File, error)

type ProxyHeader

type ProxyHeader struct {
	Port uint16 `json:"port"`
}

type ProxyServer

type ProxyServer struct {
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(cfg *config.Config, lis *pnet.Listener) *ProxyServer

func (*ProxyServer) Run

func (p *ProxyServer) Run(ctx context.Context) error

func (*ProxyServer) ServeConn

func (p *ProxyServer) ServeConn(ctx context.Context, rconn net.Conn) error

type Resp

type Resp struct {
	Id int `json:"id"`
}

type SshHeader

type SshHeader struct {
	User string `json:"user,omitempty"`
	Pass string `json:"pass,omitempty"`
	Key  []byte `json:"key,omitempty"`
}

type SshServer

type SshServer struct {
	// contains filtered or unexported fields
}

func NewSshServer

func NewSshServer(cfg *config.Config, lis *pnet.Listener) *SshServer

func (*SshServer) Run

func (c *SshServer) Run(ctx context.Context) error

func (*SshServer) ServeConn

func (c *SshServer) ServeConn(ctx context.Context, conn net.Conn) error

type UploadAck

type UploadAck struct {
	Code int    `json:"code,omitempty"`
	Path string `json:"path,omitempty"`
	Etag string `json:"etag,omitempty"`
}

type UploadReq

type UploadReq struct {
	Path     string        `json:"path"`
	Size     uint64        `json:"size"`
	Etag     string        `json:"etag"`
	FileType file.FileType `json:"type"`
	StartAt  uint64        `json:"start"`
}

type WebServer

type WebServer struct {
	// contains filtered or unexported fields
}

func NewWebServer

func NewWebServer(cfg *config.Config, lis net.Listener) *WebServer

func (*WebServer) Run

func (s *WebServer) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL