server

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Session_Month int = 60 * 60 * 24 * 30
)
View Source
const StateAborted = "ABORTED" // failed with an error
View Source
const StateCancelled = "CANCELLED" // stopped by the owner
View Source
const StateFinished = "FINISHED"
View Source
const StateScheduled = "SCHEDULED"
View Source
const StateStarted = "STARTED"

Variables

This section is empty.

Functions

func StartMServer

func StartMServer()

func Var

func Var(r *http.Request, name string) string

Types

type AffectedItems added in v0.3.0

type AffectedItems struct {
	NumItems int `json:"numItems"`
}

type ApiError

type ApiError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func BadRequestError

func BadRequestError(message string) *ApiError

func InternalError

func InternalError(message string) *ApiError

func NotFoundError

func NotFoundError(message string) *ApiError

func ResolveError

func ResolveError(err error) *ApiError

func UnauthorizedError

func UnauthorizedError(message string) *ApiError

func (*ApiError) Error

func (e *ApiError) Error() string

type AuthUser

type AuthUser struct {
	Authenticated bool `json:"authenticated"`
}

type Capabilities added in v0.7.0

type Capabilities struct {
	// VideoEnabled is true when ffmpeg/ffprobe are available (video import/upload works).
	VideoEnabled bool `json:"videoEnabled"`
}

Capabilities advertises server-side features the frontend needs to know about, independent of any Drive connection or login. Extend as more capabilities appear.

type DriveCheck added in v0.7.0

type DriveCheck struct {
	Images int `json:"images"`
	Videos int `json:"videos"`
}

DriveCheck is the "what's new" overview: how many not-yet-imported images and videos are in the Drive folder. Whether video is supported at all is a server capability (see GET /api/capabilities), not a Drive-check concern.

type DriveFile

type DriveFile struct {
	CreatedTime time.Time
	Id          string `json:"id"`
	Kind        string `json:"kind"`
	Md5Checksum string `json:"md5Checksum"`
	MimeType    string `json:"mimeType"`
}

type DriveFiles

type DriveFiles struct {
	Length int          `json:"length"`
	Files  []*DriveFile `json:"files,omitempty"`
}

type Job

type Job struct {
	Id      string `json:"id"`
	Kind    string `json:"kind"` // "image" | "video"
	State   string `json:"state"`
	Percent int    `json:"percent"`

	NumFiles     int          `json:"numFiles"`
	NumProcessed int          `json:"numProcessed"`
	NumAdded     int          `json:"numAdded"`
	NumSkipped   int          `json:"numSkipped"`
	NumFailed    int          `json:"numFailed"`
	Failures     []JobFailure `json:"failures,omitempty"`
	Err          *ApiError    `json:"error,omitempty"`
	// contains filtered or unexported fields
}

type JobFailure added in v0.7.0

type JobFailure struct {
	Name     string `json:"name"`
	Category string `json:"category"`
}

JobFailure records one file that failed within a job (for the UI, e.g. "1 skipped: hdr").

type LoginCodeEmail added in v0.3.0

type LoginCodeEmail struct {
	Name string
	Code string
}

type PSResponse

type PSResponse struct {
	Err  *ApiError   `json:"error,omitempty"`
	Data interface{} `json:"data,omitempty"`
}

type PhotoFiles

type PhotoFiles struct {
	Length int          `json:"length"`
	Photos []*dao.Photo `json:"photos,omitempty"`
}

type SessionGuest

type SessionGuest struct {
	Id string `json:"id"`
}

type WelcomeEmail

type WelcomeEmail struct {
	VerifyUrl string
	Code      string
	Name      string
}

Jump to

Keyboard shortcuts

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