api

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// File-related errors
	ErrKeyFileUploadFailed     = "ErrFileUploadFailed"
	ErrKeyFileDownloadFailed   = "ErrFileDownloadFailed"
	ErrKeyMetadataFetchFailed  = "ErrMetadataFetchFailed"
	ErrKeyInvalidFileFormat    = "ErrInvalidFileFormat"
	ErrKeyUnsupportedFileType  = "ErrUnsupportedFileType"
	ErrKeyFileProcessingFailed = "ErrFileProcessingFailed"
)

S5-specific error keys

View Source
const TUS_HTTP_ROUTE = "/api/upload/tus"

Variables

This section is empty.

Functions

func NewAPI

func NewAPI() (core.API, []core.ContextBuilderOption, error)

Types

type API

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

func (API) AuthTokenName

func (a API) AuthTokenName() string

func (API) Config

func (a API) Config() config.APIConfig

func (*API) Configure

func (a *API) Configure(router *mux.Router, accessSvc core.AccessService) error

func (API) Name

func (a API) Name() string

func (*API) Reconfigure

func (a *API) Reconfigure(_ config.Scope, _ any) error

func (API) Subdomain

func (a API) Subdomain() string

func (API) TusHandler

func (a API) TusHandler() *service.TusHandler

type Error

type Error struct {
	Key     string
	Message string
	Err     error
}

Error struct for representing S5-specific errors

func NewError

func NewError(key string, err error, customMessage ...string) *Error

func (*Error) Error

func (e *Error) Error() string

Error method to implement the error interface

func (*Error) HttpStatus

func (e *Error) HttpStatus() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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