catalogserver

package
v0.0.0-...-2c780d5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CliStart

func CliStart(ctx *models.NatsterContext, opts *models.Options, hubopts *models.HubOptions)

Types

type CatalogServer

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

func New

func New(ctx *models.NatsterContext, nc *nats.Conn, library *medialibrary.MediaLibrary, allowAll bool) *CatalogServer

func (*CatalogServer) Start

func (srv *CatalogServer) Start() error

func (*CatalogServer) Stop

func (srv *CatalogServer) Stop() error

type Client

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

func NewClient

func NewClient(nc *nats.Conn) *Client

func NewClientWithCredsPath

func NewClientWithCredsPath(credsPath string) (*Client, error)

func (*Client) DownloadFile

func (c *Client) DownloadFile(catalog string, hash string, targetPath string) error

Submits a request to download a file containing the hash of the file in question and a public Xkey to be used to encrypt chunks Subscribes to natster.media.{catalog}.{hash} for encrypted chunks

func (*Client) GetCatalogItems

func (c *Client) GetCatalogItems(catalog string) ([]models.CatalogEntry, error)

Queries the contents of a given calog. Note that the contents supplied are summary items, including only the path and hash

Jump to

Keyboard shortcuts

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