Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyWatching = errors.New("trying to watch directory that is already being watched")
View Source
var ErrBadAuth = errors.New("auth header format is unexpected")
View Source
var ErrBadAuthScheme = errors.New("invalid authorization scheme")
View Source
var ErrBadCaster = errors.New("task was given the wrong type of caster")
View Source
var ErrBadPassword = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrBadReadCount = errors.New("did not read expected number of bytes from file")
View Source
var ErrBadTaskType = errors.New("task metadata type is not supported on attempted operation")
View Source
var ErrBadTimestamp = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrBadUserOrPass = errors.New("username or password is incorrect")
View Source
var ErrBasicAuthFormat = errors.New("did not get expected encoded basic auth format")
View Source
var ErrCasterDoubleClose = errors.New("trying to close an already disabled caster")
View Source
var ErrChildTaskFailed = errors.New("a task spawned by this task has failed")
View Source
var ErrCtxMissingUser = clientSafeErr{/* contains filtered or unexported fields */}
View Source
var ErrDirAlreadyExists = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrDirNotAllowed = errors.New("attempted to perform action using a directory, where the action does not support directories")
View Source
var ErrDirectoryRequired = errors.New(
"attempted to perform an action that requires a directory, " +
"but found regular file",
)
View Source
var ErrDuplicateCoreServer = errors.New("cannot add more than one core server to instance service")
View Source
var ErrDuplicateLocalServer = errors.New("cannot add local server to instance service, it must already exist")
View Source
var ErrEmptyMove = errors.New("refusing to perform move with same filename and same parent")
View Source
var ErrEmptyZip = errors.New("cannot create a zip with no files")
View Source
var ErrFileAlreadyExists = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrFileAlreadyHasTask = errors.New("file already has a task")
View Source
var ErrFileNoTask = errors.New("file does not have task")
View Source
var ErrFilenameRequired = errors.New("filename is required but is empty")
View Source
var ErrInvalidToken = errors.New("session token is invalid")
View Source
var ErrJournalServerMismatch = errors.New("journal serverId does not match the lifetime serverId")
View Source
var ErrKeyAlreadyExists = errors.New("api key already exists")
View Source
var ErrKeyInUse = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrKeyNoServer = errors.New("api key is not associated with a server")
View Source
var ErrKeyNotFound = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrMediaAlreadyExists = errors.New("media with given contentId already exists")
View Source
var ErrMediaBadMime = errors.New("media has missing or unrecognized mime type")
View Source
var ErrMediaHasDuration = errors.New("media of non-video type cannot have a duration")
View Source
var ErrMediaNil = errors.New("media is nil")
View Source
var ErrMediaNoDimensions = errors.New("media has a missing width or height dimension")
View Source
var ErrMediaNoDuration = errors.New("media of video type must have a duration")
View Source
var ErrMediaNoFiles = errors.New("media cannot be added with no file ids specified")
View Source
var ErrMediaNoId = errors.New("media has no contentId")
View Source
var ErrMediaNoPages = errors.New("media must have a page count of at least 1")
View Source
var ErrMediaNotVideo = errors.New("media is not a video type")
View Source
var ErrNilFile = errors.New("file is required but is nil")
View Source
var ErrNoAlbum = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoAlbumAccess = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoAuth = errors.New("no auth header provided")
View Source
var ErrNoBody = errors.New("trying to read http body with no content")
View Source
var ErrNoCache = errors.New("could not find or generate requested media cache file")
View Source
var ErrNoChildren = errors.New("file does not have any children")
View Source
var ErrNoContentId = errors.New("file does not have a content id")
View Source
var ErrNoCoreAddress = errors.New("core server cannot be added with no address")
View Source
var ErrNoCreator = errors.New("instances must have a creator id")
View Source
var ErrNoExiftool = errors.New("exiftool not initialized")
View Source
var ErrNoFile = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoFileAccess = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoFileAction = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoFileTree = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoInstance = errors.New("instance not found")
View Source
var ErrNoJournal = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoLifetime = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoLocal = errors.New("could not get local server")
View Source
var ErrNoMedia = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoPublicUser = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoServerId = errors.New("server must have an id")
View Source
var ErrNoServerKey = errors.New("server has no key specified")
View Source
var ErrNoServerName = errors.New("no server name specified")
View Source
// contains filtered or unexported fields }
View Source
var ErrNoUser = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNoUserLogin = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNonDisplayable = errors.New("attempt to process non-displayable file")
View Source
var ErrNotAdmin = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrNotOwner = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrServerIsBackup = errors.New("this operation cannot be performed on a backup server")
View Source
var ErrServerNotInitialized = clientSafeErr{ // contains filtered or unexported fields }
View Source
// contains filtered or unexported fields }
View Source
var ErrSubscriptionNotFound = errors.New("subscription not found")
View Source
var ErrTaskError = errors.New("task generated an error")
View Source
var ErrTaskExit = errors.New("task exit")
View Source
var ErrTaskTimeout = errors.New("task timed out")
View Source
var ErrTokenExpired = clientSafeErr{ // contains filtered or unexported fields }
View Source
var ErrUserAlreadyExists = clientSafeErr{/* contains filtered or unexported fields */}
View Source
var ErrUserNotActive = errors.New("user is not active")
View Source
var ErrUserNotAuthorized = clientSafeErr{ // contains filtered or unexported fields }
View Source
var NewErrNoFileName = func(name string) error { return &ErrNoFileName{ Name: name, Err: ErrNoFile, } }
View Source
var NotImplemented = func(note string) error { return &withStack{ err: fmt.Errorf("not implemented: %s", note), stack: callers(3), } }
Functions ¶
func ErrBadJobMetadata ¶
func TrySafeErr ¶
SafeErr unpackages an error, if possible, to find the error inside that is safe to send to the client. If the error is not a clientSafeErr, it will trace the original error in the server logs, and return a generic error and a 500 to the client The reasoning behind this is, for example, if a user tries to access a file that they aren't allowed to, WE want to know (and log) they were not allowed to. Then, we want to tell the client (lie) that the file doesn't exist. This way, we don't give the forbidden user any information about the file.
Types ¶
type ErrNoFileName ¶
func (*ErrNoFileName) Error ¶
func (e *ErrNoFileName) Error() string
func (*ErrNoFileName) Unwrap ¶
func (e *ErrNoFileName) Unwrap() error
type StackError ¶
func Errorf ¶
func Errorf(format string, args ...any) StackError
Click to show internal directories.
Click to hide internal directories.