cli

package
v0.0.0-...-38563ce Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Flags struct {
	AppConfigPath string // if override

} // .flags

Functions

func AppLogger

func AppLogger(appConfig appconfig.AppConfig) *slog.Logger

AppLogger, this is the custom application logger for uniformity

func ExpAppLogger

func ExpAppLogger(appConfig appconfig.AppConfig) *expslog.Logger

func GetDataStore

func GetDataStore(ctx context.Context, appConfig appconfig.AppConfig) (handlertusd.Store, health.Checkable, error)

func GetUploadInfoHandler

func GetUploadInfoHandler(ctx context.Context, appConfig *appconfig.AppConfig) (http.Handler, error)

func InitConfigCache

func InitConfigCache(ctx context.Context, appConfig appconfig.AppConfig) error

func InitFileReadyPublisher

func InitFileReadyPublisher(ctx context.Context, appConfig appconfig.AppConfig) error

func InitReporters

func InitReporters(ctx context.Context, appConfig appconfig.AppConfig) error

func InitTracerProvider

func InitTracerProvider(ctx context.Context) (func(context.Context) error, error)

func NewEventPublisher

func NewEventPublisher[T event.Identifiable](ctx context.Context, appConfig appconfig.AppConfig) (event.Publishers[T], error)

func NewEventSubscriber

func NewEventSubscriber[T event.Identifiable](ctx context.Context, appConfig appconfig.AppConfig) (event.Subscribable[T], error)

func ParseFlags

func ParseFlags() error

ParseFlags read cli flags into an Flags struct which is returned

func RegisterAllSourcesAndDestinations

func RegisterAllSourcesAndDestinations(ctx context.Context, appConfig appconfig.AppConfig) (err error)

Eventually, this can take a more generic list of deliverer configuration object

func Serve

func Serve(ctx context.Context, appConfig appconfig.AppConfig, authMiddleware *middleware.AuthMiddleware) (http.Handler, error)

func TracingProcessor

func TracingProcessor[T event.Identifiable](next func(context.Context, T) error) func(context.Context, T) error

Types

type FileStoreHealthCheck

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

func (*FileStoreHealthCheck) Health

type InfoHandler

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

func (*InfoHandler) ServeHTTP

func (ih *InfoHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type RegisterableHookHandler

type RegisterableHookHandler interface {
	tusHooks.HookHandler
	Register(t tusHooks.HookType, hookFuncs ...prebuilthooks.HookHandlerFunc)
}

func GetHookHandler

func GetHookHandler(appConfig appconfig.AppConfig) (RegisterableHookHandler, error)

type RequestBody

type RequestBody struct {
	Target string `json:"target"`
	Source string `json:"source"`
}

type Router

type Router struct{}

func (*Router) ServeHTTP

func (router *Router) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type UploadInspector

type UploadInspector interface {
	InspectInfoFile(c context.Context, id string) (map[string]any, error)
	InspectUploadedFile(c context.Context, id string) (map[string]any, error)
}

type UploadStatusInspector

type UploadStatusInspector interface {
	InspectFileDeliveryStatus(ctx context.Context, id string) ([]info.FileDeliveryStatus, error)
	InspectFileUploadStatus(ctx context.Context, id string) (info.FileUploadStatus, error)
}

type UploadTraceIDGenerator

type UploadTraceIDGenerator struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*UploadTraceIDGenerator) NewIDs

func (*UploadTraceIDGenerator) NewSpanID

func (u *UploadTraceIDGenerator) NewSpanID(ctx context.Context, traceID otrace.TraceID) otrace.SpanID

type VersionHandler

type VersionHandler struct{}

func (*VersionHandler) ServeHTTP

func (vh *VersionHandler) ServeHTTP(rw http.ResponseWriter, _ *http.Request)

Jump to

Keyboard shortcuts

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