server

package
v2.0.0-...-7b710ec Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrFileChecksumIncorrect = errors.Sentinel("calculated checksum does not match")
	ErrFileInfoMissing       = errors.Sentinel("no file info provided")
	ErrFileContentMissing    = errors.Sentinel("no file data provided")
)

Variables

This section is empty.

Functions

func ConvertTimestamp

func ConvertTimestamp(t int64) (out *timestamppb.Timestamp)

Types

type FileServer

type FileServer struct {
	*Server
	Health *health.Server
	fileserver.UnimplementedFileServerServer
}

func (*FileServer) DeleteFile

func (*FileServer) DownloadFile

func (*FileServer) GetFile

func (*FileServer) ListFiles

func (*FileServer) RegisterHTTPRoutes

func (fs *FileServer) RegisterHTTPRoutes(mux *runtime.ServeMux) error

func (*FileServer) UploadFile

func (fs *FileServer) UploadFile(stream fileserver.FileServer_UploadFileServer) error

type Server

type Server struct {
	Log       logr.Logger
	FileStore database.StoredFileStore

	APIEndpoint     string
	GatewayEndpoint string

	Health                  *health.Server
	APIListenerProvider     func(addr string) (net.Listener, error)
	GatewayListenerProvider func(addr string) (net.Listener, error)
}

func (*Server) Start

func (frs *Server) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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