controllers

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DeviceCookieName represents the name of the cookie used to store the device identifier
	DeviceCookieName = "__dID"
)

Variables

This section is empty.

Functions

func ConfigureWebAPI

func ConfigureWebAPI(config app.HTTPConfig, libConfig app.LibraryConfig) *http.Server

ConfigureWebAPI configures all the backend API of the service

Types

type DirectoryResource

type DirectoryResource struct {
	Name    string
	ListURI string
}

DirectoryResource represents a folder or collection of files

type DownloadHistoryResource

type DownloadHistoryResource struct {
	DownloadedAt    time.Time
	DownloadedFiles []string
}

DownloadHistoryResource represents a single download instance

type ImageResource

type ImageResource struct {
	Name         string
	ImageURL     string
	ThumbnailURL string
	DownloadID   string
}

ImageResource represents a single Image Resource

type ListResource

type ListResource struct {
	Directories []DirectoryResource
	Images      []ImageResource
}

ListResource represents the data sent on a list call

type RequestLogger

type RequestLogger struct {
}

RequestLogger is a simple io.Writer that allows requests to be logged

func (RequestLogger) Write

func (rLogger RequestLogger) Write(p []byte) (n int, err error)

type RootResource

type RootResource struct {
	MediaURI           string
	DownloadHistoryURI string
	DownloadImagesURI  string
}

RootResource represents the successful response to a "/access" API

Jump to

Keyboard shortcuts

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