server

package
v0.0.0-...-e05d22d Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB           dbh.DBConfig  `json:"db"`
	VideoStorage StorageConfig `json:"videoStorage"`
	VideoCache   string        `json:"videoCache"` // Path to the cache directory
}

type Server

type Server struct {
	HotReloadWWW bool
	Log          logs.Log
	DB           *gorm.DB
	// contains filtered or unexported fields
}

func NewServer

func NewServer(configFile string) (*Server, error)

func (*Server) ListenForKillSignals

func (s *Server) ListenForKillSignals()

func (*Server) ListenHTTP

func (s *Server) ListenHTTP(port string) error

port example: ":8081"

func (*Server) Shutdown

func (s *Server) Shutdown()

type StorageConfig

type StorageConfig struct {
	Filesystem *StorageConfigFS  `json:"filesystem"`
	GCS        *StorageConfigGCS `json:"gcs"`
}

One of the storage options must be configured (i.e. either 'filesystem' or 'gcs')

type StorageConfigFS

type StorageConfigFS struct {
	Root string `json:"root"` // Path to the root of the filesystem
}

type StorageConfigGCS

type StorageConfigGCS struct {
	Bucket string `json:"bucket"` // Name of the GCS bucket
	Public bool   `json:"public"` // Whether the bucket is public. This allows us to give clients direct URLs into GCS, instead of passing the data through our service
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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