dynamodb

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StaticFilesStorage

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

StaticFilesStorage is a storage of static files in DynamoDB.

func NewStaticFilesStorage

func NewStaticFilesStorage(settings model.StaticFilesStorageSettings, localStorage *staticStoreLocal.StaticFilesStorage) (*StaticFilesStorage, error)

NewStaticFilesStorage creates and returns new local static files storage.

func (*StaticFilesStorage) AdminPanelHandlers

func (sfs *StaticFilesStorage) AdminPanelHandlers() *model.AdminPanelHandlers

AdminPanelHandlers returns handlers for the admin panel. Adminpanel build is always being stored locally, despite the static storage type.

func (*StaticFilesStorage) AssetHandlers

func (sfs *StaticFilesStorage) AssetHandlers() *model.AssetHandlers

AssetHandlers returns handlers for assets.

func (*StaticFilesStorage) Close

func (sfs *StaticFilesStorage) Close()

Close is to satisfy the interface.

func (*StaticFilesStorage) GetAppleFile

func (sfs *StaticFilesStorage) GetAppleFile(name string) ([]byte, error)

GetAppleFile is for reading Apple-related static files. Unlike generic GetFile, it does not treat model.ErrorNotFound as error.

func (*StaticFilesStorage) GetFile

func (sfs *StaticFilesStorage) GetFile(name string) ([]byte, error)

GetFile is a generic method for fetching a file by name from DynamoDB. It is a wrapper over the private method getFile. It provides fallback behavior via using eponymous local storage method.

func (*StaticFilesStorage) ParseTemplate

func (sfs *StaticFilesStorage) ParseTemplate(templateName string) (*template.Template, error)

ParseTemplate parses the html template.

func (*StaticFilesStorage) UploadFile

func (sfs *StaticFilesStorage) UploadFile(name string, contents []byte) error

UploadFile is a generic file uploader.

func (*StaticFilesStorage) WebHandlers added in v1.2.7

func (sfs *StaticFilesStorage) WebHandlers() *model.WebHandlers

WebHandlers returns handlers for the web. Web build is always being stored locally, despite the static storage type.

Jump to

Keyboard shortcuts

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