transport

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallBackFunction

type CallBackFunction func(string, interface{})

type Transport

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

Transport is the object which handles all communication with the server

func New

func New(addr string, sslEnabled bool) *Transport

New initialises a new transport

func (*Transport) Call

func (t *Transport) Call(ctx context.Context, token, project, service, endpoint string, params interface{}, timeout int) (*types.Response, error)

Call triggers the gRPC call function on space cloud

func (*Transport) CreateFolder

func (t *Transport) CreateFolder(ctx context.Context, project, path, name string) (*types.Response, error)

CreateFolder creates a folder/directory on selected file store

func (*Transport) DeleteFile

func (t *Transport) DeleteFile(ctx context.Context, meta interface{}, project, path string) (*types.Response, error)

DeleteFile deletes file/directory from selected file store

func (*Transport) DoDBRequest

func (t *Transport) DoDBRequest(ctx context.Context, meta *types.Meta, req interface{}) (*types.Response, error)

Batch triggers the gRPC batch function on space cloud

func (*Transport) DoesExists

func (t *Transport) DoesExists(ctx context.Context, project, path string) (*types.Response, error)

DoesExists checks if specified file exists in selected file store

func (*Transport) DownloadFile

func (t *Transport) DownloadFile(ctx context.Context, project, path string, writer io.Writer) error

DownloadFile downloads specified file from selected file store

func (*Transport) GetWebsocketConn

func (t *Transport) GetWebsocketConn() *websocket.Conn

func (*Transport) List

func (t *Transport) List(ctx context.Context, project, mode, path string) (*types.Response, error)

List lists all the files/folders or both according to the mode under certain directory

func (*Transport) UploadFile

func (t *Transport) UploadFile(ctx context.Context, project, path, name string, meta interface{}, reader io.Reader) (*types.Response, error)

UploadFile creates a file in selected file store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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