client

package module
v0.0.0-...-b924a7f Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: BSD-3-Clause Imports: 18 Imported by: 0

README

SSH Preview (Client)

概要

このプログラムはSSHの接続先に配置するプログラムです。このプログラムは指定したプレビューしたいファイルを指定したポートにHTTPで飛ばします。

目次

Install

go install github.com/TKMAX777/SSHPreview/client/cmd/open@latest

設定方法

UnixDomainSocketを使う場合

接続元で指定したsocketディレクトリを次のように指定します。

export PreviewListenSock=/path/to/socket/dir
ポート転送を用いる場合

接続元で指定した、接続先の転送ポートを次のように環境変数で指定します。

export PreviewListenPort=ポート番号

利用方法

open /path/to/pictures

Documentation

Index

Constants

View Source
const (
	SockTypeTCP = iota
	SockTypeUNIX
)

Variables

View Source
var Settings struct {
	ListenPort string
	ListenSock string
}

Functions

func KeepPing

func KeepPing()

func Start

func Start()

Types

type HTTPPreviewData

type HTTPPreviewData struct {
	Data     io.Reader
	FileName string
}

type HTTPResponseFormat

type HTTPResponseFormat struct {
	Status string
}

type RequestHandler

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

func NewRequestHandler

func NewRequestHandler(addr string, sockType int) *RequestHandler

func (RequestHandler) ChromeOff

func (r RequestHandler) ChromeOff() (err error)

func (RequestHandler) ChromeShow

func (r RequestHandler) ChromeShow() (err error)

func (*RequestHandler) Ping

func (r *RequestHandler) Ping() (err error)

func (*RequestHandler) Send

func (r *RequestHandler) Send(data HTTPPreviewData) (err error)

func (*RequestHandler) Verify

func (r *RequestHandler) Verify(fileName string) (err error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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