storage

package
v0.0.0-...-7a1a7bc Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFontNotFound = errors.New("font not found")

Functions

This section is empty.

Types

type FirebaseFontStorage

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

FirebaseFontStorage is a font storage realisation with Firebase as database

func NewFirebaseFontStorage

func NewFirebaseFontStorage() (FirebaseFontStorage, error)

NewFirebaseFontStorage connect to Firebase and return instance of font storage

func (FirebaseFontStorage) Add

func (stor FirebaseFontStorage) Add(font figfont.FIGFont) error

func (FirebaseFontStorage) Get

func (stor FirebaseFontStorage) Get(name string) (figfont.FIGFont, error)

func (FirebaseFontStorage) IsExist

func (stor FirebaseFontStorage) IsExist(name string) (bool, error)

func (FirebaseFontStorage) Names

func (stor FirebaseFontStorage) Names() ([]string, error)

type FontStorage

type FontStorage interface {
	Add(font figfont.FIGFont) error
	Get(name string) (figfont.FIGFont, error)
	IsExist(name string) (bool, error)
	Names() ([]string, error)
}

Jump to

Keyboard shortcuts

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