server

package
v0.0.0-...-b7e086b Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 26 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          log.Log
	DB           *gorm.DB
	// contains filtered or unexported fields
}

func NewServer

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

func (*Server) ListenForInterruptSignal

func (s *Server) ListenForInterruptSignal()

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