cli

package
v0.0.0-...-f9df99f Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 45 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 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) (http.Handler, 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 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